diff options
-rw-r--r-- | CHANGES-2.0.txt | 1 | ||||
-rw-r--r-- | cups/ipp.c | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/CHANGES-2.0.txt b/CHANGES-2.0.txt index 2202d7545..c6f427bd1 100644 --- a/CHANGES-2.0.txt +++ b/CHANGES-2.0.txt @@ -36,6 +36,7 @@ CHANGES IN CUPS V2.0.2 error (STR #4559) - The ippfind and ipptool programs now correctly match hostnames with trailing dots (STR #4563) + - The ipptool timeout option did not work (STR #4515) CHANGES IN CUPS V2.0.1 diff --git a/cups/ipp.c b/cups/ipp.c index 20bd320f9..2536693da 100644 --- a/cups/ipp.c +++ b/cups/ipp.c @@ -6830,6 +6830,22 @@ ipp_read_http(http_t *http, /* I - Client connection */ break; } } + else if (http->used == 0 && http->timeout_value > 0) + { + /* + * Wait up to timeout seconds for more data on blocking sockets... + */ + + if (!httpWait(http, (int)(1000 * http->timeout_value))) + { + /* + * Signal no data... + */ + + bytes = -1; + break; + } + } if ((bytes = httpRead2(http, (char *)buffer, length - (size_t)tbytes)) < 0) { |