rpms/cups/FC-5 cups-str1880.patch,NONE,1.1 cups.spec,1.208,1.209

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Thu Aug 17 12:22:06 UTC 2006


Author: twaugh

Update of /cvs/dist/rpms/cups/FC-5
In directory cvs.devel.redhat.com:/tmp/cvs-serv13678

Modified Files:
	cups.spec 
Added Files:
	cups-str1880.patch 
Log Message:
* Thu Aug 16 2006 Tim Waugh <twaugh at redhat.com> 1:1.2.2-1.8
- Apply patch to fix STR #1880 (bug #200205).


cups-str1880.patch:
 snmp.c |   31 +++++++++++++++++++++++++++++--
 1 files changed, 29 insertions(+), 2 deletions(-)

--- NEW FILE cups-str1880.patch ---
--- cups-1.2.2/backend/snmp.c.str1880	2006-08-17 13:16:43.000000000 +0100
+++ cups-1.2.2/backend/snmp.c	2006-08-17 13:17:01.000000000 +0100
@@ -300,6 +300,9 @@
      char *argv[])			/* I - Command-line arguments */
 {
   int		fd;			/* SNMP socket */
+#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
+  struct sigaction action;		/* Actions for POSIX signals */
+#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
 
 
  /*
@@ -319,6 +322,23 @@
   cupsSetPasswordCB(password_cb);
 
  /*
+  * Catch SIGALRM signals...
+  */
+
+#ifdef HAVE_SIGSET
+  sigset(SIGALRM, alarm_handler);
+#elif defined(HAVE_SIGACTION)
+  memset(&action, 0, sizeof(action));
+
+  sigemptyset(&action.sa_mask);
+  sigaddset(&action.sa_mask, SIGALRM);
+  action.sa_handler = alarm_handler;
+  sigaction(SIGALRM, &action, NULL);
+#else
+  signal(SIGALRM, alarm_handler);
+#endif /* HAVE_SIGSET */
+
+ /*
   * Open the SNMP socket...
   */
 
@@ -425,6 +445,10 @@
 
   (void)sig;
 
+#if !defined(HAVE_SIGSET) && !defined(HAVE_SIGACTION)
+  signal(SIGALRM, alarm_handler);
+#endif /* !HAVE_SIGSET && !HAVE_SIGACTION */
+
   if (DebugLevel)
     write(2, "DEBUG: ALARM!\n", 14);
 }
@@ -1692,7 +1716,11 @@
 
   debug_printf("DEBUG: %.3f Probing %s...\n", run_time(), device->addrname);
 
-  if ((http = httpConnect(device->addrname, 631)) != NULL)
+  alarm(1);
+  http = httpConnect(device->addrname, 631);
+  alarm(0);
+
+  if (http);
   {
    /*
     * IPP is supported...
@@ -2333,7 +2361,6 @@
 
   addr->ipv4.sin_port = htons(port);
 
-  signal(SIGALRM, alarm_handler);
   alarm(1);
 
   status = connect(fd, (void *)addr, httpAddrLength(addr));


Index: cups.spec
===================================================================
RCS file: /cvs/dist/rpms/cups/FC-5/cups.spec,v
retrieving revision 1.208
retrieving revision 1.209
diff -u -r1.208 -r1.209
--- cups.spec	16 Aug 2006 16:16:18 -0000	1.208
+++ cups.spec	17 Aug 2006 12:22:03 -0000	1.209
@@ -34,6 +34,7 @@
 Patch11: cups-str1893.patch
 Patch12: cups-locale.patch
 Patch13: cups-CAN-2005-0064.patch
+Patch14: cups-str1880.patch
 Patch17: cups-serverbin-compat.patch
 Patch18: cups-language.patch
 Patch20: cups-direct-usb.patch
@@ -131,6 +132,7 @@
 %patch11 -p1 -b .str1893
 %patch12 -p1 -b .locale
 %patch13 -p1 -b .CAN-2005-0064
+%patch14 -p1 -b .str1880
 %patch17 -p1 -b .serverbin-compat
 %patch18 -p1 -b .language
 %patch20 -p1 -b .direct-usb
@@ -414,6 +416,9 @@
 %{cups_serverbin}/daemon/cups-lpd
 
 %changelog
+* Thu Aug 16 2006 Tim Waugh <twaugh at redhat.com> 1:1.2.2-1.8
+- Apply patch to fix STR #1880 (bug #200205).
+
 * Wed Aug 16 2006 Tim Waugh <twaugh at redhat.com>
 - Added a clause in the %%post scriptlet to remove bad remote.cache
   files (bug #201800).




More information about the fedora-cvs-commits mailing list