[71235] trunk/base/src/pextlib1.0/curl.c

raimue at macports.org raimue at macports.org
Sun Sep 5 14:03:05 PDT 2010


Revision: 71235
          http://trac.macports.org/changeset/71235
Author:   raimue at macports.org
Date:     2010-09-05 14:03:05 -0700 (Sun, 05 Sep 2010)
Log Message:
-----------
Revert r71103 and use CURLOPT_CONNECTTIMEOUT instead of CURLOPT_TIMEOUT for all
curl commands. According to the man page, this is what we actually want:
"maximum time in seconds that you allow the connection to the server to take.
This only limits the connection phase, once it has connected, this option is
of no more use."

Revision Links:
--------------
    http://trac.macports.org/changeset/71103

Modified Paths:
--------------
    trunk/base/src/pextlib1.0/curl.c

Modified: trunk/base/src/pextlib1.0/curl.c
===================================================================
--- trunk/base/src/pextlib1.0/curl.c	2010-09-05 20:52:49 UTC (rev 71234)
+++ trunk/base/src/pextlib1.0/curl.c	2010-09-05 21:03:05 UTC (rev 71235)
@@ -272,6 +272,13 @@
 			break;
 		}
 
+		/* set timeout on connections */
+		theCurlCode = curl_easy_setopt(theHandle, CURLOPT_CONNECTTIMEOUT, _CURL_CONNECTION_TIMEOUT);
+		if (theCurlCode != CURLE_OK) {
+			theResult = SetResultFromCurlErrorCode(interp, theCurlCode);
+			break;
+		}
+
 		/* set minimum connection speed */
 		theCurlCode = curl_easy_setopt(theHandle, CURLOPT_LOW_SPEED_LIMIT, _CURL_MINIMUM_XFER_SPEED);
 		if (theCurlCode != CURLE_OK) {
@@ -559,7 +566,7 @@
 		}
 
 		/* set timeout on connections */
-		theCurlCode = curl_easy_setopt(theHandle, CURLOPT_TIMEOUT, _CURL_CONNECTION_TIMEOUT);
+		theCurlCode = curl_easy_setopt(theHandle, CURLOPT_CONNECTTIMEOUT, _CURL_CONNECTION_TIMEOUT);
 		if (theCurlCode != CURLE_OK) {
 			theResult = SetResultFromCurlErrorCode(interp, theCurlCode);
 			break;
@@ -787,7 +794,7 @@
 		}
 
 		/* set timeout on connections */
-		theCurlCode = curl_easy_setopt(theHandle, CURLOPT_TIMEOUT, _CURL_CONNECTION_TIMEOUT);
+		theCurlCode = curl_easy_setopt(theHandle, CURLOPT_CONNECTTIMEOUT, _CURL_CONNECTION_TIMEOUT);
 		if (theCurlCode != CURLE_OK) {
 			theResult = SetResultFromCurlErrorCode(interp, theCurlCode);
 			break;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100905/0fe994de/attachment.html>


More information about the macports-changes mailing list