aboutsummaryrefslogtreecommitdiff
path: root/libssh/channels.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2005-10-26 12:06:11 +0000
committerAris Adamantiadis <aris@0xbadc0de.be>2005-10-26 12:06:11 +0000
commit0f67ff89d9918344965897887ca47c9bb7471752 (patch)
treee7c58cbabcc205eb93582c00cebb2fa8dc63cadd /libssh/channels.c
parent9a2683f183338da7c82261d502cdeff0855c210c (diff)
downloadlibssh-0f67ff89d9918344965897887ca47c9bb7471752.tar.gz
libssh-0f67ff89d9918344965897887ca47c9bb7471752.tar.xz
libssh-0f67ff89d9918344965897887ca47c9bb7471752.zip
patches from Norbert merged in. I have made some little changes here and there.
It still doesn't compile because of the O1 thing passed to ld. git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@41 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh/channels.c')
-rw-r--r--libssh/channels.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libssh/channels.c b/libssh/channels.c
index a89d0034..a8f053c0 100644
--- a/libssh/channels.c
+++ b/libssh/channels.c
@@ -474,11 +474,11 @@ int channel_write(CHANNEL *channel ,void *data,int len){
}
int channel_is_open(CHANNEL *channel){
- return (channel->open!=0);
+ return (channel->open!=0 && channel->session->alive);
}
int channel_is_closed(CHANNEL *channel){
- return (channel->open==0);
+ return (channel->open==0 || !channel->session->alive);
}
int channel_is_eof(CHANNEL *channel){
@@ -749,7 +749,7 @@ static int channel_protocol_select(CHANNEL **rchans, CHANNEL **wchans, CHANNEL *
++j;
}
}
- wout[j]=NULL;
+ eout[j]=NULL;
return 0;
}