]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
SCP upload done non-blocking
authorDaniel Stenberg <daniel@haxx.se>
Wed, 7 Feb 2007 22:00:33 +0000 (22:00 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 7 Feb 2007 22:00:33 +0000 (22:00 +0000)
lib/ssh.c

index fafbd44c6982744601ea011b8be324ee1e2ac269..d002173abaf4338ebd51df492c34ac42bcb3bf05 100644 (file)
--- 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;
 }