aboutsummaryrefslogtreecommitdiff
path: root/lib/sendf.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-11-24 22:14:39 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-11-24 22:14:39 +0000
commita634f644005cbe2b3dea2b84328d605ec3474054 (patch)
tree477b5f395ae34ee2071fb078deee58f9eed0cdc7 /lib/sendf.c
parentbcd8a3b2403d6269a121c469273880021f2cfb20 (diff)
James Housley did lots of work and introduced SFTP downloads.
Diffstat (limited to 'lib/sendf.c')
-rw-r--r--lib/sendf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/sendf.c b/lib/sendf.c
index ec2f53da0..ddd8b9b5c 100644
--- a/lib/sendf.c
+++ b/lib/sendf.c
@@ -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)