summaryrefslogtreecommitdiff
path: root/lib/http_proxy.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-05-16 23:46:43 +0200
committerDaniel Stenberg <daniel@haxx.se>2011-05-18 22:56:46 +0200
commitb5d170b55110bacc61a4aa8bf99df1afc303c5dc (patch)
tree916f3bf3ebe145d00fa4a785658d19131d432cb7 /lib/http_proxy.c
parentd4e000906ac4ef243258a5c9a819a7cde247d16a (diff)
downloadcurl-b5d170b55110bacc61a4aa8bf99df1afc303c5dc.tar.gz
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.
Diffstat (limited to 'lib/http_proxy.c')
-rw-r--r--lib/http_proxy.c3
1 files changed, 2 insertions, 1 deletions
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 <curl/mprintf.h>
@@ -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;
}