diff options
author | Howard Chu <hyc@highlandsun.com> | 2010-05-11 22:48:38 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2010-05-11 22:48:38 +0200 |
commit | bc8fc9803fbd0fa9daf0dba796d42d03faf49120 (patch) | |
tree | edd313accc3ad85ef2b4826f5ffa9e335da86ebd /lib/security.c | |
parent | 016ce4b1daa0f8d44a0da7105e1e1c97531e8b87 (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/security.c')
-rw-r--r-- | lib/security.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/security.c b/lib/security.c index 03b1be251..eceb013b5 100644 --- a/lib/security.c +++ b/lib/security.c @@ -466,8 +466,10 @@ Curl_sec_login(struct connectdata *conn) conn->mech = *m; conn->sec_complete = 1; if (conn->data_prot != prot_clear) { - conn->recv = sec_read; - conn->send = _sec_send; + conn->recv[FIRSTSOCKET] = sec_read; + conn->send[FIRSTSOCKET] = _sec_send; + conn->recv[SECONDARYSOCKET] = sec_read; + conn->send[SECONDARYSOCKET] = _sec_send; } conn->command_prot = prot_safe; /* Set the requested protection level */ |