]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: use sshpkt_fatal() instead of plain fatal() for
authordjm@openbsd.org <djm@openbsd.org>
Thu, 30 Jan 2020 07:21:38 +0000 (07:21 +0000)
committerDamien Miller <djm@mindrot.org>
Thu, 30 Jan 2020 07:22:34 +0000 (18:22 +1100)
ssh_packet_write_poll() failures here too as the former yields better error
messages; ok dtucker@

OpenBSD-Commit-ID: 1f7a6ca95bc2b716c2e948fc1370753be772d8e3

serverloop.c

index a8c99e2e09b65020310206989d1ca415e733d0a9..340b19a5a48af028c6c06c14cbb5ae0aa9bdf68d 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: serverloop.c,v 1.221 2020/01/25 22:41:01 djm Exp $ */
+/* $OpenBSD: serverloop.c,v 1.222 2020/01/30 07:21:38 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -359,9 +359,10 @@ process_output(struct ssh *ssh, fd_set *writeset, int connection_out)
 
        /* Send any buffered packet data to the client. */
        if (FD_ISSET(connection_out, writeset)) {
-               if ((r = ssh_packet_write_poll(ssh)) != 0)
-                       fatal("%s: ssh_packet_write_poll: %s",
-                           __func__, ssh_err(r));
+               if ((r = ssh_packet_write_poll(ssh)) != 0) {
+                       sshpkt_fatal(ssh, r, "%s: ssh_packet_write_poll",
+                           __func__);
+               }
        }
 }