Re: [MOD] STR #4093: CUPS continues to request "validate-job" rapidly when document-format "application/octet-stream" is refused with "client-error-document-format-not-supported"

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]

Attached file "str4093-1.5.patch"...

Link: http://www.cups.org/str.php?L4093
Version: 1.5.0
Fix Version: 1.6-current (r10499)

_______________________________________________
cups-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/cups-bugs
str4093-1.5.patch (text/plain, 1.3 KB)
Index: backend/ipp.c
===================================================================
--- backend/ipp.c	(revision 10498)
+++ backend/ipp.c	(working copy)
@@ -1298,6 +1298,8 @@
       _cupsLangPrintFilter(stderr, "INFO", _("The printer is busy."));
       sleep(10);
     }
+    else if (ipp_status == IPP_DOCUMENT_FORMAT)
+      goto cleanup;
     else if (ipp_status == IPP_FORBIDDEN ||
 	     ipp_status == IPP_AUTHENTICATION_CANCELED)
     {
@@ -1864,12 +1866,17 @@
     return (CUPS_BACKEND_AUTH_REQUIRED);
   else if (ipp_status == IPP_INTERNAL_ERROR)
     return (CUPS_BACKEND_STOP);
-  else if (ipp_status == IPP_DOCUMENT_FORMAT ||
-           ipp_status == IPP_CONFLICT)
+  else if (ipp_status == IPP_CONFLICT)
     return (CUPS_BACKEND_FAILED);
-  else if (ipp_status == IPP_REQUEST_VALUE)
+  else if (ipp_status == IPP_REQUEST_VALUE ||
+           ipp_status == IPP_DOCUMENT_FORMAT)
   {
-    _cupsLangPrintFilter(stderr, "ERROR", _("Print job too large."));
+    if (ipp_status == IPP_REQUEST_VALUE)
+      _cupsLangPrintFilter(stderr, "ERROR", _("Print job too large."));
+    else
+      _cupsLangPrintFilter(stderr, "ERROR",
+                           _("Printer cannot print supplied content."));
+
     return (CUPS_BACKEND_CANCEL);
   }
   else if (ipp_status > IPP_OK_CONFLICT && ipp_status != IPP_ERROR_JOB_CANCELED)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.