]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - backend/usb-unix.c
More svn:properties changes.
[thirdparty/cups.git] / backend / usb-unix.c
index ae302a0962fc48b904fa87d1057dba56a198f235..3ca30c965d6e5e3040248587f12af65ffcea1de7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: usb-unix.c 5259 2006-03-09 19:22:36Z mike $"
+ * "$Id$"
  *
  *   USB port backend for the Common UNIX Printing System (CUPS).
  *
@@ -56,8 +56,11 @@ print_device(const char *uri,                /* I - Device URI */
              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 */
@@ -77,6 +80,16 @@ print_device(const char *uri,                /* I - Device URI */
   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...
@@ -234,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);
         }
@@ -618,5 +633,5 @@ open_device(const char *uri)                /* I - Device URI */
 
 
 /*
- * End of "$Id: usb-unix.c 5259 2006-03-09 19:22:36Z mike $".
+ * End of "$Id$".
  */