The unified diff between revisions [be0d8378..] and [493d563a..] is displayed below. It can also be downloaded as a raw diff.
#
#
# patch "cli-chansession.c"
# from [f5eb2dfd55e1a3ae3ba64c6c0e83fec38689babb]
# to [91957a921461272b119243b714ac6d40ee35724d]
#
============================================================
--- cli-chansession.c f5eb2dfd55e1a3ae3ba64c6c0e83fec38689babb
+++ cli-chansession.c 91957a921461272b119243b714ac6d40ee35724d
@@ -64,16 +64,17 @@ static void cli_chansessreq(struct Chann
type = buf_getstring(ses.payload, NULL);
wantreply = buf_getbool(ses.payload);
- if (strcmp(type, "exit-status") != 0) {
+ if (strcmp(type, "exit-status") == 0) {
+ cli_ses.retval = buf_getint(ses.payload);
+ TRACE(("got exit-status of '%d'", cli_ses.retval))
+ } else if (strcmp(type, "exit-signal") == 0) {
+ TRACE(("got exit-signal, ignoring it"))
+ } else {
TRACE(("unknown request '%s'", type))
send_msg_channel_failure(channel);
goto out;
}
- /* We'll just trust what they tell us */
- cli_ses.retval = buf_getint(ses.payload);
- TRACE(("got exit-status of '%d'", cli_ses.retval))
-
out:
m_free(type);
}