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)
/*
- * "$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).
*
bufptr += wbytes;
}
+ if (wbytes < 0)
+ break;
+
if (argc > 6)
fprintf(stderr, "INFO: Sending print file, %lu bytes...\n",
(unsigned long)tbytes);
/*
- * 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 $".
*/
/*
- * "$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).
*
bufptr += wbytes;
}
+ if (wbytes < 0)
+ break;
+
if (argc > 6)
fprintf(stderr, "INFO: Sending print file, %lu bytes...\n",
(unsigned long)tbytes);
/*
- * 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 $".
*/
/*
- * "$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).
*
bufptr += wbytes;
}
+ if (wbytes < 0)
+ break;
+
/*
* Check for possible data coming back from the printer...
*/
/*
- * 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 $".
*/
/*
- * "$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).
*
* 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 */
bufptr += wbytes;
}
+ if (wbytes < 0)
+ break;
+
if (argc > 6)
fprintf(stderr, "INFO: Sending print file, %lu bytes...\n",
(unsigned long)tbytes);
/*
- * 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 $".
*/
/*
- * "$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.
*
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...
/*
- * 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 $".
*/