diff options
author | Cecil Hugh Watson <knoppmyth@gmail.com> | 2010-09-05 06:06:18 (GMT) |
---|---|---|
committer | Cecil Hugh Watson <knoppmyth@gmail.com> | 2010-09-05 06:06:18 (GMT) |
commit | 78a3ef57a70a33968943235df28c662064caaf3e (patch) | |
tree | 1484df87cba63c3c72f0070e9f612fcc317affed /abs/extra-testing/cups/fix-infinite-usb-loop.patch | |
parent | bd2fce4f72e5fedac6a0af36b6538090b63b845a (diff) | |
download | linhes_pkgbuild-78a3ef57a70a33968943235df28c662064caaf3e.zip linhes_pkgbuild-78a3ef57a70a33968943235df28c662064caaf3e.tar.gz linhes_pkgbuild-78a3ef57a70a33968943235df28c662064caaf3e.tar.bz2 |
cups:Bumped/Updated for LinHES 7.
Diffstat (limited to 'abs/extra-testing/cups/fix-infinite-usb-loop.patch')
-rw-r--r-- | abs/extra-testing/cups/fix-infinite-usb-loop.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/abs/extra-testing/cups/fix-infinite-usb-loop.patch b/abs/extra-testing/cups/fix-infinite-usb-loop.patch new file mode 100644 index 0000000..bad179e --- /dev/null +++ b/abs/extra-testing/cups/fix-infinite-usb-loop.patch @@ -0,0 +1,35 @@ +diff -urNad cups-1.4.0~/backend/usb-libusb.c cups-1.4.0/backend/usb-libusb.c +--- cups-1.4.0~/backend/usb-libusb.c 2009-08-08 00:24:14.000000000 +0200 ++++ cups-1.4.0/backend/usb-libusb.c 2009-09-02 16:37:31.000000000 +0200 +@@ -158,7 +158,7 @@ + + while (poll(pfds, 2, -1) > 0) + { +- if (pfds[0].revents & POLLIN) ++ if (pfds[0].revents & (POLLIN + POLLHUP)) + { + if ((bytes = read(print_fd, buffer, sizeof(buffer))) > 0) + { +@@ -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) |