[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cups-commit
Subject:    [cups.commit] [CUPS] r8802 - in trunk: . backend
From:       cups-dev () easysw ! com
Date:       2009-08-31 15:48:55
Message-ID: 9573-cups.commit () news ! easysw ! com
[Download RAW message or body]

Author: mike
Date: 2009-08-31 08:48:50 -0700 (Mon, 31 Aug 2009)
New Revision: 8802
Log:
The libusb-based USB backend would hang at the end of the job (STR #3315)



Modified:
   trunk/CHANGES-1.4.txt
   trunk/backend/usb-libusb.c

Modified: trunk/CHANGES-1.4.txt
===================================================================
--- trunk/CHANGES-1.4.txt	2009-08-29 06:05:14 UTC (rev 8801)
+++ trunk/CHANGES-1.4.txt	2009-08-31 15:48:50 UTC (rev 8802)
@@ -4,6 +4,8 @@
 CHANGES IN CUPS V1.4.1
 
 	- Documention fixes (STR #3296)
+	- The libusb-based USB backend would hang at the end of the job
+	  (STR #3315)
 	- DNS-SD registrations for raw queues had an empty "ty" key (STR #3299)
 	- The JPEG and BMP MIME type rules were broken (STR #3284)
 	- cupsGetNamedDest returned the default printer when the named

Modified: trunk/backend/usb-libusb.c
===================================================================
--- trunk/backend/usb-libusb.c	2009-08-29 06:05:14 UTC (rev 8801)
+++ trunk/backend/usb-libusb.c	2009-08-31 15:48:50 UTC (rev 8802)
@@ -179,7 +179,12 @@
       }
 
       if (pfds[1].revents & POLLIN)
-        tbytes += side_cb(printer, print_fd);
+      {
+        if ((bytes = side_cb(printer, print_fd)) < 0)
+	  pfds[1].events = 0;		/* Filter has gone away... */
+	else
+          tbytes += bytes;
+      }
     }
   }
 
@@ -747,7 +752,7 @@
   if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
   {
     _cupsLangPuts(stderr, _("WARNING: Failed to read side-channel request!\n"));
-    return (0);
+    return (-1);
   }
 
   switch (command)

_______________________________________________
cups-commit mailing list
cups-commit@easysw.com
http://lists.easysw.com/mailman/listinfo/cups-commit
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic