]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Sending a document in an unsupported format to an IPP printer now automatically
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 23 May 2012 00:45:51 +0000 (00:45 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 23 May 2012 00:45:51 +0000 (00:45 +0000)
cancels the job (STR #4093)

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

CHANGES-1.5.txt
backend/ipp.c

index 68f56c33480b0e473829772b2edcd9a44cc74f7a..3fc2efc46d1c31fbc2bb15f8266f0e19ff23f88c 100644 (file)
@@ -3,6 +3,8 @@ CHANGES-1.5.txt
 
 CHANGES IN CUPS V1.5.4
 
+       - Sending a document in an unsupported format to an IPP printer now
+         automatically cancels the job (STR #4093)
        - Fix some error reporting issues when printing from /dev/null and
          other unusual situations (STR #4015)
        - The scheduler now sets the CUPS_MAX_MESSAGE environment variable for
index 267228c68452fc932df62efe7d0d47f78d4d0f5a..7877ab8d80067fc5f5d9307cc03fa72e9992fece 100644 (file)
@@ -1305,6 +1305,8 @@ main(int  argc,                           /* I - Number of command-line args */
       _cupsLangPrintFilter(stderr, "INFO", _("The printer is in use."));
       sleep(10);
     }
+    else if (ipp_status == IPP_DOCUMENT_FORMAT)
+      goto cleanup;
     else if (ipp_status == IPP_FORBIDDEN ||
             ipp_status == IPP_AUTHENTICATION_CANCELED)
     {
@@ -1871,13 +1873,16 @@ main(int  argc,                         /* I - Number of command-line args */
     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 || job_canceled < 0)
+  else if (ipp_status == IPP_REQUEST_VALUE ||
+           ipp_status == IPP_DOCUMENT_FORMAT || job_canceled < 0)
   {
     if (ipp_status == IPP_REQUEST_VALUE)
       _cupsLangPrintFilter(stderr, "ERROR", _("Print job too large."));
+    else if (ipp_status == IPP_DOCUMENT_FORMAT)
+      _cupsLangPrintFilter(stderr, "ERROR",
+                           _("Printer cannot print supplied content."));
     else
       _cupsLangPrintFilter(stderr, "ERROR", _("Print job canceled at printer."));