]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - backend/usb-unix.c
Load cups into easysw/current.
[thirdparty/cups.git] / backend / usb-unix.c
index f3d1c3d51a90a4ef6f3a256191938e5541094fc8..39df2e67d8c7cb175cf36398c7d4592b4c47b683 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$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).
  *
@@ -60,6 +60,7 @@ print_device(const char *uri,         /* I - Device URI */
             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 */
@@ -82,6 +83,14 @@ print_device(const char *uri,                /* I - Device URI */
   (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...
   */
@@ -238,7 +247,9 @@ print_device(const char *uri,               /* I - Device URI */
         do
        {
           FD_ZERO(&input);
-         FD_SET(fd, &input);
+         if (usebc)
+           FD_SET(fd, &input);
+
          FD_ZERO(&output);
          FD_SET(fd, &output);
         }
@@ -622,5 +633,5 @@ open_device(const char *uri)                /* I - Device URI */
 
 
 /*
- * 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 $".
  */