[session.c]
     minor KNF
This commit is contained in:
Damien Miller 2002-02-08 22:06:48 +11:00
parent 025e01c7f0
commit f3dcf1fc88
2 changed files with 9 additions and 10 deletions

View File

@ -19,6 +19,9 @@
- mpech@cvs.openbsd.org 2002/02/06 14:27:23 - mpech@cvs.openbsd.org 2002/02/06 14:27:23
[sftp.c] [sftp.c]
sync usage() with manual. sync usage() with manual.
- markus@cvs.openbsd.org 2002/02/06 14:37:22
[session.c]
minor KNF
20020205 20020205
- (djm) Cleanup after sync: - (djm) Cleanup after sync:
@ -7525,4 +7528,4 @@
- Wrote replacements for strlcpy and mkdtemp - Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1 - Released 1.0pre1
$Id: ChangeLog,v 1.1833 2002/02/08 11:06:29 djm Exp $ $Id: ChangeLog,v 1.1834 2002/02/08 11:06:48 djm Exp $

View File

@ -33,7 +33,7 @@
*/ */
#include "includes.h" #include "includes.h"
RCSID("$OpenBSD: session.c,v 1.123 2002/02/03 17:53:25 markus Exp $"); RCSID("$OpenBSD: session.c,v 1.124 2002/02/06 14:37:22 markus Exp $");
#include "ssh.h" #include "ssh.h"
#include "ssh1.h" #include "ssh1.h"
@ -1825,23 +1825,19 @@ static void
session_exit_message(Session *s, int status) session_exit_message(Session *s, int status)
{ {
Channel *c; Channel *c;
if (s == NULL)
fatal("session_close: no session"); if ((c = channel_lookup(s->chanid)) == NULL)
c = channel_lookup(s->chanid);
if (c == NULL)
fatal("session_exit_message: session %d: no channel %d", fatal("session_exit_message: session %d: no channel %d",
s->self, s->chanid); s->self, s->chanid);
debug("session_exit_message: session %d channel %d pid %d", debug("session_exit_message: session %d channel %d pid %d",
s->self, s->chanid, s->pid); s->self, s->chanid, s->pid);
if (WIFEXITED(status)) { if (WIFEXITED(status)) {
channel_request_start(s->chanid, channel_request_start(s->chanid, "exit-status", 0);
"exit-status", 0);
packet_put_int(WEXITSTATUS(status)); packet_put_int(WEXITSTATUS(status));
packet_send(); packet_send();
} else if (WIFSIGNALED(status)) { } else if (WIFSIGNALED(status)) {
channel_request_start(s->chanid, channel_request_start(s->chanid, "exit-signal", 0);
"exit-signal", 0);
packet_put_int(WTERMSIG(status)); packet_put_int(WTERMSIG(status));
#ifdef WCOREDUMP #ifdef WCOREDUMP
packet_put_char(WCOREDUMP(status)); packet_put_char(WCOREDUMP(status));