From 9780f22866461e1376ffc48853a7f0d8c6b2f7a2 Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Sun, 13 Dec 2009 20:49:47 +0100 Subject: Made packet_wait issue warnings --- libssh/channels.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'libssh/channels.c') diff --git a/libssh/channels.c b/libssh/channels.c index afd17717..59290c62 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) { -- cgit