comparison cli-chansession.c @ 816:84e4259dae3e

Only send a failure response to a channel request if wantreply is set.
author Matt Johnston <matt@ucc.asn.au>
date Sat, 21 Sep 2013 00:34:36 +0800
parents b2d4205b0897
children 4095b6d7c9fc
comparison
equal deleted inserted replaced
815:35183e8a7851 816:84e4259dae3e
69 TRACE(("got exit-status of '%d'", cli_ses.retval)) 69 TRACE(("got exit-status of '%d'", cli_ses.retval))
70 } else if (strcmp(type, "exit-signal") == 0) { 70 } else if (strcmp(type, "exit-signal") == 0) {
71 TRACE(("got exit-signal, ignoring it")) 71 TRACE(("got exit-signal, ignoring it"))
72 } else { 72 } else {
73 TRACE(("unknown request '%s'", type)) 73 TRACE(("unknown request '%s'", type))
74 send_msg_channel_failure(channel); 74 if (wantreply) {
75 send_msg_channel_failure(channel);
76 }
75 goto out; 77 goto out;
76 } 78 }
77 79
78 out: 80 out:
79 m_free(type); 81 m_free(type);