summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-12-06 11:47:28 +1100
committerDamien Miller <djm@mindrot.org>1999-12-06 11:47:28 +1100
commitaae6c614da614eb10ced16505f35410671c95d9d (patch)
tree441e578781d38e7de4c5f609a4f86695d937e640 /packet.c
parentdc33fc3910552c82518503b581efc1a51192fa76 (diff)
- Merged OpenBSD CVS changes:
- [auth-krb4.c auth-passwd.c auth-skey.c ssh. move skey-auth from auth-passwd.c to auth-s - [auth-rsa.c] warn only about mismatch if key is _used_ warn about keysize-mismatch with log() not channels.c readconf.c readconf.h ssh.c ssh. ports are u_short - [hostfile.c] indent, shorter warning - [nchan.c] use error() for internal errors - [packet.c] set loglevel for SSH_MSG_DISCONNECT to log( serverloop.c indent - [ssh-add.1 ssh-add.c ssh.h] document , reasonable default - [ssh.1] CheckHostIP is not available for connects v - [sshconnect.c] typo easier to read client code for passwd and s turn of checkhostip for proxy connects, sin
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/packet.c b/packet.c
index f4b44f5e..9e8cf2e3 100644
--- a/packet.c
+++ b/packet.c
@@ -15,7 +15,7 @@
*/
#include "includes.h"
-RCSID("$Id: packet.c,v 1.6 1999/11/25 00:54:59 damien Exp $");
+RCSID("$Id: packet.c,v 1.7 1999/12/06 00:47:29 damien 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. */