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:
Howard Chu 2010-05-11 22:48:38 +02:00 committed by Daniel Stenberg
parent 016ce4b1da
commit bc8fc9803f
10 changed files with 26 additions and 22 deletions

View file

@ -2493,11 +2493,11 @@ static CURLcode ssh_connect(struct connectdata *conn, bool *done)
return result;
if(conn->protocol & PROT_SCP) {
conn->recv = scp_recv;
conn->send = scp_send;
conn->recv[FIRSTSOCKET] = scp_recv;
conn->send[FIRSTSOCKET] = scp_send;
} else {
conn->recv = sftp_recv;
conn->send = sftp_send;
conn->recv[FIRSTSOCKET] = sftp_recv;
conn->send[FIRSTSOCKET] = sftp_send;
}
ssh = &conn->proto.sshc;