]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
The IPP backend now stops queues when the server configuration prevents
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Thu, 13 Dec 2012 16:38:56 +0000 (16:38 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Thu, 13 Dec 2012 16:38:56 +0000 (16:38 +0000)
successful job submission (STR #4125)

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

CHANGES-1.6.txt
backend/ipp.c

index c59c1ca548fbc7f48ad4cebf3130e5a12808c8c6..2fa43e7bdaebb2e96ee1a3be0a701c2cb542f3fd 100644 (file)
@@ -7,6 +7,8 @@ CHANGES IN CUPS V1.6.2
        - Security: All file, directory, user, and group settings are now stored
          in a separate cups-files.conf configuration file that cannot be set
          through the CUPS web interface or APIs (STR #4223)
+       - The IPP backend now stops queues when the server configuration
+         prevents successful job submission (STR #4125)
        - The XML output of ipptool contained empty dictionaries (STR #4136)
        - The scheduler did not delete job control backup files (STR #4244)
        - cupsGetPPD3 could return a local PPD instead of the correct remote
index 05843eadc902f891a2b7d853e85a6493862d2d3a..c61d6c8b97b009771ae91fa8424ebec33a573136 100644 (file)
@@ -1354,8 +1354,9 @@ main(int  argc,                           /* I - Number of command-line args */
  /*
   * If the printer only claims to support IPP/1.0, or if the user specifically
   * included version=1.0 in the URI, then do not try to use Create-Job or
-  * Send-Document.  This is another dreaded compatibility hack, but unfortunately
-  * there are enough broken printers out there that we need this for now...
+  * Send-Document.  This is another dreaded compatibility hack, but
+  * unfortunately there are enough broken printers out there that we need
+  * this for now...
   */
 
   if (version == 10)
@@ -1812,6 +1813,27 @@ main(int  argc,                          /* I - Number of command-line args */
 
       goto cleanup;
     }
+    else if (ipp_status == IPP_STATUS_ERROR_CUPS_UPGRADE_REQUIRED)
+    {
+     /*
+      * Server is configured incorrectly; the policy for Create-Job and
+      * Send-Document has to be the same (auth or no auth, encryption or
+      * no encryption).  Force the queue to stop since printing will never
+      * work.
+      */
+
+      fputs("DEBUG: The server or printer is configured incorrectly.\n",
+            stderr);
+      fputs("DEBUG: The policy for Create-Job and Send-Document must have the "
+            "same authentication and encryption requirements.\n", stderr);
+
+      ipp_status = IPP_STATUS_ERROR_INTERNAL;
+
+      if (job_id > 0)
+       cancel_job(http, uri, job_id, resource, argv[2], version);
+
+      goto cleanup;
+    }
     else if (ipp_status == IPP_NOT_FOUND)
     {
      /*