rpms/cups/FC-5 cups-str2056.patch,NONE,1.1 cups.spec,1.225,1.226
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Mon Oct 30 16:51:21 UTC 2006
Author: twaugh
Update of /cvs/dist/rpms/cups/FC-5
In directory cvs.devel.redhat.com:/tmp/cvs-serv6200
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-5/cups.spec,v
retrieving revision 1.225
retrieving revision 1.226
diff -u -r1.225 -r1.226
--- cups.spec 23 Oct 2006 13:49:36 -0000 1.225
+++ cups.spec 30 Oct 2006 16:51:19 -0000 1.226
@@ -38,6 +38,7 @@
Patch24: cups-maxlogsize.patch
Patch32: cups-pid.patch
Patch41: cups-relro.patch
+Patch42: cups-str2056.patch
Epoch: 1
Url: http://www.cups.org/
BuildRoot: %{_tmppath}/%{name}-root
@@ -131,6 +132,7 @@
%patch24 -p1 -b .maxlogsize
%patch32 -p1 -b .pid
%patch41 -p1 -b .relro
+%patch42 -p1 -b .str2056
perl -pi -e 's,^#(Printcap\s+/etc/printcap),$1,' conf/cupsd.conf.in
aclocal -I config-scripts
autoconf
@@ -404,6 +406,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-1.1
- 1.2.5.
More information about the fedora-cvs-commits
mailing list