rpms/cups/devel cups-adminutil.patch, NONE, 1.1 cups.spec, 1.336, 1.337

Tim Waugh (twaugh) fedora-extras-commits at redhat.com
Wed Jun 27 08:32:53 UTC 2007


Author: twaugh

Update of /cvs/pkgs/rpms/cups/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16186

Modified Files:
	cups.spec 
Added Files:
	cups-adminutil.patch 
Log Message:
* Wed Jun 27 2007 Tim Waugh <twaugh at redhat.com> 1:1.2.11-2
- Fixed _cupsAdminSetServerSettings() sharing/shared handling (bug #238057).


cups-adminutil.patch:

--- NEW FILE cups-adminutil.patch ---
--- 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


Index: cups.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cups/devel/cups.spec,v
retrieving revision 1.336
retrieving revision 1.337
diff -u -r1.336 -r1.337
--- cups.spec	26 Jun 2007 14:05:24 -0000	1.336
+++ cups.spec	27 Jun 2007 08:32:18 -0000	1.337
@@ -6,7 +6,7 @@
 Summary: Common Unix Printing System
 Name: cups
 Version: 1.2.11
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: GPL
 Group: System Environment/Daemons
 Source: ftp://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2
@@ -46,6 +46,7 @@
 Patch22: cups-af_unix-auth.patch
 Patch24: cups-str2109.patch
 Patch25: cups-usb-paperout.patch
+Patch26: cups-adminutil.patch
 Patch100: cups-lspp.patch
 Epoch: 1
 Url: http://www.cups.org/
@@ -154,6 +155,7 @@
 %patch22 -p1 -b .af_unix-auth
 %patch24 -p1 -b .str2109
 %patch25 -p1 -b .usb-paperout
+%patch26 -p1 -b .adminutil
 
 %if %lspp
 %patch100 -p1 -b .lspp
@@ -441,6 +443,9 @@
 %{cups_serverbin}/daemon/cups-lpd
 
 %changelog
+* Wed Jun 27 2007 Tim Waugh <twaugh at redhat.com> 1:1.2.11-2
+- Fixed _cupsAdminSetServerSettings() sharing/shared handling (bug #238057).
+
 * Mon Jun 25 2007 Tim Waugh <twaugh at redhat.com>
 - Fixed permissions on classes.conf in the file manifest (bug #245748).
 




More information about the fedora-extras-commits mailing list