From b5d170b55110bacc61a4aa8bf99df1afc303c5dc Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 16 May 2011 23:46:43 +0200 Subject: CLOSESOCKETFUNCTION: added Introduced the initial setup to allow closesocket callbacks by making sure sclose() is only ever called from one place in the libcurl source and still run all test cases fine. --- lib/http_proxy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/http_proxy.c') diff --git a/lib/http_proxy.c b/lib/http_proxy.c index 523f4aea8..08ca1006f 100644 --- a/lib/http_proxy.c +++ b/lib/http_proxy.c @@ -37,6 +37,7 @@ #include "rawstr.h" #include "progress.h" #include "non-ascii.h" +#include "connect.h" #define _MPRINTF_REPLACE /* use our functions only */ #include @@ -482,7 +483,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, if(closeConnection && data->req.newurl) { /* Connection closed by server. Don't use it anymore */ - sclose(conn->sock[sockindex]); + Curl_closesocket(conn, conn->sock[sockindex]); conn->sock[sockindex] = CURL_SOCKET_BAD; break; } -- cgit v1.2.3