# HG changeset patch # User Matt Johnston # Date 1171276655 0 # Node ID a9e0ddac5ba7ab75dd2f99778a88236911485cd1 # Parent b2f81110c80b7c695b0cc3ee7bcfd534216e3e4c Ignore "exit-signal" request rather than returning failure diff -r b2f81110c80b -r a9e0ddac5ba7 cli-chansession.c --- a/cli-chansession.c Sun Feb 11 09:55:00 2007 +0000 +++ b/cli-chansession.c Mon Feb 12 10:37:35 2007 +0000 @@ -64,16 +64,17 @@ 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); }