James Housley did lots of work and introduced SFTP downloads.

This commit is contained in:
Daniel Stenberg
2006-11-24 22:14:39 +00:00
parent bcd8a3b240
commit a634f64400
8 changed files with 619 additions and 130 deletions

View File

@@ -364,6 +364,8 @@ CURLcode Curl_write(struct connectdata *conn,
#ifdef USE_LIBSSH2
else if (conn->protocol & PROT_SCP)
bytes_written = Curl_scp_send(conn, num, mem, len);
else if (conn->protocol & PROT_SFTP)
bytes_written = Curl_sftp_send(conn, num, mem, len);
#endif /* !USE_LIBSSH2 */
else if(conn->sec_complete)
/* only TRUE if krb4 enabled */
@@ -522,6 +524,9 @@ int Curl_read(struct connectdata *conn, /* connection data */
/* TODO: return CURLE_OK also for nread <= 0
read failures and timeouts ? */
}
else if (conn->protocol & PROT_SFTP) {
nread = Curl_sftp_recv(conn, num, conn->master_buffer, bytesfromsocket);
}
#endif /* !USE_LIBSSH2 */
else {
if(conn->sec_complete)