diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-12-13 20:49:47 +0100 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-12-13 20:49:47 +0100 |
commit | 9780f22866461e1376ffc48853a7f0d8c6b2f7a2 (patch) | |
tree | 89d8346f625a7fe45d4b7436311702c5bc3e11ce /libssh/channels.c | |
parent | 46b2b99f6330c97478d1fcbf85e1ce8ff6c5d6d3 (diff) | |
download | libssh-9780f22866461e1376ffc48853a7f0d8c6b2f7a2.tar.gz libssh-9780f22866461e1376ffc48853a7f0d8c6b2f7a2.tar.xz libssh-9780f22866461e1376ffc48853a7f0d8c6b2f7a2.zip |
Made packet_wait issue warnings
Diffstat (limited to 'libssh/channels.c')
-rw-r--r-- | libssh/channels.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/libssh/channels.c b/libssh/channels.c index afd1771..59290c6 100644 --- a/libssh/channels.c +++ b/libssh/channels.c @@ -1799,13 +1799,7 @@ int channel_read_buffer(ssh_channel channel, ssh_buffer buffer, uint32_t count, /* Stop reading when buffer is full enough */ break; } - - if ((packet_read(session)) != SSH_OK || - (packet_translate(session) != SSH_OK)) { - leave_function(); - return -1; - } - packet_parse(session); + ssh_handle_packets(session); } if(channel->local_window < WINDOWLIMIT) { @@ -1911,12 +1905,7 @@ int channel_read(ssh_channel channel, void *dest, uint32_t count, int is_stderr) break; } - if ((packet_read(session)) != SSH_OK || - (packet_translate(session) != SSH_OK)) { - leave_function(); - return -1; - } - packet_parse(session); + ssh_handle_packets(session); } if (channel->local_window < WINDOWLIMIT) { |