comparison cli-chansession.c @ 424:db976892c67f channel-fix

merge of 'c387cf9d6b7b1a951efd19476e81a2c2d7ca09a0' and 'ed68ea8963f7d1fa600f81479e7e211efc5a31bc'
author Matt Johnston <matt@ucc.asn.au>
date Mon, 12 Feb 2007 10:39:34 +0000
parents a9e0ddac5ba7
children 9c61e7af0156
comparison
equal deleted inserted replaced
421:dbb607d72d01 424:db976892c67f
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