[118719] trunk/base/src/pextlib1.0/curl.c
cal at macports.org
cal at macports.org
Tue Apr 8 18:08:59 PDT 2014
Revision: 118719
https://trac.macports.org/changeset/118719
Author: cal at macports.org
Date: 2014-04-08 18:08:59 -0700 (Tue, 08 Apr 2014)
Log Message:
-----------
base: restore handling for unexpected curl return values with more helpful output
Modified Paths:
--------------
trunk/base/src/pextlib1.0/curl.c
Modified: trunk/base/src/pextlib1.0/curl.c
===================================================================
--- trunk/base/src/pextlib1.0/curl.c 2014-04-09 00:52:53 UTC (rev 118718)
+++ trunk/base/src/pextlib1.0/curl.c 2014-04-09 01:08:59 UTC (rev 118719)
@@ -579,8 +579,15 @@
theResult = TCL_ERROR;
break;
}
+
+ if (info->msg != CURLMSG_DONE) {
+ snprintf(theErrorString, sizeof(theErrorString), "curl_multi_info_read() returned unexpected {.msg = %d, .data.result = %d}", info->msg, info->data.result);
+ Tcl_SetResult(interp, theErrorString, TCL_VOLATILE);
+ theResult = TCL_ERROR;
+ break;
+ }
- if (info->msg != CURLMSG_DONE || info->data.result != CURLE_OK) {
+ if (info->data.result != CURLE_OK) {
/* execution failed, use the error string */
Tcl_SetResult(interp, theErrorString, TCL_VOLATILE);
theResult = TCL_ERROR;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140408/8125a7cf/attachment.html>
More information about the macports-changes
mailing list