45 lines
1.4 KiB
Diff
45 lines
1.4 KiB
Diff
|
--- cups-1.2.10/cups/adminutil.c.adminutil 2007-05-21 16:39:00.000000000 +0100
|
||
|
+++ cups-1.2.10/cups/adminutil.c 2007-05-21 16:45:31.000000000 +0100
|
||
|
@@ -1260,14 +1260,21 @@
|
||
|
{
|
||
|
if (!wrote_browsing)
|
||
|
{
|
||
|
+ int new_remote_printers = (remote_printers > 0 ||
|
||
|
+ (remote_printers == -1 &&
|
||
|
+ old_remote_printers > 0));
|
||
|
+ int new_share_printers = (share_printers > 0 ||
|
||
|
+ (share_printers == -1 &&
|
||
|
+ old_share_printers > 0));
|
||
|
+
|
||
|
wrote_browsing = 1;
|
||
|
|
||
|
- if (remote_printers > 0 || share_printers > 0)
|
||
|
+ if (new_remote_printers | new_share_printers)
|
||
|
{
|
||
|
- if (remote_printers > 0 && share_printers > 0)
|
||
|
+ if (new_remote_printers && new_share_printers)
|
||
|
cupsFilePuts(temp,
|
||
|
"# Enable printer sharing and shared printers.\n");
|
||
|
- else if (remote_printers > 0)
|
||
|
+ else if (new_remote_printers)
|
||
|
cupsFilePuts(temp,
|
||
|
"# Show shared printers on the local network.\n");
|
||
|
else
|
||
|
@@ -1277,14 +1284,14 @@
|
||
|
cupsFilePuts(temp, "Browsing On\n");
|
||
|
cupsFilePuts(temp, "BrowseOrder allow,deny\n");
|
||
|
|
||
|
- if (remote_printers > 0)
|
||
|
+ if (new_remote_printers)
|
||
|
{
|
||
|
cupsFilePuts(temp, "# (Change '@LOCAL' to 'ALL' if using "
|
||
|
"directed broadcasts from another subnet.)\n");
|
||
|
cupsFilePuts(temp, "BrowseAllow @LOCAL\n");
|
||
|
}
|
||
|
|
||
|
- if (share_printers > 0)
|
||
|
+ if (new_share_printers)
|
||
|
cupsFilePuts(temp, "BrowseAddress @LOCAL\n");
|
||
|
}
|
||
|
else
|