]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
interactive.c: remove unused function
authorLev Stipakov <lev@openvpn.net>
Sat, 29 Feb 2020 12:35:15 +0000 (14:35 +0200)
committerGert Doering <gert@greenie.muc.de>
Sun, 8 Mar 2020 19:56:58 +0000 (20:56 +0100)
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 <lev@openvpn.net>
Acked-by: <selva.nair@gmail.com>
Acked-by: Selva Nair <selva.nair@gmail.com>
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 <gert@greenie.muc.de>
src/openvpnserv/interactive.c

index 8da49be6bd26fcebd73b48f80ac81a3c472a8f44..1f13163ee186e84cb382dd92f6c3876c9e8fc597 100644 (file)
@@ -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