aboutsummaryrefslogtreecommitdiff
path: root/libssh
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2009-02-04 19:21:20 +0000
committerAris Adamantiadis <aris@0xbadc0de.be>2009-02-04 19:21:20 +0000
commit53226f98f245da9b0260709bc4866f67b479b825 (patch)
tree034ec95a53dc8caf46dfd91a551874d029e9976f /libssh
parent22b422995f4e2b569565992a5feef7de08597e54 (diff)
downloadlibssh-53226f98f245da9b0260709bc4866f67b479b825.tar.gz
libssh-53226f98f245da9b0260709bc4866f67b479b825.tar.xz
libssh-53226f98f245da9b0260709bc4866f67b479b825.zip
exit-status should be -1 when undefined
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@230 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh')
-rw-r--r--libssh/channels.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libssh/channels.c b/libssh/channels.c
index 26409b85..ee16dfb3 100644
--- a/libssh/channels.c
+++ b/libssh/channels.c
@@ -48,16 +48,16 @@ CHANNEL *channel_new(SSH_SESSION *session){
channel->version=session->version;
channel->stdout_buffer=buffer_new();
channel->stderr_buffer=buffer_new();
- if(!session->channels){
+ channel->exit_status=-1;
+ if(!session->channels){
session->channels=channel;
channel->next=channel->prev=channel;
return channel;
- }
+ }
channel->next=session->channels;
channel->prev=session->channels->prev;
channel->next->prev=channel;
channel->prev->next=channel;
- channel->exit_status=-1;
return channel;
}