aboutsummaryrefslogtreecommitdiff
path: root/libssh
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2009-08-09 00:20:42 +0200
committerAndreas Schneider <mail@cynapses.org>2009-08-10 23:37:53 +0200
commit9abdc5ae2aa61eb7ef3b7686e9b8341ea003328a (patch)
tree7a077cb21739a3a3060da22c503acac17b286386 /libssh
parente8e874909fa89652f7981d9ea14930dddd2bee4a (diff)
downloadlibssh-9abdc5ae2aa61eb7ef3b7686e9b8341ea003328a.tar.gz
libssh-9abdc5ae2aa61eb7ef3b7686e9b8341ea003328a.tar.xz
libssh-9abdc5ae2aa61eb7ef3b7686e9b8341ea003328a.zip
Fixed channel_poll broken when delayed EOF recvd
Previous code returned SSH_EOF even if data was left in buffer
Diffstat (limited to 'libssh')
-rw-r--r--libssh/channels.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libssh/channels.c b/libssh/channels.c
index 6e56833e..d10860ec 100644
--- a/libssh/channels.c
+++ b/libssh/channels.c
@@ -1618,6 +1618,9 @@ int channel_poll(CHANNEL *channel, int is_stderr){
}
}
+ if (buffer_get_rest_len(stdbuf) > 0)
+ return buffer_get_rest_len(stdbuf);
+
if (channel->remote_eof) {
leave_function();
return SSH_EOF;