diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-08-09 00:20:42 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-08-09 00:20:42 +0200 |
commit | 807cb635c1896c811481399a55e9739cfa999c81 (patch) | |
tree | e6e79db5f9930e6428896bcdf9b69b9af2d6a6dc /libssh/channels.c | |
parent | 3ad559cc231bf6afb1eeb333a854a64c50400e2c (diff) | |
download | libssh-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
Diffstat (limited to 'libssh/channels.c')
-rw-r--r-- | libssh/channels.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libssh/channels.c b/libssh/channels.c index 84a222e..c603d7a 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; |