aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-05-16 23:52:15 +0200
committerDaniel Stenberg <daniel@haxx.se>2011-05-18 22:56:46 +0200
commit60f0ebbdc9fbddccaa4e2fcd1dce3d3a05f234ed (patch)
treec200444ea0b9906be890a6b24b01b7cea6a9fc2e /lib
parentb5d170b55110bacc61a4aa8bf99df1afc303c5dc (diff)
CLOSESOCKETFUNCTION: use the callback
Fix the return type of the callback to match close() and make use of it.
Diffstat (limited to 'lib')
-rw-r--r--lib/connect.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/connect.c b/lib/connect.c
index 2802c5d61..2dcf122c1 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -1172,7 +1172,8 @@ curl_socket_t Curl_getconnectinfo(struct SessionHandle *data,
int Curl_closesocket(struct connectdata *conn,
curl_socket_t sock)
{
- (void)conn;
-
- return sclose(sock);
+ if(conn && conn->fclosesocket)
+ return conn->fclosesocket(conn->closesocket_client, sock);
+ else
+ return sclose(sock);
}