From 2c4bbe51dd614725e21e479ce4879fc90182bd90 Mon Sep 17 00:00:00 2001 From: Vic Lee Date: Sun, 16 Aug 2009 18:28:05 +0800 Subject: Fix return code from packet_wait in channel_request Signed-off-by: Andreas Schneider --- libssh/channels.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libssh/channels.c b/libssh/channels.c index c536842b..473d1f79 100644 --- a/libssh/channels.c +++ b/libssh/channels.c @@ -1057,7 +1057,7 @@ static int channel_request(ssh_channel channel, const char *request, } rc = packet_wait(session, SSH2_MSG_CHANNEL_SUCCESS, 1); - if (rc) { + if (rc == SSH_ERROR) { if (session->in_packet.type == SSH2_MSG_CHANNEL_FAILURE) { ssh_log(session, SSH_LOG_PACKET, "%s channel request failed", request); -- cgit