]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix some timeout issues in the USB backend on Mac OS X.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 28 Sep 2007 18:05:28 +0000 (18:05 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 28 Sep 2007 18:05:28 +0000 (18:05 +0000)
Fix a typo in the locale Makefile.

Fix typos in the CUPS PPD spec.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@6993 7a7537e8-13f0-0310-91df-b6672ffda945

backend/usb-darwin.c
doc/help/spec-ppd.html
locale/Makefile

index 63b15bc13ac6216e41b6ce165535197d5878487d..37774e11ee6440ee9c3a82f2fc095d999581424a 100644 (file)
  */
 #define WAIT_EOF_DELAY                 7
 #define WAIT_SIDE_DELAY                        3
-#define DEFAULT_TIMEOUT                        60L
+#define DEFAULT_TIMEOUT                        5000L
 
 #define        USB_INTERFACE_KIND              CFUUIDGetUUIDBytes(kIOUSBInterfaceInterfaceID190)
 #define kUSBLanguageEnglish            0x409
@@ -342,6 +342,13 @@ print_device(const char *uri,              /* I - Device URI */
   g.serial     = cfstr_create_trim(serial);
   g.location   = location;
 
+  if (!g.make || !g.model)
+  {
+    _cupsLangPrintf(stderr, 
+                   _("ERROR: Unable to create make and model strings\n"));
+    return CUPS_BACKEND_STOP;
+  }
+
   fputs("STATE: +connecting-to-device\n", stderr);
 
   countdown = INITIAL_LOG_INTERVAL;
@@ -1073,9 +1080,9 @@ static Boolean find_device_cb(void *refcon,
       CFStringRef make = NULL,  model = NULL, serial = NULL;
 
       copy_deviceinfo(idString, &make, &model, &serial);
-      if (CFStringCompare(make, g.make, kCFCompareCaseInsensitive) == kCFCompareEqualTo)
+      if (make && CFStringCompare(make, g.make, kCFCompareCaseInsensitive) == kCFCompareEqualTo)
       {
-       if (CFStringCompare(model, g.model, kCFCompareCaseInsensitive) == kCFCompareEqualTo)
+       if (model && CFStringCompare(model, g.model, kCFCompareCaseInsensitive) == kCFCompareEqualTo)
        {
          if (g.serial != NULL && CFStringGetLength(g.serial) > 0)
          {
@@ -1972,7 +1979,7 @@ static void soft_reset()
   * Send the reset...
   */
 
-  (*g.classdriver)->SoftReset(g.classdriver, 0);
+  (*g.classdriver)->SoftReset(g.classdriver, DEFAULT_TIMEOUT);
 
  /*
   * Release the I/O lock...
index fb22faa037ad94b1036eb48147119f5b129b1ea2..3efa7170250b6f7d6a907489b698d617c844620b 100644 (file)
@@ -95,7 +95,7 @@ PPD file to stdout.</p>
 "<br>
 *End</p>
 
-<p>The <tt>?<i>MainKeyword</i><tt> attribute defines PostScript code that
+<p>The <tt>?<i>MainKeyword</i></tt> attribute defines PostScript code that
 determines the currently selected/enabled option keyword (choice) for the
 main keyword (option). It is typically used when communicating with USB,
 serial, Appletalk, and AppSocket (port 9100) printers.</p>
@@ -152,7 +152,7 @@ printers.</p>
 
 <p>CUPS supports three types of color profiles. The first type is
 based on sRGB and is used by the standard CUPS raster filters and
-ESP Ghostscript. The second type is based on ICC profiles and is
+GPL Ghostscript. The second type is based on ICC profiles and is
 used by the Quartz-based filters on MacOS X. The final type is
 based on well-known colorspaces such as sRGB and Adobe RGB.</p>
 
@@ -866,7 +866,7 @@ PRE B {
        <td><tt>cupsColorSpace</tt></td>
        <td>Integer</td>
        <td>Specifies the page image colorspace: 0 = W, 1 = RGB, 2 = RGBA, 3 = K, 4 = CMY, 5 = YMC, 6 = CMYK, 7 = YMCK, 8 = KCMY, 9 = KCMYcm, 10 = GMCK, 11 = GMCS, 12 = White, 13 = Gold, 14 = Silver, 15 = CIE XYZ, 16 = CIE Lab, 17 = RGBW, 32 to 46 = CIE Lab (1 to 15 inks)</td>
-       <td><tt>&lt;&lt;/cupsColorSpace &gt;&gt;setpagedevice</tt></td>
+       <td><tt>&lt;&lt;/cupsColorSpace &gt;&gt;setpagedevice</tt></td>
 </tr>
 <tr valign='top'>
        <td><tt>cupsCompression</tt></td>
index 8cda53a2405546700f923c8c650b049725592742..d9a763ecb4432ef855aeee7d9803f09ce2ea03bf 100644 (file)
@@ -16,7 +16,7 @@
 include ../Makedefs
 
 
-OBJS   =       checkpo po2strings.o strings2po.o translate.o
+OBJS   =       checkpo.o po2strings.o strings2po.o translate.o
 TARGETS        =       checkpo po2strings strings2po translate