]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Add error reporting to get_console_input_win32().
authorGert Doering <gert@greenie.muc.de>
Fri, 18 Jun 2021 18:12:46 +0000 (20:12 +0200)
committerGert Doering <gert@greenie.muc.de>
Thu, 24 Jun 2021 15:28:57 +0000 (17:28 +0200)
commit8f283648d90799683d9e8f58ca4776ae1e893fd8
tree4c2652fefc627f01117249b02989c096a48bb135
parent87c8c081d5a1ede46b3cb01e0c25a876441f074b
Add error reporting to get_console_input_win32().

When the function setup fails due to invalid file handles, or because
WriteFile(err, ...) fails (due to file handle corruption elsewhere),
the function used to silently "return false"

Change this to print a M_WARN|M_ERRNO message.

Also, change the function style to early-return style (= large diff, but
most are indent changes only).

v2: fix spurious "}" that was left over from change to early-return.

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Lev Stipakov <lstipakov@gmail.com>
Message-Id: <20210618181246.30769-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22577.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/console_builtin.c