rpms/cups/F-7 cups-usb-paperout.patch, 1.2, 1.3 cups.spec, 1.338, 1.339
Tim Waugh (twaugh)
fedora-extras-commits at redhat.com
Wed Jul 4 12:21:06 UTC 2007
Author: twaugh
Update of /cvs/pkgs/rpms/cups/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27807
Modified Files:
cups-usb-paperout.patch cups.spec
Log Message:
* Wed Jul 4 2007 Tim Waugh <twaugh at redhat.com>
- Better paper-out detection patch still (bug #246222).
cups-usb-paperout.patch:
Index: cups-usb-paperout.patch
===================================================================
RCS file: /cvs/pkgs/rpms/cups/F-7/cups-usb-paperout.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- cups-usb-paperout.patch 11 Jun 2007 12:01:40 -0000 1.2
+++ cups-usb-paperout.patch 4 Jul 2007 12:20:56 -0000 1.3
@@ -1,5 +1,5 @@
--- cups-1.2.10/backend/runloop.c.usb-paperout 2006-12-06 20:10:16.000000000 +0000
-+++ cups-1.2.10/backend/runloop.c 2007-05-29 19:21:32.000000000 +0100
++++ cups-1.2.10/backend/runloop.c 2007-07-04 12:12:00.000000000 +0100
@@ -40,6 +40,14 @@
#endif /* __hpux */
@@ -25,7 +25,7 @@
fprintf(stderr, "DEBUG: backendRunLoop(print_fd=%d, device_fd=%d, use_bc=%d)\n",
-@@ -110,12 +121,9 @@
+@@ -110,8 +121,6 @@
FD_ZERO(&input);
if (!print_bytes)
FD_SET(print_fd, &input);
@@ -33,13 +33,20 @@
- FD_SET(device_fd, &input);
FD_ZERO(&output);
-- if (print_bytes || !use_bc)
-- FD_SET(device_fd, &output);
-+ FD_SET(device_fd, &output);
+ if (print_bytes || !use_bc)
+@@ -119,7 +128,10 @@
if (use_bc)
{
-@@ -141,14 +149,24 @@
+- if (select(nfds, &input, &output, NULL, NULL) < 0)
++ struct timeval fives;
++ fives.tv_sec = 5;
++ fives.tv_usec = 0;
++ if (select(nfds, &input, &output, NULL, &fives) < 0)
+ {
+ /*
+ * Pause printing to clear any pending errors...
+@@ -141,14 +153,24 @@
* Check if we have back-channel data ready...
*/
@@ -70,7 +77,18 @@
}
}
-@@ -227,6 +245,9 @@
+@@ -219,6 +241,10 @@
+ offline = 1;
+ }
+ }
++ else if (linux_usb_paperout_hack && errno == EAGAIN)
++ {
++ sleep (1);
++ }
+ else if (errno != EAGAIN && errno != EINTR && errno != ENOTTY)
+ {
+ perror("ERROR: Unable to write print data");
+@@ -227,6 +253,9 @@
}
else
{
@@ -80,7 +98,7 @@
if (paperout)
{
fputs("STATE: -media-empty-error\n", stderr);
-@@ -247,7 +268,42 @@
+@@ -247,7 +276,42 @@
total_bytes += bytes;
}
}
@@ -90,7 +108,7 @@
+ {
+ time_t now;
+ if (!paperout &&
-+ ((now = time(NULL)) - last_write) > 5)
++ ((now = time(NULL)) - last_write) >= 5)
+ {
+ unsigned int status;
+ if (ioctl (device_fd, LPGETSTATUS, &status) == 0 &&
@@ -123,8 +141,8 @@
/*
* Return with success...
---- cups-1.2.10/backend/usb-unix.c.usb-paperout 2007-05-29 19:10:08.000000000 +0100
-+++ cups-1.2.10/backend/usb-unix.c 2007-05-29 19:10:08.000000000 +0100
+--- cups-1.2.10/backend/usb-unix.c.usb-paperout 2007-07-04 12:11:46.000000000 +0100
++++ cups-1.2.10/backend/usb-unix.c 2007-07-04 12:11:46.000000000 +0100
@@ -39,6 +39,11 @@
#include "ieee1284.c"
#include <sys/select.h>
Index: cups.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cups/F-7/cups.spec,v
retrieving revision 1.338
retrieving revision 1.339
diff -u -r1.338 -r1.339
--- cups.spec 29 Jun 2007 09:04:07 -0000 1.338
+++ cups.spec 4 Jul 2007 12:20:56 -0000 1.339
@@ -445,6 +445,9 @@
%{cups_serverbin}/daemon/cups-lpd
%changelog
+* Wed Jul 4 2007 Tim Waugh <twaugh at redhat.com>
+- Better paper-out detection patch still (bug #246222).
+
* Fri Jun 29 2007 Tim Waugh <twaugh at redhat.com> 1:1.2.11-2
- Applied patch to fix group handling in PPDs (bug #186231, STR #2408).
More information about the scm-commits
mailing list