summaryrefslogtreecommitdiff
path: root/dispatch.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2019-01-19 21:33:13 +0000
committerDamien Miller <djm@mindrot.org>2019-01-20 09:02:20 +1100
commitad60b1179c9682ca5aef0b346f99ef68cbbbc4e5 (patch)
tree0c1df01c9924629b43337bb398e613f1b2f0ba6f /dispatch.c
parent0fa174ebe129f3d0aeaf4e2d1dd8de745870d0ff (diff)
upstream: allow sshpkt_fatal() to take a varargs format; we'll
use this to give packet-related fatal error messages more context (esp. the remote endpoint) ok markus@ OpenBSD-Commit-ID: de57211f9543426b515a8a10a4f481666b2b2a50
Diffstat (limited to 'dispatch.c')
-rw-r--r--dispatch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/dispatch.c b/dispatch.c
index 0b3ea614e..6e4c501e0 100644
--- a/dispatch.c
+++ b/dispatch.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dispatch.c,v 1.31 2017/05/31 07:00:13 markus Exp $ */ 1/* $OpenBSD: dispatch.c,v 1.32 2019/01/19 21:33:13 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * 4 *
@@ -47,7 +47,7 @@ dispatch_protocol_error(int type, u_int32_t seq, struct ssh *ssh)
47 (r = sshpkt_put_u32(ssh, seq)) != 0 || 47 (r = sshpkt_put_u32(ssh, seq)) != 0 ||
48 (r = sshpkt_send(ssh)) != 0 || 48 (r = sshpkt_send(ssh)) != 0 ||
49 (r = ssh_packet_write_wait(ssh)) != 0) 49 (r = ssh_packet_write_wait(ssh)) != 0)
50 sshpkt_fatal(ssh, __func__, r); 50 sshpkt_fatal(ssh, r, "%s", __func__);
51 return 0; 51 return 0;
52} 52}
53 53
@@ -131,5 +131,5 @@ ssh_dispatch_run_fatal(struct ssh *ssh, int mode, volatile sig_atomic_t *done)
131 int r; 131 int r;
132 132
133 if ((r = ssh_dispatch_run(ssh, mode, done)) != 0) 133 if ((r = ssh_dispatch_run(ssh, mode, done)) != 0)
134 sshpkt_fatal(ssh, __func__, r); 134 sshpkt_fatal(ssh, r, "%s", __func__);
135} 135}