aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2009-08-09 00:20:42 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2009-08-09 00:20:42 +0200
commit807cb635c1896c811481399a55e9739cfa999c81 (patch)
treee6e79db5f9930e6428896bcdf9b69b9af2d6a6dc
parent3ad559cc231bf6afb1eeb333a854a64c50400e2c (diff)
downloadlibssh-807cb635c1896c811481399a55e9739cfa999c81.tar.gz
libssh-807cb635c1896c811481399a55e9739cfa999c81.tar.xz
libssh-807cb635c1896c811481399a55e9739cfa999c81.zip
Fixed channel_poll broken when delayed EOF recvd
Previous code returned SSH_EOF even if data was left in buffer
-rw-r--r--libssh/channels.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libssh/channels.c b/libssh/channels.c
index 84a222eb..c603d7ab 100644
--- a/libssh/channels.c
+++ b/libssh/channels.c
@@ -1748,6 +1748,9 @@ int channel_poll(ssh_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;