aboutsummaryrefslogtreecommitdiff
path: root/src/channels1.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2011-09-14 22:53:01 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2011-09-14 22:53:01 +0200
commit68bab2a490b53c5e396ff0ca2ad957c052ac6547 (patch)
treed716b60d7123cca5993ff14af9795d4c1d934045 /src/channels1.c
parentc4701a34d3bad592dde260673f7a0654079cc2b8 (diff)
downloadlibssh-68bab2a490b53c5e396ff0ca2ad957c052ac6547.tar.gz
libssh-68bab2a490b53c5e396ff0ca2ad957c052ac6547.tar.xz
libssh-68bab2a490b53c5e396ff0ca2ad957c052ac6547.zip
SSH1: handle exit-status message (channels would not close)
Diffstat (limited to 'src/channels1.c')
-rw-r--r--src/channels1.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/channels1.c b/src/channels1.c
index f13d6334..d06a7f18 100644
--- a/src/channels1.c
+++ b/src/channels1.c
@@ -267,6 +267,19 @@ SSH_PACKET_CALLBACK(ssh_packet_close1){
return SSH_PACKET_USED;
}
+SSH_PACKET_CALLBACK(ssh_packet_exist_status1){
+ ssh_channel channel = ssh_get_channel1(session);
+ uint32_t status;
+ (void)type;
+ (void)user;
+ buffer_get_u32(packet, &status);
+ channel->state = SSH_CHANNEL_STATE_CLOSED;
+ channel->remote_eof = 1;
+ channel->exit_status = ntohl(status);
+
+ return SSH_PACKET_USED;
+}
+
int channel_write1(ssh_channel channel, const void *data, int len) {
ssh_session session = channel->session;