Re: [LOW] STR #4052: 'lp(r) < /dev/null' return successful-ok
Michael Sweet <[email protected]>
| Newsgroups | gmane.comp.printing.cups.bugs |
|---|---|
| Message-ID | <[email protected]> |
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW. [STR Closed w/Resolution] Fixed in Subversion repository. Link: http://www.cups.org/str.php?L4052 Version: 1.5-current Fix Version: 1.6-current (r10494) _______________________________________________ cups-bugs mailing list [email protected] http://lists.easysw.com/mailman/listinfo/cups-bugs
str4052.patch
(text/plain, 1.5 KB)
Index: berkeley/lpr.c
===================================================================
--- berkeley/lpr.c (revision 10492)
+++ berkeley/lpr.c (working copy)
@@ -89,7 +89,7 @@
cupsSetUser(argv[i]);
}
break;
-
+
case 'H' : /* Connect to host */
if (argv[i][2] != '\0')
cupsSetServer(argv[i] + 2);
@@ -401,8 +401,9 @@
if (cupsFinishDocument(CUPS_HTTP_DEFAULT, printer) != IPP_OK)
{
+ _cupsLangPrintf(stderr, "%s: %s", argv[0], cupsLastErrorString());
cupsCancelJob2(CUPS_HTTP_DEFAULT, printer, job_id, 0);
- job_id = 0;
+ return (1);
}
}
Index: systemv/lp.c
===================================================================
--- systemv/lp.c (revision 10492)
+++ systemv/lp.c (working copy)
@@ -46,7 +46,7 @@
int i, j; /* Looping vars */
int job_id; /* Job ID */
char *printer, /* Printer name */
- *instance, /* Instance name */
+ *instance, /* Instance name */
*val, /* Option value */
*title; /* Job title */
int priority; /* Job priority (1-100) */
@@ -121,7 +121,7 @@
cupsSetUser(argv[i]);
}
break;
-
+
case 'c' : /* Copy to spool dir (always enabled) */
break;
@@ -629,8 +629,9 @@
if (cupsFinishDocument(CUPS_HTTP_DEFAULT, printer) != IPP_OK)
{
+ _cupsLangPrintf(stderr, "%s: %s", argv[0], cupsLastErrorString());
cupsCancelJob2(CUPS_HTTP_DEFAULT, printer, job_id, 0);
- job_id = 0;
+ return (1);
}
}