|
|
Author: twaugh
Update of /cvs/dist/rpms/cups/FC-6
In directory cvs.devel.redhat.com:/tmp/cvs-serv6689
Modified Files:
cups-usb-paperout.patch cups.spec
Log Message:
* Wed Jul 4 2007 Tim Waugh <twaugh@xxxxxxxxxx>
- Better paper-out detection patch still (bug #246222).
- Resolves: rhbz#246222
cups-usb-paperout.patch:
runloop.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-------
usb-unix.c | 16 +++++++++++
2 files changed, 89 insertions(+), 9 deletions(-)
Index: cups-usb-paperout.patch
===================================================================
RCS file: /cvs/dist/rpms/cups/FC-6/cups-usb-paperout.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- cups-usb-paperout.patch 29 May 2007 18:26:58 -0000 1.2
+++ cups-usb-paperout.patch 4 Jul 2007 11:44:01 -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/dist/rpms/cups/FC-6/cups.spec,v
retrieving revision 1.333
retrieving revision 1.334
diff -u -r1.333 -r1.334
--- cups.spec 29 May 2007 18:26:58 -0000 1.333
+++ cups.spec 4 Jul 2007 11:44:01 -0000 1.334
@@ -446,6 +446,9 @@
%{cups_serverbin}/daemon/cups-lpd
%changelog
+* Wed Jul 4 2007 Tim Waugh <twaugh@xxxxxxxxxx>
+- Better paper-out detection patch still (bug #246222).
+
* Tue May 29 2007 Tim Waugh <twaugh@xxxxxxxxxx> 1:1.2.10-9
- Better paper-out detection patch (bug #241589).
--
fedora-cvs-commits mailing list
fedora-cvs-commits@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-cvs-commits
|
|