From: Lev Stipakov Date: Sat, 29 Feb 2020 12:35:15 +0000 (+0200) Subject: interactive.c: remove unused function X-Git-Tag: v2.5_beta1~199 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b111aa8006ae39f5ca9cf251d158d5850806f536;p=thirdparty%2Fopenvpn.git interactive.c: remove unused function Function ReturnOpenvpnOutput was used to read openvpn process output and write it to openvpn-gui. Commit 852f1e4 has directed stdout/stderr streams of openvpn process to NUL, after which ReturnOpenvpnOutput() has become unused. Signed-off-by: Lev Stipakov Acked-by: Acked-by: Selva Nair Message-Id: <20200229123515.9745-1-lstipakov@gmail.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg19508.html Signed-off-by: Gert Doering --- diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c index 8da49be6b..1f13163ee 100644 --- a/src/openvpnserv/interactive.c +++ b/src/openvpnserv/interactive.c @@ -361,31 +361,6 @@ ReturnLastError(HANDLE pipe, LPCWSTR func) ReturnError(pipe, GetLastError(), func, 1, &exit_event); } - -static VOID -ReturnOpenvpnOutput(HANDLE pipe, HANDLE ovpn_output, DWORD count, LPHANDLE events) -{ - WCHAR *wide_output = NULL; - CHAR output[512]; - DWORD size; - - ReadFile(ovpn_output, output, sizeof(output), &size, NULL); - if (size == 0) - { - return; - } - - wide_output = malloc((size) * sizeof(WCHAR)); - if (wide_output) - { - MultiByteToWideChar(CP_UTF8, 0, output, size, wide_output, size); - wide_output[size - 1] = 0; - } - - ReturnError(pipe, ERROR_OPENVPN_STARTUP, wide_output, count, events); - free(wide_output); -} - /* * Validate options against a white list. Also check the config_file is * inside the config_dir. The white list is defined in validate.c