From: Daniel Stenberg Date: Wed, 7 Feb 2007 22:00:33 +0000 (+0000) Subject: SCP upload done non-blocking X-Git-Tag: curl-7_16_2~346 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04e6568a7e610b65a98fb6ac646a6c275164de75;p=thirdparty%2Fcurl.git SCP upload done non-blocking --- diff --git a/lib/ssh.c b/lib/ssh.c index fafbd44c69..d002173aba 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; }