Origin: https://github.com/bagder/curl/commit/d4e000906ac4ef243258a5c9a819a7cde247d16a
Description: GnuTLS handshake: fix timeout
 Commit cbf4961 garbled the timeout handling while doing SSL
 handshaking (in an attempt at fixing another bug). This puts sanity
 back.
Bug-Ubuntu: https://launchpad.net/bugs/736216

Index: curl-7.21.6/lib/gtls.c
===================================================================
--- curl-7.21.6.orig/lib/gtls.c	2011-07-13 12:08:33.000000000 -0500
+++ curl-7.21.6/lib/gtls.c	2011-07-13 12:08:45.000000000 -0500
@@ -255,7 +255,8 @@
         connssl->connecting_state?sockfd:CURL_SOCKET_BAD;
 
       what = Curl_socket_ready(readfd, writefd,
-                               nonblocking?0:(int)timeout_ms?1000:timeout_ms);
+                               nonblocking?0:
+                               ((int)timeout_ms?timeout_ms:1000));
       if(what < 0) {
         /* fatal error */
         failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
