summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/packet.c
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2002-11-04 10:09:52 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2002-11-04 10:09:52 +0000
commiteb06f2ccb5fba7274d61b5c487125aa241edabc4 (patch)
treebb75c4c6a1c61a5a5ecb651a49982a9a5e9c5e57 /usr.bin/ssh/packet.c
parent44fa01a76e43ce97dde9725fe51d1d1750ad6720 (diff)
log before send disconnect; ok djm@
Diffstat (limited to 'usr.bin/ssh/packet.c')
-rw-r--r--usr.bin/ssh/packet.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/ssh/packet.c b/usr.bin/ssh/packet.c
index 56c31ec5ea0..19150cdc6ed 100644
--- a/usr.bin/ssh/packet.c
+++ b/usr.bin/ssh/packet.c
@@ -37,7 +37,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: packet.c,v 1.98 2002/10/23 10:32:13 markus Exp $");
+RCSID("$OpenBSD: packet.c,v 1.99 2002/11/04 10:09:51 markus Exp $");
#include "xmalloc.h"
#include "buffer.h"
@@ -1221,6 +1221,9 @@ packet_disconnect(const char *fmt,...)
vsnprintf(buf, sizeof(buf), fmt, args);
va_end(args);
+ /* Display the error locally */
+ log("Disconnecting: %.100s", buf);
+
/* Send the disconnect message to the other side, and wait for it to get sent. */
if (compat20) {
packet_start(SSH2_MSG_DISCONNECT);
@@ -1240,8 +1243,6 @@ packet_disconnect(const char *fmt,...)
/* Close the connection. */
packet_close();
- /* Display the error locally and exit. */
- log("Disconnecting: %.100s", buf);
fatal_cleanup();
}