<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/d0c4cfbfdf67093daa23f3d34a8646d631816719">https://github.com/macports/macports-base/commit/d0c4cfbfdf67093daa23f3d34a8646d631816719</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit d0c4cfbfdf67093daa23f3d34a8646d631816719
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Tue Feb 21 08:30:29 2017 +1100
<span style='display:block; white-space:pre;color:#404040;'> Fix curl timeout calculations
</span>---
src/pextlib1.0/curl.c | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/pextlib1.0/curl.c b/src/pextlib1.0/curl.c
</span><span style='display:block; white-space:pre;color:#808080;'>index 28a3265..1fa3651 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/pextlib1.0/curl.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/pextlib1.0/curl.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -500,10 +500,6 @@ CurlFetchCmd(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[])
</span>
long curl_timeout = -1;
<span style='display:block; white-space:pre;background:#ffe0e0;'>- /* use at most half a second as timeout */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- timeout.tv_sec = 0;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- timeout.tv_usec = 500 * 1000;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> /* get the next timeout */
theCurlMCode = curl_multi_timeout(theMHandle, &curl_timeout);
if (theCurlMCode != CURLM_OK) {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -514,14 +510,11 @@ CurlFetchCmd(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[])
</span> timeout.tv_sec = 1;
timeout.tv_usec = 0;
/* convert the timeout into a suitable format for select(2) and
<span style='display:block; white-space:pre;background:#ffe0e0;'>- * limit the timeout to 500 msecs at most */
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (curl_timeout > 0) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- timeout.tv_sec = curl_timeout / 1000;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (timeout.tv_sec > 1) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- timeout.tv_sec = 1;
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- timeout.tv_usec = (curl_timeout % 1000) * 1000;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * limit the timeout to 1 second at most */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (curl_timeout >= 0 && curl_timeout < 1000) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ timeout.tv_sec = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* convert ms to us */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ timeout.tv_usec = curl_timeout * 1000;
</span> }
/* get the fd sets for select(2) */
</pre><pre style='margin:0'>
</pre>