supported = cupsDoRequest(http, request, resource);
ipp_status = cupsLastError();
+ fprintf(stderr, "DEBUG: Get-Printer-Attributes: %s (%s)\n",
+ ippErrorString(ipp_status), cupsLastErrorString());
+
if (ipp_status > IPP_OK_CONFLICT)
{
fprintf(stderr, "DEBUG: Get-Printer-Attributes returned %s.\n",
return (CUPS_BACKEND_FAILED);
}
- _cupsLangPrintFilter(stderr, "WARNING", _("The printer is busy."));
+ _cupsLangPrintFilter(stderr, "INFO", _("The printer is busy."));
report_printer_state(supported, 0);
_("The printer URI is incorrect or no longer "
"exists."));
- if (supported)
- ippDelete(supported);
+ ippDelete(supported);
return (CUPS_BACKEND_STOP);
}
else
{
_cupsLangPrintFilter(stderr, "ERROR",
- _("Unable to get printer status: %s"),
- cupsLastErrorString());
+ _("Unable to get printer status."));
sleep(10);
}
ippDelete(supported);
+ supported = NULL;
continue;
}
if (i < printer_state->num_values)
{
- _cupsLangPrintFilter(stderr, "WARNING", _("The printer is busy."));
+ _cupsLangPrintFilter(stderr, "INFO", _("The printer is busy."));
report_printer_state(supported, 0);
delay = _cupsNextDelay(delay, &prev_delay);
ippDelete(supported);
+ supported = NULL;
continue;
}
}
* Validate access to the printer...
*/
- while (!job_canceled)
+ while (!job_canceled && validate_job)
{
request = new_request(IPP_VALIDATE_JOB, version, uri, argv[2], argv[3],
num_options, options, compression,
ipp_status = cupsLastError();
- if (ipp_status > IPP_OK_CONFLICT &&
- ipp_status != IPP_OPERATION_NOT_SUPPORTED)
- {
- if (job_canceled)
- break;
+ fprintf(stderr, "DEBUG: Validate-Job: %s (%s)\n",
+ ippErrorString(ipp_status), cupsLastErrorString());
- if (ipp_status == IPP_SERVICE_UNAVAILABLE ||
- ipp_status == IPP_PRINTER_BUSY)
- {
- _cupsLangPrintFilter(stderr, "INFO",
- _("Printer busy; will retry in 10 seconds."));
- sleep(10);
- }
- else
- {
- /*
- * Update auth-info-required as needed...
- */
+ if (job_canceled)
+ break;
- _cupsLangPrintFilter(stderr, "ERROR", "%s", cupsLastErrorString());
+ if (ipp_status == IPP_SERVICE_UNAVAILABLE || ipp_status == IPP_PRINTER_BUSY)
+ {
+ _cupsLangPrintFilter(stderr, "INFO", _("The printer is busy."));
+ sleep(10);
+ }
+ else if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN)
+ {
+ /*
+ * Update auth-info-required as needed...
+ */
- if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN)
- {
- fprintf(stderr, "DEBUG: WWW-Authenticate=\"%s\"\n",
- httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE));
+ fprintf(stderr, "DEBUG: WWW-Authenticate=\"%s\"\n",
+ httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE));
- /*
- * Normal authentication goes through the password callback, which sets
- * auth_info_required to "username,password". Kerberos goes directly
- * through GSSAPI, so look for Negotiate in the WWW-Authenticate header
- * here and set auth_info_required as needed...
- */
+ /*
+ * Normal authentication goes through the password callback, which sets
+ * auth_info_required to "username,password". Kerberos goes directly
+ * through GSSAPI, so look for Negotiate in the WWW-Authenticate header
+ * here and set auth_info_required as needed...
+ */
- if (!strncmp(httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE),
- "Negotiate", 9))
- auth_info_required = "negotiate";
- }
+ if (!strncmp(httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE),
+ "Negotiate", 9))
+ auth_info_required = "negotiate";
- goto cleanup;
- }
+ goto cleanup;
}
- else
+ else if (ipp_status == IPP_OPERATION_NOT_SUPPORTED)
+ {
+ _cupsLangPrintFilter(stderr, "WARNING",
+ _("This printer does not conform to the IPP "
+ "standard and may not work."));
+ break;
+ }
+ else if (ipp_status < IPP_REDIRECTION_OTHER_SITE)
break;
}
ipp_status = cupsLastError();
+ fprintf(stderr, "DEBUG: %s: %s (%s)\n",
+ num_files > 1 ? "Create-Job" : "Print-Job",
+ ippErrorString(ipp_status), cupsLastErrorString());
+
if (ipp_status > IPP_OK_CONFLICT)
{
job_id = 0;
if (ipp_status == IPP_SERVICE_UNAVAILABLE ||
ipp_status == IPP_PRINTER_BUSY)
{
- _cupsLangPrintFilter(stderr, "INFO",
- _("Printer busy; will retry in 10 seconds."));
+ _cupsLangPrintFilter(stderr, "INFO", _("The printer is busy."));
sleep(10);
if (num_files == 0)
*/
_cupsLangPrintFilter(stderr, "ERROR",
- _("Print file was not accepted: %s"),
- cupsLastErrorString());
+ _("Print file was not accepted."));
if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN)
{
"Negotiate", 9))
auth_info_required = "negotiate";
}
+ else
+ sleep(10);
+
+ if (num_files == 0)
+ {
+ /*
+ * We can't re-submit when we have no files to print, so exit
+ * immediately with the right status code...
+ */
+
+ goto cleanup;
+ }
}
}
else if ((job_id_attr = ippFindAttribute(response, "job-id",
ippDelete(cupsGetResponse(http, resource));
ippDelete(request);
+ fprintf(stderr, "DEBUG: Send-Document: %s (%s)\n",
+ ippErrorString(cupsLastError()), cupsLastErrorString());
+
if (cupsLastError() > IPP_OK_CONFLICT)
{
ipp_status = cupsLastError();
_cupsLangPrintFilter(stderr, "ERROR",
- _("Unable to add file to job: %s"),
- cupsLastErrorString());
+ _("Unable to add document to print job."));
break;
}
}
break;
}
+ fprintf(stderr, "DEBUG: Get-Job-Attributes: %s (%s)\n",
+ ippErrorString(ipp_status), cupsLastErrorString());
+
if (ipp_status > IPP_OK_CONFLICT)
{
if (ipp_status != IPP_SERVICE_UNAVAILABLE &&
ippDelete(response);
_cupsLangPrintFilter(stderr, "ERROR",
- _("Unable to get job attributes: %s"),
- cupsLastErrorString());
+ _("Unable to get print job status."));
break;
}
}
return (CUPS_BACKEND_AUTH_REQUIRED);
else if (ipp_status == IPP_INTERNAL_ERROR)
return (CUPS_BACKEND_STOP);
- else if (ipp_status == IPP_SERVICE_UNAVAILABLE ||
- ipp_status == IPP_PRINTER_BUSY)
- return (CUPS_BACKEND_RETRY_CURRENT);
else if (ipp_status > IPP_OK_CONFLICT)
- return (CUPS_BACKEND_FAILED);
+ return (CUPS_BACKEND_RETRY_CURRENT);
else
{
_cupsLangPrintFilter(stderr, "INFO", _("Ready to print."));
ippDelete(cupsDoRequest(http, request, resource));
if (cupsLastError() > IPP_OK_CONFLICT)
- _cupsLangPrintFilter(stderr, "ERROR", _("Unable to cancel job: %s"),
- cupsLastErrorString());
+ _cupsLangPrintFilter(stderr, "ERROR", _("Unable to cancel print job."));
}
ippDelete(response);
}
+ fprintf(stderr, "DEBUG: Get-Printer-Attributes: %s (%s)\n",
+ ippErrorString(cupsLastError()), cupsLastErrorString());
+
/*
* Return the printer-state value...
*/
response = cupsDoRequest(http, request, monitor->resource);
+ fprintf(stderr, "DEBUG: Get-Job-Attributes: %s (%s)\n",
+ ippErrorString(cupsLastError()), cupsLastErrorString());
+
if ((attr = ippFindAttribute(response, "job-state",
IPP_TAG_ENUM)) != NULL)
monitor->job_state = (ipp_jstate_t)attr->values[0].integer;
msgstr ""
"Project-Id-Version: CUPS 1.5\n"
"Report-Msgid-Bugs-To: http://www.cups.org/str.php\n"
-"POT-Creation-Date: 2011-04-15 19:49-0700\n"
+"POT-Creation-Date: 2011-04-15 20:27-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "Cancel RSS Subscription"
msgstr ""
-#: backend/ipp.c:1633
+#: backend/ipp.c:1650
msgid "Canceling print job."
msgstr ""
msgid "Control file sent successfully."
msgstr ""
-#: backend/ipp.c:1067 backend/lpd.c:455
+#: backend/ipp.c:1070 backend/lpd.c:455
msgid "Copying print data."
msgstr ""
msgid "Print and Tear"
msgstr ""
-#: backend/ipp.c:1304
+#: backend/ipp.c:1320
#, c-format
msgid "Print file accepted - job ID %d."
msgstr ""
-#: backend/ipp.c:1297
+#: backend/ipp.c:1313
msgid "Print file accepted - job ID unknown."
msgstr ""
msgid "Print file sent."
msgstr ""
-#: backend/ipp.c:1272
-#, c-format
-msgid "Print file was not accepted: %s"
+#: backend/ipp.c:1277
+msgid "Print file was not accepted."
msgstr ""
#: filter/bannertops.c:648
msgid "Printer busy, will retry in 10 seconds."
msgstr ""
-#: backend/ipp.c:1128 backend/ipp.c:1252
-msgid "Printer busy; will retry in 10 seconds."
-msgstr ""
-
#: backend/parallel.c:234 backend/serial.c:256
msgid "Printer busy; will retry in 30 seconds."
msgstr ""
msgid "Printer did not respond after %d seconds."
msgstr ""
-#: backend/ipp.c:788 backend/ipp.c:795
+#: backend/ipp.c:791 backend/ipp.c:798
#, c-format
msgid "Printer does not support IPP/%d.%d, trying IPP/%s."
msgstr ""
msgid "Rank Owner Pri Job Files Total Size"
msgstr ""
-#: backend/ipp.c:1612 backend/socket.c:466 driver/rastertoescpx.c:1923
+#: backend/ipp.c:1629 backend/socket.c:466 driver/rastertoescpx.c:1923
#: driver/rastertopclx.c:1948 filter/rastertoepson.c:1152
#: filter/rastertohp.c:881 filter/rastertolabel.c:1307
msgid "Ready to print."
msgid "The print file could not be opened."
msgstr ""
-#: backend/ipp.c:805
+#: backend/ipp.c:808
msgid "The printer URI is incorrect or no longer exists."
msgstr ""
msgid "The printer is almost out of ink."
msgstr ""
-#: backend/ipp.c:656 backend/ipp.c:770 backend/ipp.c:849 backend/lpd.c:832
-#: backend/socket.c:368
+#: backend/ipp.c:656 backend/ipp.c:773 backend/ipp.c:851 backend/ipp.c:1129
+#: backend/ipp.c:1257 backend/lpd.c:832 backend/socket.c:368
msgid "The printer is busy."
msgstr ""
msgid "The printer is not connected."
msgstr ""
-#: backend/ipp.c:634 backend/ipp.c:667 backend/ipp.c:766 backend/lpd.c:811
+#: backend/ipp.c:634 backend/ipp.c:667 backend/ipp.c:769 backend/lpd.c:811
#: backend/lpd.c:852 backend/socket.c:347 backend/socket.c:380
msgid "The printer is not responding."
msgstr ""
msgid "Thermal Transfer Media"
msgstr ""
-#: backend/ipp.c:922 backend/ipp.c:931
+#: backend/ipp.c:925 backend/ipp.c:934 backend/ipp.c:1157
msgid "This printer does not conform to the IPP standard and may not work."
msgstr ""
-#: backend/ipp.c:747 backend/ipp.c:863
+#: backend/ipp.c:747 backend/ipp.c:866
msgid "This printer does not conform to the IPP standard. Please contact the manufacturer of your printer for assistance."
msgstr ""
msgid "Unable to add class:"
msgstr ""
-#: backend/ipp.c:1376
-#, c-format
-msgid "Unable to add file to job: %s"
+#: backend/ipp.c:1395
+msgid "Unable to add document to print job."
msgstr ""
#: scheduler/ipp.c:1628
msgid "Unable to cancel RSS subscription:"
msgstr ""
-#: backend/ipp.c:1654
-#, c-format
-msgid "Unable to cancel job: %s"
+#: backend/ipp.c:1671
+msgid "Unable to cancel print job."
msgstr ""
#: cgi-bin/admin.c:4021
msgid "Unable to connect to server"
msgstr ""
-#: backend/ipp.c:612 backend/ipp.c:971 backend/lpd.c:791
+#: backend/ipp.c:612 backend/ipp.c:974 backend/lpd.c:791
#: backend/parallel.c:219 backend/serial.c:241 backend/socket.c:327
#: backend/usb-unix.c:117
msgid "Unable to contact printer, queuing on next printer in class."
msgid "Unable to copy print file"
msgstr ""
-#: backend/ipp.c:1742
+#: backend/ipp.c:1761
msgid "Unable to create compressed print file"
msgstr ""
msgid "Unable to fork filter"
msgstr ""
-#: backend/ipp.c:1764
+#: backend/ipp.c:1783
msgid "Unable to generate compressed print file"
msgstr ""
msgid "Unable to get class status:"
msgstr ""
-#: backend/ipp.c:1461
-#, c-format
-msgid "Unable to get job attributes: %s"
-msgstr ""
-
#: cgi-bin/admin.c:1321
msgid "Unable to get list of printer drivers:"
msgstr ""
+#: backend/ipp.c:1482
+msgid "Unable to get print job status."
+msgstr ""
+
#: cgi-bin/admin.c:2959
msgid "Unable to get printer attributes:"
msgstr ""
msgid "Unable to get printer list:"
msgstr ""
-#: cgi-bin/printers.c:569
-msgid "Unable to get printer status:"
+#: backend/ipp.c:827
+msgid "Unable to get printer status."
msgstr ""
-#: backend/ipp.c:825
-#, c-format
-msgid "Unable to get printer status: %s"
+#: cgi-bin/printers.c:569
+msgid "Unable to get printer status:"
msgstr ""
#: cups/adminutil.c:565 cups/adminutil.c:769
msgid "Unable to open charset file"
msgstr ""
-#: backend/ipp.c:1748
+#: backend/ipp.c:1767
msgid "Unable to open compressed print file"
msgstr ""
msgid "Unable to open document #%d in job #%d."
msgstr ""
-#: backend/ipp.c:1754 backend/lpd.c:476 backend/parallel.c:150
+#: backend/ipp.c:1773 backend/lpd.c:476 backend/parallel.c:150
#: backend/serial.c:190 backend/socket.c:156 backend/usb.c:237
#: filter/bannertops.c:183 filter/gziptoany.c:71 filter/pstext.c:89
#: filter/pstext.c:249 filter/pstext.c:266 filter/pstops.c:299
msgid "Version uses indefinite length"
msgstr ""
-#: backend/ipp.c:1401
+#: backend/ipp.c:1419
msgid "Waiting for job to complete."
msgstr ""
"Print file accepted - job ID %d." = "Print file accepted - job ID %d.";
"Print file accepted - job ID unknown." = "Print file accepted - job ID unknown.";
"Print file sent." = "Print file sent.";
-"Print file was not accepted: %s" = "Print file was not accepted: %s";
+"Print file was not accepted." = "Print file was not accepted.";
"Printed For: " = "Printed For: ";
"Printed From: " = "Printed From: ";
"Printed On: " = "Printed On: ";
"Printer Paused" = "Printer Paused";
"Printer Settings" = "Printer Settings";
"Printer busy, will retry in 10 seconds." = "Printer busy, will retry in 10 seconds.";
-"Printer busy; will retry in 10 seconds." = "Printer busy; will retry in 10 seconds.";
"Printer busy; will retry in 30 seconds." = "Printer busy; will retry in 30 seconds.";
"Printer did not respond after %d seconds." = "Printer did not respond after %d seconds.";
"Printer does not support IPP/%d.%d, trying IPP/%s." = "Printer does not support IPP/%d.%d, trying IPP/%s.";
"Unable to access cupsd.conf file:" = "Unable to access cupsd.conf file:";
"Unable to add RSS subscription:" = "Unable to add RSS subscription:";
"Unable to add class:" = "Unable to add class:";
-"Unable to add file to job: %s" = "Unable to add file to job: %s";
+"Unable to add document to print job." = "Unable to add document to print job.";
"Unable to add job for destination \"%s\"." = "Unable to add job for destination \"%s\".";
"Unable to add printer:" = "Unable to add printer:";
"Unable to allocate memory for file types." = "Unable to allocate memory for file types.";
"Unable to allocate memory for page info" = "Unable to allocate memory for page info";
"Unable to allocate memory for pages array" = "Unable to allocate memory for pages array";
"Unable to cancel RSS subscription:" = "Unable to cancel RSS subscription:";
-"Unable to cancel job: %s" = "Unable to cancel job: %s";
+"Unable to cancel print job." = "Unable to cancel print job.";
"Unable to change printer-is-shared attribute:" = "Unable to change printer-is-shared attribute:";
"Unable to change printer:" = "Unable to change printer:";
"Unable to change server settings:" = "Unable to change server settings:";
"Unable to generate compressed print file" = "Unable to generate compressed print file";
"Unable to get class list:" = "Unable to get class list:";
"Unable to get class status:" = "Unable to get class status:";
-"Unable to get job attributes: %s" = "Unable to get job attributes: %s";
"Unable to get list of printer drivers:" = "Unable to get list of printer drivers:";
+"Unable to get print job status." = "Unable to get print job status.";
"Unable to get printer attributes:" = "Unable to get printer attributes:";
"Unable to get printer list:" = "Unable to get printer list:";
+"Unable to get printer status." = "Unable to get printer status.";
"Unable to get printer status:" = "Unable to get printer status:";
-"Unable to get printer status: %s" = "Unable to get printer status: %s";
"Unable to install Windows 2000 printer driver files (%d)." = "Unable to install Windows 2000 printer driver files (%d).";
"Unable to install Windows 9x printer driver files (%d)." = "Unable to install Windows 9x printer driver files (%d).";
"Unable to locate printer \"%s\"." = "Unable to locate printer \"%s\".";