aboutsummaryrefslogtreecommitdiff
path: root/lib/sendf.c
diff options
context:
space:
mode:
authorHoward Chu <hyc@highlandsun.com>2010-05-11 22:48:38 +0200
committerDaniel Stenberg <daniel@haxx.se>2010-05-11 22:48:38 +0200
commitbc8fc9803fbd0fa9daf0dba796d42d03faf49120 (patch)
treeedd313accc3ad85ef2b4826f5ffa9e335da86ebd /lib/sendf.c
parent016ce4b1daa0f8d44a0da7105e1e1c97531e8b87 (diff)
sendrecv: make them two pairs of send/recv to properly deal with FTPS
FTP(S) use two connections that can be set to different recv and send functions independently, so by introducing recv+send pairs in the same manner we already have sockets/connections we can work with FTPS fine. This commit fixes the FTPS regression introduced in change d64bd82.
Diffstat (limited to 'lib/sendf.c')
-rw-r--r--lib/sendf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sendf.c b/lib/sendf.c
index ffd01c744..94bcb9c78 100644
--- a/lib/sendf.c
+++ b/lib/sendf.c
@@ -251,7 +251,7 @@ CURLcode Curl_write(struct connectdata *conn,
CURLcode curlcode = CURLE_OK;
int num = (sockfd == conn->sock[SECONDARYSOCKET]);
- bytes_written = conn->send(conn, num, mem, len, &curlcode);
+ bytes_written = conn->send[num](conn, num, mem, len, &curlcode);
*written = bytes_written;
if(-1 != bytes_written)
@@ -576,7 +576,7 @@ CURLcode Curl_read(struct connectdata *conn, /* connection data */
buffertofill = buf;
}
- nread = conn->recv(conn, num, buffertofill, bytesfromsocket, &curlcode);
+ nread = conn->recv[num](conn, num, buffertofill, bytesfromsocket, &curlcode);
if(nread == -1)
return curlcode;