rpms/cups/FC-6 cups-str2056.patch,NONE,1.1 cups.spec,1.275,1.276

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Oct 30 16:32:56 UTC 2006


Author: twaugh

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

Modified Files:
	cups.spec 
Added Files:
	cups-str2056.patch 
Log Message:
* Mon Oct 30 2006 Tim Waugh <twaugh at redhat.com>
- Fixed parallel backend (bug #213021, STR #2056).
- Resolves: rhbz#213021


cups-str2056.patch:
 parallel.c |   26 +++++++++++++++++++++++---
 1 files changed, 23 insertions(+), 3 deletions(-)

--- NEW FILE cups-str2056.patch ---
--- cups-1.2.5/backend/parallel.c.str2056	2006-07-12 21:00:11.000000000 +0100
+++ cups-1.2.5/backend/parallel.c	2006-10-30 16:21:46.000000000 +0000
@@ -88,7 +88,8 @@
 		*options;		/* Pointer to options */
   int		port;			/* Port number (not used) */
   int		print_fd,		/* Print file */
-		device_fd;		/* Parallel device */
+		device_fd,		/* Parallel device */
+		use_bc;			/* Read back-channel data? */
   int		copies;			/* Number of copies to print */
   size_t	tbytes;			/* Total number of bytes written */
   struct termios opts;			/* Parallel port options */
@@ -188,7 +189,26 @@
 
   do
   {
-    if ((device_fd = open(resource, O_WRONLY | O_EXCL)) == -1)
+#ifdef __linux
+   /*
+    * The Linux parallel port driver currently is broken WRT select()
+    * and bidirection I/O...
+    */
+
+    device_fd = open(resource, O_WRONLY | O_EXCL);
+    use_bc    = 0;
+
+#else
+    if ((device_fd = open(resource, O_RDWR | O_EXCL)) < 0)
+    {
+      device_fd = open(resource, O_WRONLY | O_EXCL);
+      use_bc    = 0;
+    }
+    else
+      use_bc = 1;
+#endif /* __linux */
+
+    if (device_fd == -1)
     {
       if (getenv("CLASS") != NULL)
       {
@@ -264,7 +284,7 @@
       lseek(print_fd, 0, SEEK_SET);
     }
 
-    tbytes = backendRunLoop(print_fd, device_fd, 1);
+    tbytes = backendRunLoop(print_fd, device_fd, use_bc);
 
     if (print_fd != 0 && tbytes >= 0)
       fprintf(stderr, "INFO: Sent print file, " CUPS_LLFMT " bytes...\n",


Index: cups.spec
===================================================================
RCS file: /cvs/dist/rpms/cups/FC-6/cups.spec,v
retrieving revision 1.275
retrieving revision 1.276
diff -u -r1.275 -r1.276
--- cups.spec	23 Oct 2006 16:46:42 -0000	1.275
+++ cups.spec	30 Oct 2006 16:32:54 -0000	1.276
@@ -40,6 +40,7 @@
 Patch16: cups-pid.patch
 Patch17: cups-relro.patch
 Patch18: cups-directed-broadcast.patch
+Patch19: cups-str2056.patch
 Patch100: cups-lspp.patch
 Epoch: 1
 Url: http://www.cups.org/
@@ -140,6 +141,7 @@
 %patch16 -p1 -b .pid
 %patch17 -p1 -b .relro
 %patch18 -p1 -b .directed-broadcast
+%patch19 -p1 -b .str2056
 
 %if %lspp
 %patch100 -p1 -b .lspp
@@ -416,6 +418,9 @@
 %{cups_serverbin}/daemon/cups-lpd
 
 %changelog
+* Mon Oct 30 2006 Tim Waugh <twaugh at redhat.com>
+- Fixed parallel backend (bug #213021, STR #2056).
+
 * Mon Oct 23 2006 Tim Waugh <twaugh at redhat.com> 1:1.2.5-2.1
 - 1.2.5.
 




More information about the fedora-cvs-commits mailing list