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