summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>1999-12-02 20:16:35 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>1999-12-02 20:16:35 +0000
commit518584cb25aa3077bf9eb90e72632b85b82411af (patch)
tree56a7f46310bf07e7f21275eba96900084f653448 /usr.bin
parent03b9551853cef19ac8c82530e0eecb4651355fdb (diff)
set loglevel for SSH_MSG_DISCONNECT to log(), not fatal()
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/packet.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.bin/ssh/packet.c b/usr.bin/ssh/packet.c
index 566df5beaef..4e8a2624e9e 100644
--- a/usr.bin/ssh/packet.c
+++ b/usr.bin/ssh/packet.c
@@ -15,7 +15,7 @@
*/
#include "includes.h"
-RCSID("$Id: packet.c,v 1.16 1999/11/24 19:53:48 markus Exp $");
+RCSID("$Id: packet.c,v 1.17 1999/12/02 20:16:34 markus Exp $");
#include "xmalloc.h"
#include "buffer.h"
@@ -530,8 +530,10 @@ restart:
*payload_len_ptr = buffer_len(&incoming_packet);
/* Handle disconnect message. */
- if ((unsigned char) buf[0] == SSH_MSG_DISCONNECT)
- fatal("Received disconnect: %.900s", packet_get_string(NULL));
+ if ((unsigned char) buf[0] == SSH_MSG_DISCONNECT) {
+ log("Received disconnect: %.900s", packet_get_string(NULL));
+ fatal_cleanup();
+ }
/* Ignore ignore messages. */
if ((unsigned char) buf[0] == SSH_MSG_IGNORE)
@@ -662,7 +664,8 @@ packet_disconnect(const char *fmt,...)
packet_close();
/* Display the error locally and exit. */
- fatal("Disconnecting: %.100s", buf);
+ log("Disconnecting: %.100s", buf);
+ fatal_cleanup();
}
/* Checks if there is any buffered output, and tries to write some of the output. */