From 49f3160d69a9e568efdc370ac417841680c0b355 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 1 Apr 2010 22:39:15 +0200 Subject: fix SFTP download hang Matt Wixson found and fixed a bug in the SCP/SFTP area where the code treated a 0 return code from libssh2 to be the same as EAGAIN while in reality it isn't. The problem caused a hang in SFTP transfers from a MessageWay server. --- lib/sendf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sendf.c') diff --git a/lib/sendf.c b/lib/sendf.c index 964c9ed62..7f7c2cb9d 100644 --- a/lib/sendf.c +++ b/lib/sendf.c @@ -549,7 +549,7 @@ int Curl_read(struct connectdata *conn, /* connection data */ else if(conn->protocol & PROT_SFTP) nread = Curl_sftp_recv(conn, num, buffertofill, bytesfromsocket); #ifdef LIBSSH2CHANNEL_EAGAIN - if((nread == LIBSSH2CHANNEL_EAGAIN) || (nread == 0)) + if(nread == LIBSSH2CHANNEL_EAGAIN) /* EWOULDBLOCK */ return -1; #endif -- cgit v1.2.3