diff options
author | Daniel Stenberg <daniel@haxx.se> | 2010-04-01 22:39:15 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2010-04-01 22:39:15 +0200 |
commit | 49f3160d69a9e568efdc370ac417841680c0b355 (patch) | |
tree | 07d516589bb3a4acb8a082bb73fd9f272d1d1795 /lib | |
parent | e78e584035df0edb202658dfda1ee22478e14e52 (diff) |
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sendf.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 |