From: mike Date: Tue, 9 Apr 2013 19:05:29 +0000 (+0000) Subject: Fix authentication/delayed read bug. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5cb741ef6c5f613fed998b3d98dfa9885f2a02f7;p=thirdparty%2Fcups.git Fix authentication/delayed read bug. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@10941 7a7537e8-13f0-0310-91df-b6672ffda945 --- diff --git a/cups/http.c b/cups/http.c index 680c328be0..046b20c522 100644 --- a/cups/http.c +++ b/cups/http.c @@ -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) diff --git a/scheduler/client.c b/scheduler/client.c index 3713d156fc..057ad2f3a1 100644 --- a/scheduler/client.c +++ b/scheduler/client.c @@ -2128,6 +2128,8 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */ return; } + if (data_ready(con)) + continue; break; } else diff --git a/test/ipptool.c b/test/ipptool.c index 99f3b5236a..166336cd24 100644 --- a/test/ipptool.c +++ b/test/ipptool.c @@ -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; } }