mirror of
https://github.com/curl/curl.git
synced 2026-08-26 15:43:33 +03:00
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.
This commit is contained in:
parent
016ce4b1da
commit
bc8fc9803f
10 changed files with 26 additions and 22 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue