Mercurial > dropbear
comparison cli-chansession.c @ 422:a9e0ddac5ba7 channel-fix
Ignore "exit-signal" request rather than returning failure
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 12 Feb 2007 10:37:35 +0000 |
parents | 36d21680a9d3 |
children | 9c61e7af0156 |
comparison
equal
deleted
inserted
replaced
419:b2f81110c80b | 422:a9e0ddac5ba7 |
---|---|
62 TRACE(("enter cli_chansessreq")) | 62 TRACE(("enter cli_chansessreq")) |
63 | 63 |
64 type = buf_getstring(ses.payload, NULL); | 64 type = buf_getstring(ses.payload, NULL); |
65 wantreply = buf_getbool(ses.payload); | 65 wantreply = buf_getbool(ses.payload); |
66 | 66 |
67 if (strcmp(type, "exit-status") != 0) { | 67 if (strcmp(type, "exit-status") == 0) { |
68 cli_ses.retval = buf_getint(ses.payload); | |
69 TRACE(("got exit-status of '%d'", cli_ses.retval)) | |
70 } else if (strcmp(type, "exit-signal") == 0) { | |
71 TRACE(("got exit-signal, ignoring it")) | |
72 } else { | |
68 TRACE(("unknown request '%s'", type)) | 73 TRACE(("unknown request '%s'", type)) |
69 send_msg_channel_failure(channel); | 74 send_msg_channel_failure(channel); |
70 goto out; | 75 goto out; |
71 } | 76 } |
72 | 77 |
73 /* We'll just trust what they tell us */ | |
74 cli_ses.retval = buf_getint(ses.payload); | |
75 TRACE(("got exit-status of '%d'", cli_ses.retval)) | |
76 | |
77 out: | 78 out: |
78 m_free(type); | 79 m_free(type); |
79 } | 80 } |
80 | 81 |
81 | 82 |