diff options
author | djm@openbsd.org <djm@openbsd.org> | 2019-01-19 21:33:13 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-01-20 09:02:20 +1100 |
commit | ad60b1179c9682ca5aef0b346f99ef68cbbbc4e5 (patch) | |
tree | 0c1df01c9924629b43337bb398e613f1b2f0ba6f /opacket.c | |
parent | 0fa174ebe129f3d0aeaf4e2d1dd8de745870d0ff (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 'opacket.c')
-rw-r--r-- | opacket.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: opacket.c,v 1.7 2017/10/20 01:56:39 djm Exp $ */ +/* $OpenBSD: opacket.c,v 1.9 2019/01/19 21:33:14 djm Exp $ */ /* Written by Markus Friedl. Placed in the public domain. */ #include "includes.h" @@ -238,7 +238,7 @@ packet_read_seqnr(u_int32_t *seqnr) int r; if ((r = ssh_packet_read_seqnr(active_state, &type, seqnr)) != 0) - sshpkt_fatal(active_state, __func__, r); + sshpkt_fatal(active_state, r, "%s", __func__); return type; } @@ -249,7 +249,7 @@ packet_read_poll_seqnr(u_int32_t *seqnr) int r; if ((r = ssh_packet_read_poll_seqnr(active_state, &type, seqnr))) - sshpkt_fatal(active_state, __func__, r); + sshpkt_fatal(active_state, r, "%s", __func__); return type; } @@ -266,7 +266,7 @@ packet_process_incoming(const char *buf, u_int len) int r; if ((r = ssh_packet_process_incoming(active_state, buf, len)) != 0) - sshpkt_fatal(active_state, __func__, r); + sshpkt_fatal(active_state, r, "%s", __func__); } void @@ -275,7 +275,7 @@ packet_write_wait(void) int r; if ((r = ssh_packet_write_wait(active_state)) != 0) - sshpkt_fatal(active_state, __func__, r); + sshpkt_fatal(active_state, r, "%s", __func__); } void @@ -284,7 +284,7 @@ packet_write_poll(void) int r; if ((r = ssh_packet_write_poll(active_state)) != 0) - sshpkt_fatal(active_state, __func__, r); + sshpkt_fatal(active_state, r, "%s", __func__); } void @@ -293,7 +293,7 @@ packet_read_expect(int expected_type) int r; if ((r = ssh_packet_read_expect(active_state, expected_type)) != 0) - sshpkt_fatal(active_state, __func__, r); + sshpkt_fatal(active_state, r, "%s", __func__); } void |