]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
The ipptool timeout option did not work (STR #4515)
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Sun, 1 Feb 2015 04:50:11 +0000 (04:50 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Sun, 1 Feb 2015 04:50:11 +0000 (04:50 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12466 a1ca3aef-8c08-0410-bb20-df032aa958be

CHANGES-2.0.txt
cups/ipp.c

index 2202d7545113f7d510893627404d69f079a044f4..c6f427bd115623d9557d5bc702f6040e12e2aace 100644 (file)
@@ -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
index 20bd320f94f11209e284fe806456f4ca482f1a8d..2536693dab1a07ed1be1e1d66970d08c7c50e700 100644 (file)
@@ -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)
     {