/*
- * "$Id: usb-unix.c 5373 2006-04-06 20:03:32Z mike $"
+ * "$Id: usb-unix.c 5553 2006-05-20 12:22:27Z mike $"
*
* USB port backend for the Common UNIX Printing System (CUPS).
*
int argc, /* I - Number of command-line arguments (6 or 7) */
char *argv[]) /* I - Command-line arguments */
{
+ int usebc; /* Use backchannel path? */
int fd; /* USB device */
int rbytes; /* Number of bytes read */
int wbytes; /* Number of bytes written */
(void)argc;
(void)argv;
+ /*
+ * Disable backchannel data when printing to Canon USB printers - apparently
+ * Canon printers will return the IEEE-1284 device ID over and over and over
+ * when they get a read request...
+ */
+
+ usebc = strcasecmp(hostname, "Canon") != 0;
+
/*
* Open the USB port device...
*/
do
{
FD_ZERO(&input);
- FD_SET(fd, &input);
+ if (usebc)
+ FD_SET(fd, &input);
+
FD_ZERO(&output);
FD_SET(fd, &output);
}
/*
- * End of "$Id: usb-unix.c 5373 2006-04-06 20:03:32Z mike $".
+ * End of "$Id: usb-unix.c 5553 2006-05-20 12:22:27Z mike $".
*/