/*
- * "$Id: usb-unix.c 5259 2006-03-09 19:22:36Z mike $"
+ * "$Id$"
*
* USB port backend for the Common UNIX Printing System (CUPS).
*
const char *resource, /* I - Resource/modelname */
const char *options, /* I - Device options/serial number */
int fp, /* I - File descriptor to print */
- int copies) /* I - Copies to print */
+ int copies, /* I - Copies to print */
+ 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 */
unsigned int status; /* Port status (off-line, out-of-paper, etc.) */
#endif /* __linux */
+ (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 5259 2006-03-09 19:22:36Z mike $".
+ * End of "$Id$".
*/