*/
#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
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;
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)
{
* Send the reset...
*/
- (*g.classdriver)->SoftReset(g.classdriver, 0);
+ (*g.classdriver)->SoftReset(g.classdriver, DEFAULT_TIMEOUT);
/*
* Release the I/O lock...
"<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>
<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>
<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><</cupsColorSpace >>setpagedevice</tt></td>
+ <td><tt><</cupsColorSpace 1 >>setpagedevice</tt></td>
</tr>
<tr valign='top'>
<td><tt>cupsCompression</tt></td>