aboutsummaryrefslogtreecommitdiff
path: root/libssh/channels1.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2010-01-24 23:03:56 +0100
committerAris Adamantiadis <aris@0xbadc0de.be>2010-01-24 23:03:56 +0100
commit3407509ed72a9b387187e91e9a5274b5ef39bb88 (patch)
tree1db3314f6421f70938649761eb7f2fc792036b65 /libssh/channels1.c
parent3ac62dda514e253ae4a08d8f755895cc6aa5ecac (diff)
downloadlibssh-3407509ed72a9b387187e91e9a5274b5ef39bb88.tar.gz
libssh-3407509ed72a9b387187e91e9a5274b5ef39bb88.tar.xz
libssh-3407509ed72a9b387187e91e9a5274b5ef39bb88.zip
Correctly handle channel failures and chan states
Diffstat (limited to 'libssh/channels1.c')
-rw-r--r--libssh/channels1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libssh/channels1.c b/libssh/channels1.c
index 55f9e91e..19e77b80 100644
--- a/libssh/channels1.c
+++ b/libssh/channels1.c
@@ -57,7 +57,7 @@ int channel_open_session1(ssh_channel chan) {
return -1;
}
session->exec_channel_opened = 1;
- chan->open = 1;
+ chan->state = SSH_CHANNEL_STATE_OPEN;
chan->local_maxpacket = 32000;
chan->local_window = 64000;
ssh_log(session, SSH_LOG_PACKET, "Opened a SSH1 channel session");
@@ -253,7 +253,7 @@ SSH_PACKET_CALLBACK(ssh_packet_close1){
*/
/* actually status is lost somewhere */
- channel->open = 0;
+ channel->state = SSH_CHANNEL_STATE_CLOSED;
channel->remote_eof = 1;
buffer_add_u8(session->out_buffer, SSH_CMSG_EXIT_CONFIRMATION);