]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Check for cancellation in a couple more spots, and return CUPS_BACKEND_OK when we
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 30 Mar 2012 17:17:52 +0000 (17:17 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 30 Mar 2012 17:17:52 +0000 (17:17 +0000)
are canceled since everything is OK.

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

backend/ipp.c

index ac13d0b387fcfebc5ba5c5f558a5cdc6f9ca2d18..92d4cfc24adbb0b267ddf92009d5d750b91549aa 100644 (file)
@@ -645,6 +645,9 @@ main(int  argc,                             /* I - Number of command-line args */
       update_reasons(NULL, "-connecting-to-device");
       return (CUPS_BACKEND_STOP);
     }
+
+    if (job_canceled)
+      return (CUPS_BACKEND_OK);
   }
 
   http = _httpCreate(hostname, port, addrlist, cupsEncryption(), AF_UNSPEC);
@@ -772,7 +775,9 @@ main(int  argc,                             /* I - Number of command-line args */
   }
   while (http->fd < 0);
 
-  if (job_canceled || !http)
+  if (job_canceled)
+    return (CUPS_BACKEND_OK);
+  else if (!http)
     return (CUPS_BACKEND_FAILED);
 
   update_reasons(NULL, "-connecting-to-device");
@@ -1092,7 +1097,10 @@ main(int  argc,                          /* I - Number of command-line args */
 
     report_printer_state(supported);
   }
-  while (ipp_status > IPP_OK_CONFLICT);
+  while (!job_canceled && ipp_status > IPP_OK_CONFLICT);
+
+  if (job_canceled)
+    return (CUPS_BACKEND_OK);
 
  /*
   * See if the printer is accepting jobs and is not stopped; if either