]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
When possible, the IPP backend now stops sending job data early on a cancel.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 9 Sep 2011 15:38:24 +0000 (15:38 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 9 Sep 2011 15:38:24 +0000 (15:38 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@9976 7a7537e8-13f0-0310-91df-b6672ffda945

CHANGES-1.5.txt
backend/ipp.c

index b364594cf7f3e370d13d5311b072a846ae245039..1a1d49119ff4647a2252422f7a6528cfdd43b56c 100644 (file)
@@ -4,6 +4,8 @@ CHANGES-1.5.txt
 CHANGES IN CUPS V1.5.1
 
        - Documentation updates (STR #3885)
+       - When possible, the IPP backend now stops sending job data early on a
+         cancel.
        - cupsSendRequest and cupsWriteRequestData did not properly read all
          HTTP headers, preventing authentication and encryption upgrades from
          working in all cases.
index 7ba7244a39f8d7097cbf78fb01d9f17e2219a56b..dbd3ddad8be8145417ca2bf1e989e600bed6e695 100644 (file)
@@ -1340,7 +1340,8 @@ main(int  argc,                           /* I - Number of command-line args */
          http_status = cupsWriteRequestData(http, buffer, bytes);
         }
 
-        while (http_status == HTTP_CONTINUE)
+        while (http_status == HTTP_CONTINUE &&
+               (!job_canceled || compatsize > 0))
        {
         /*
          * Check for side-channel requests and more print data...
@@ -1508,7 +1509,8 @@ main(int  argc,                           /* I - Number of command-line args */
        if (http_status == HTTP_CONTINUE && request->state == IPP_DATA &&
            (fd = open(files[i], O_RDONLY)) >= 0)
        {
-         while ((bytes = read(fd, buffer, sizeof(buffer))) > 0)
+         while (!job_canceled &&
+                (bytes = read(fd, buffer, sizeof(buffer))) > 0)
          {
            if (cupsWriteRequestData(http, buffer, bytes) != HTTP_CONTINUE)
              break;