*/
#include "includes.h"
-RCSID("$OpenBSD: packet.c,v 1.98 2002/10/23 10:32:13 markus Exp $");
+RCSID("$OpenBSD: packet.c,v 1.100 2002/11/21 22:45:31 markus Exp $");
#include "xmalloc.h"
#include "buffer.h"
CipherContext *cc;
int encrypt;
- debug("newkeys: mode %d", mode);
+ debug2("set_newkeys: mode %d", mode);
if (mode == MODE_OUT) {
cc = &send_context;
encrypt = CIPHER_DECRYPT;
}
if (newkeys[mode] != NULL) {
- debug("newkeys: rekeying");
+ debug("set_newkeys: rekeying");
cipher_cleanup(cc);
enc = &newkeys[mode]->enc;
mac = &newkeys[mode]->mac;
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);
/* Close the connection. */
packet_close();
- /* Display the error locally and exit. */
- log("Disconnecting: %.100s", buf);
fatal_cleanup();
}