[cups.bugs] [HIGH] STR #3979: Canon SELPHY CP600 Support
Francesco Rolando
ogekuri at gmail.com
Sun Nov 13 02:17:53 PST 2011
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New]
I have modify usb-libusb.c to diag more:
---------------------------------------------------------------------
if (print_fd != 0)
{
fputs("PAGE: 1 1\n", stderr);
lseek(print_fd, 0, SEEK_SET);
}
/*
* TODO: Add back-channel support, along with better write error
handling.
*/
fputs("lseek OK\n", stderr);
while (poll(pfds, 2, -1) > 0)
{
/*
* CUPS STR #3318: USB process hangs on end-of-file, making further
* printing impossible
*
* From a strict interpretation of POSIX poll(), POLLHUP should never
be
* set without POLLIN, since POLLIN is the event you request. That
said,
* it appears that some versions of Linux break this.
*/
if (pfds[0].revents & (POLLIN | POLLHUP))
{
if ((bytes = read(print_fd, buffer, sizeof(buffer))) > 0)
{
fputs("read OK\n", stderr);
if (usb_bulk_write(printer->handle, printer->write_endp, buffer,
bytes, 3600000) < 0)
{
fputs("usb_bulk_write Not OK\n", stderr);
_cupsLangPrintf(stderr,
_("ERROR: Unable to write %d bytes to
printer!\n"),
(int)bytes);
tbytes = -1;
break;
}
else {
fputs("usb_bulk_write OK\n", stderr);
}
---------------------------------------------------------------------
This is the output:
DEBUG: print_device
DEBUG: usb_find_busses=5
DEBUG: usb_find_devices=6
STATE: +connecting-to-device
STATE: -connecting-to-device
PAGE: 1 1
lseek OK
read OK
I think stop responding on :
usb_bulk_write(printer->handle, printer->write_endp, buffer,bytes,
3600000) < 0)
Do you have any suggest?
Link: http://www.cups.org/str.php?L3979
Version: 1.4.8
More information about the cups
mailing list