]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix authentication/delayed read bug.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Tue, 9 Apr 2013 19:05:29 +0000 (19:05 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Tue, 9 Apr 2013 19:05:29 +0000 (19:05 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@10941 7a7537e8-13f0-0310-91df-b6672ffda945

cups/http.c
scheduler/client.c
test/ipptool.c

index 680c328be0593e6a6e6bbe4559f1362d5b593638..046b20c52241b04258c7fc9d00db2f86d416aa43 100644 (file)
@@ -2358,6 +2358,9 @@ httpRead2(http_t *http,                   /* I - Connection to server */
 
     if (http->state == HTTP_STATE_POST_RECV)
       http->state ++;
+    else if (http->state == HTTP_STATE_GET_SEND ||
+             http->state == HTTP_STATE_POST_SEND)
+      http->state = HTTP_STATE_WAITING;
     else
       http->state = HTTP_STATE_STATUS;
 
@@ -4602,7 +4605,7 @@ http_read(http_t *http,                   /* I - Connection to server */
                CUPS_LLCAST bytes));
 #ifdef DEBUG
   if (bytes > 0)
-    http_debug_hex("http_read", http->buffer, (int)bytes);
+    http_debug_hex("http_read", buffer, (int)bytes);
 #endif /* DEBUG */
 
   if (bytes < 0)
index 3713d156fc4a484c7a318c1c8968185b052c89f2..057ad2f3a167a6cd21839d2dc12c76efefbd1ef5 100644 (file)
@@ -2128,6 +2128,8 @@ cupsdReadClient(cupsd_client_t *con)      /* I - Client to read from */
                return;
              }
 
+             if (data_ready(con))
+               continue;
              break;
             }
            else
index 99f3b5236abd07769c61f0e02e9d6e5b9d01f2b4..166336cd24768bb07af65c0646a054d6b0862baa 100644 (file)
@@ -2474,6 +2474,10 @@ do_tests(_cups_vars_t *vars,             /* I - Variables */
          else if (status != HTTP_OK)
          {
            httpFlush(http);
+
+           if (status == HTTP_STATUS_UNAUTHORIZED)
+             continue;
+
            break;
          }
        }