]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Mirror 1.1.x changes.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Sat, 30 Aug 2003 23:13:01 +0000 (23:13 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Sat, 30 Aug 2003 23:13:01 +0000 (23:13 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.2@3894 7a7537e8-13f0-0310-91df-b6672ffda945

CHANGES-1.1.txt
backend/parallel.c
backend/serial.c
backend/socket.c
backend/usb.c
scheduler/client.c

index 6b59d72d5e8b40d976ac577940ac2042896e006d..8e29a56a5d5f688d3ac03d37d895049c241a7f08 100644 (file)
@@ -3,6 +3,11 @@ CHANGES-1.1.txt
 
 CHANGES IN CUPS V1.1.20rc1
 
+       - Added backend tweeks and content-length check from Red
+         Hat (STR #253)
+       - The USB backend now uses the 8255 constants instead of
+         the standard constants when reporting printer status
+         bits on Linux (STR #254)
        - Added new cupsDoAuthentication(), cupsGetFd(),
          cupsGetFile(), cupsPutFd(), and cupsPutFile() functions
          to the CUPS API (STR #112)
index a12a7a8811cdf58d675b354a5a67f411bb42b348..b9d65d8459d4e177896e39269dac23462b5b9b27 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: parallel.c,v 1.29.2.14 2003/01/07 18:26:15 mike Exp $"
+ * "$Id: parallel.c,v 1.29.2.15 2003/08/30 23:12:59 mike Exp $"
  *
  *   Parallel port backend for the Common UNIX Printing System (CUPS).
  *
@@ -277,6 +277,9 @@ main(int  argc,             /* I - Number of command-line arguments (6 or 7) */
        bufptr += wbytes;
       }
 
+      if (wbytes < 0)
+        break;
+
       if (argc > 6)
        fprintf(stderr, "INFO: Sending print file, %lu bytes...\n",
                (unsigned long)tbytes);
@@ -668,5 +671,5 @@ list_devices(void)
 
 
 /*
- * End of "$Id: parallel.c,v 1.29.2.14 2003/01/07 18:26:15 mike Exp $".
+ * End of "$Id: parallel.c,v 1.29.2.15 2003/08/30 23:12:59 mike Exp $".
  */
index dc1b13ca0c23535bcd6c2bf352f3a9effde8df29..27bff806072ec1fb424804342179d951467c919a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: serial.c,v 1.32.2.14 2003/01/07 18:26:15 mike Exp $"
+ * "$Id: serial.c,v 1.32.2.15 2003/08/30 23:12:59 mike Exp $"
  *
  *   Serial port backend for the Common UNIX Printing System (CUPS).
  *
@@ -508,6 +508,9 @@ main(int  argc,             /* I - Number of command-line arguments (6 or 7) */
        bufptr += wbytes;
       }
 
+      if (wbytes < 0)
+        break;
+
       if (argc > 6)
        fprintf(stderr, "INFO: Sending print file, %lu bytes...\n",
                (unsigned long)tbytes);
@@ -987,5 +990,5 @@ list_devices(void)
 
 
 /*
- * End of "$Id: serial.c,v 1.32.2.14 2003/01/07 18:26:15 mike Exp $".
+ * End of "$Id: serial.c,v 1.32.2.15 2003/08/30 23:12:59 mike Exp $".
  */
index 37b81bf18f215b42632d9972c7edba722ae162a0..87c4568526ce0a96b0ab7c6d946290313f10fe0d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: socket.c,v 1.17.2.14 2003/04/10 14:13:49 mike Exp $"
+ * "$Id: socket.c,v 1.17.2.15 2003/08/30 23:13:00 mike Exp $"
  *
  *   AppSocket backend for the Common UNIX Printing System (CUPS).
  *
@@ -302,6 +302,9 @@ main(int  argc,                     /* I - Number of command-line arguments (6 or 7) */
        bufptr += wbytes;
       }
 
+      if (wbytes < 0)
+        break;
+
      /*
       * Check for possible data coming back from the printer...
       */
@@ -388,5 +391,5 @@ main(int  argc,                     /* I - Number of command-line arguments (6 or 7) */
 
 
 /*
- * End of "$Id: socket.c,v 1.17.2.14 2003/04/10 14:13:49 mike Exp $".
+ * End of "$Id: socket.c,v 1.17.2.15 2003/08/30 23:13:00 mike Exp $".
  */
index d4b53b9e63aacdc46d99b75cede03e42b74f7f02..a231a4fa094b514b471147c54298e5cdcafbb7ed 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: usb.c,v 1.18.2.26 2003/07/22 18:23:11 mike Exp $"
+ * "$Id: usb.c,v 1.18.2.27 2003/08/30 23:13:00 mike Exp $"
  *
  *   USB port backend for the Common UNIX Printing System (CUPS).
  *
@@ -232,17 +232,21 @@ main(int  argc,           /* I - Number of command-line arguments (6 or 7) */
   * do this while we write data to the printer, however at least some
   * Linux kernels have buggy USB drivers which don't like to be
   * queried while sending data to the printer...
+  *
+  * Also, we're using the 8255 constants instead of the ones that are
+  * supposed to be used, as it appears that the USB driver also doesn't
+  * follow standards...
   */
 
   if (ioctl(fd, LPGETSTATUS, &status) == 0)
   {
     fprintf(stderr, "DEBUG: LPGETSTATUS returned a port status of %02X...\n", status);
 
-    if (status & LP_NOPA)
+    if (!(status & LP_POUTPA))
       fputs("WARNING: Media tray empty!\n", stderr);
-    else if (status & LP_ERR)
+    else if (!(status & LP_PERRORP)
       fputs("WARNING: Printer fault!\n", stderr);
-    else if (status & LP_OFFL)
+    else if (!(status & LP_PSELECD))
       fputs("WARNING: Printer off-line.\n", stderr);
   }
 #endif /* __linux */
@@ -288,6 +292,9 @@ main(int  argc,             /* I - Number of command-line arguments (6 or 7) */
        bufptr += wbytes;
       }
 
+      if (wbytes < 0)
+        break;
+
       if (argc > 6)
        fprintf(stderr, "INFO: Sending print file, %lu bytes...\n",
                (unsigned long)tbytes);
@@ -791,5 +798,5 @@ open_device(const char *uri)                /* I - Device URI */
 
 
 /*
- * End of "$Id: usb.c,v 1.18.2.26 2003/07/22 18:23:11 mike Exp $".
+ * End of "$Id: usb.c,v 1.18.2.27 2003/08/30 23:13:00 mike Exp $".
  */
index 6368774157a66806078615ad2e454602a64a51ef..68df7d5ef8912a289fcb717207028af56249249d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: client.c,v 1.91.2.67 2003/08/01 20:09:19 mike Exp $"
+ * "$Id: client.c,v 1.91.2.68 2003/08/30 23:13:01 mike Exp $"
  *
  *   Client routines for the Common UNIX Printing System (CUPS) scheduler.
  *
@@ -1519,6 +1519,20 @@ ReadClient(client_t *con)        /* I - Client to read from */
 
              break;
             }
+           else if (atoi(con->http.fields[HTTP_FIELD_CONTENT_LENGTH]) < 0)
+           {
+            /*
+             * Negative content lengths are invalid!
+             */
+
+              if (!SendError(con, HTTP_BAD_REQUEST))
+             {
+               CloseClient(con);
+               return (0);
+             }
+
+             break;
+           }
 
            /*
            * Open a temporary file to hold the request...
@@ -3363,5 +3377,5 @@ CDSAWriteFunc(SSLConnectionRef connection,        /* I  - SSL/TLS connection */
 
 
 /*
- * End of "$Id: client.c,v 1.91.2.67 2003/08/01 20:09:19 mike Exp $".
+ * End of "$Id: client.c,v 1.91.2.68 2003/08/30 23:13:01 mike Exp $".
  */