summaryrefslogtreecommitdiff
path: root/backend/usb-libusb.c
diff options
context:
space:
mode:
Diffstat (limited to 'backend/usb-libusb.c')
-rw-r--r--backend/usb-libusb.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/backend/usb-libusb.c b/backend/usb-libusb.c
index 7f4095179..3071e1c40 100644
--- a/backend/usb-libusb.c
+++ b/backend/usb-libusb.c
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
- * Libusb interface code for the Common UNIX Printing System (CUPS).
+ * Libusb interface code for CUPS.
*
- * Copyright 2007-2009 by Apple Inc.
+ * Copyright 2007-2010 by Apple Inc.
*
* These coded instructions, statements, and computer programs are the
* property of Apple Inc. and are protected by Federal copyright
@@ -173,7 +173,7 @@ print_device(const char *uri, /* I - Device URI */
if ((bytes = read(print_fd, buffer, sizeof(buffer))) > 0)
{
if (usb_bulk_write(printer->handle, printer->write_endp, buffer,
- bytes, 45000) < 0)
+ bytes, 3600000) < 0)
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to write %d bytes to printer\n"),
@@ -519,7 +519,8 @@ make_device_uri(
if ((sern = cupsGetOption("SERIALNUMBER", num_values, values)) == NULL)
if ((sern = cupsGetOption("SERN", num_values, values)) == NULL)
- if ((sern = cupsGetOption("SN", num_values, values)) == NULL)
+ if ((sern = cupsGetOption("SN", num_values, values)) == NULL &&
+ printer->device->descriptor.iSerialNumber)
{
/*
* Try getting the serial number from the device itself...