diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-08-16 13:51:55 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-08-16 13:51:55 +0200 |
commit | e707af1cd78f730e80da7b109ee33985d0ee3419 (patch) | |
tree | 8667a14c30b20684d4ea24cba3a372009b539294 /libssh/channels.c | |
parent | 380a70d650df617ff38841b0bba3b640c92f0d04 (diff) | |
download | libssh-e707af1cd78f730e80da7b109ee33985d0ee3419.tar.gz libssh-e707af1cd78f730e80da7b109ee33985d0ee3419.tar.xz libssh-e707af1cd78f730e80da7b109ee33985d0ee3419.zip |
Fix channel_get_exit_status bug reported by VicLee
It would return -1 if the channel received the exit status
and the close message at same time.
Diffstat (limited to 'libssh/channels.c')
-rw-r--r-- | libssh/channels.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libssh/channels.c b/libssh/channels.c index c006d24..ac49b38 100644 --- a/libssh/channels.c +++ b/libssh/channels.c @@ -1793,7 +1793,9 @@ int channel_get_exit_status(ssh_channel channel) { return -1; } if (channel->open == 0) { - return -1; + /* When a channel is closed, no exit status message can + * come anymore */ + break; } } |