diff options
author | James Meyer <james.meyer@operamail.com> | 2010-09-08 07:33:44 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2010-09-08 07:33:44 (GMT) |
commit | 525753e4a1a139e088d8ac120b19fbab6c0aaaa6 (patch) | |
tree | 35cef28abb613da4f58e83f6abbe4bd4cfa244bf /abs/extra-testing/cups/fix-infinite-usb-loop.patch | |
parent | 592e3cad43ef12c53f523145d0fd981b54f2a049 (diff) | |
parent | b172f79fadb565ecfbcec9508f9377d8618a4f4c (diff) | |
download | linhes_pkgbuild-525753e4a1a139e088d8ac120b19fbab6c0aaaa6.zip linhes_pkgbuild-525753e4a1a139e088d8ac120b19fbab6c0aaaa6.tar.gz linhes_pkgbuild-525753e4a1a139e088d8ac120b19fbab6c0aaaa6.tar.bz2 |
Merge branch 'HEAD' of ssh://jams@knoppmyth.net/mount/repository/LinHES-PKGBUILD
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) |