From: Daniel Stenberg Date: Wed, 9 Feb 2011 14:36:36 +0000 (+0100) Subject: CURLOPT_SOCKOPTFUNCTION: return proper error code X-Git-Tag: curl-7_21_4~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b370fcd300902d1310696088decf53ee2a286b95;p=thirdparty%2Fcurl.git CURLOPT_SOCKOPTFUNCTION: return proper error code When the callback returns an error, this function must make sure to return CURLE_ABORTED_BY_CALLBACK properly and not CURLE_OK as before to allow the callback to properly abort the operation. --- diff --git a/lib/connect.c b/lib/connect.c index bcc1ed74ab..fb21fb7df5 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -926,7 +926,7 @@ singleipconnect(struct connectdata *conn, CURLSOCKTYPE_IPCXN); if(error) { sclose(sockfd); /* close the socket and bail out */ - return res; + return CURLE_ABORTED_BY_CALLBACK; } }