aboutsummaryrefslogtreecommitdiff
path: root/lib/ssh.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-02-07 22:00:33 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-02-07 22:00:33 +0000
commit04e6568a7e610b65a98fb6ac646a6c275164de75 (patch)
treeadcfb9618a678eb5d1806267a9b9477ac98ea52d /lib/ssh.c
parent7a39b98471fcf5c4fc61d6fbdaa69bdb1acb1115 (diff)
SCP upload done non-blocking
Diffstat (limited to 'lib/ssh.c')
-rw-r--r--lib/ssh.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ssh.c b/lib/ssh.c
index fafbd44c6..d002173ab 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -615,9 +615,15 @@ ssize_t Curl_scp_send(struct connectdata *conn, int sockindex,
* NOTE: we should not store nor rely on connection-related data to be
* in the SessionHandle struct
*/
+#ifdef LIBSSH2CHANNEL_EAGAIN
+ nwrite = (ssize_t)
+ libssh2_channel_writenb(conn->data->reqdata.proto.ssh->ssh_channel,
+ mem, len);
+#else
nwrite = (ssize_t)
libssh2_channel_write(conn->data->reqdata.proto.ssh->ssh_channel,
mem, len);
+#endif
(void)sockindex;
return nwrite;
}