diff options
author | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2015-02-01 04:50:11 +0000 |
---|---|---|
committer | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2015-02-01 04:50:11 +0000 |
commit | ba7900a5298b90edccb8d2cc6afa16b130d6a2d0 (patch) | |
tree | d441f829fba4901263aeb396395570fce4a996a7 | |
parent | e9f9e650dafabb2bb57b064dda87a4f4a79a7935 (diff) |
The ipptool timeout option did not work (STR #4515)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12466 a1ca3aef-8c08-0410-bb20-df032aa958be
-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) { |