]> 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:29:25 +0000 (17:29 +0200)
commitb6012d80a198b5d7e8c2f399b92a1299c660a326
tree093178ccd25735ffc7865e62232c61cb2563bd55
parentecaf88f8a4e758567dbb270900401bfd038bcd73
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