mirror of https://github.com/OpenVPN/openvpn-gui
Check for interactive service only if OpenVPN version is >= 2.4
This makes it less confusing to run GUI v11 with OpenVPN 2.3.x Signed-off-by: Selva Nair <selva.nair@gmail.com>pull/90/head
parent
4d6a879ce3
commit
81ece9690e
2
main.c
2
main.c
|
@ -187,7 +187,7 @@ int WINAPI _tWinMain (HINSTANCE hThisInstance,
|
|||
exit(1);
|
||||
}
|
||||
|
||||
if (!IsUserAdmin())
|
||||
if (!IsUserAdmin() && strtod(o.ovpn_version, NULL) > 2.3)
|
||||
CheckIServiceStatus(TRUE);
|
||||
|
||||
BuildFileList();
|
||||
|
|
|
@ -1431,8 +1431,14 @@ CheckVersion()
|
|||
CloseHandle(pi.hProcess);
|
||||
|
||||
/* OpenVPN version 2.x */
|
||||
if (strstr(line, match_version))
|
||||
char *p = strstr(line, match_version);
|
||||
if (p)
|
||||
{
|
||||
retval = TRUE;
|
||||
p = strtok(p+8, " ");
|
||||
strncpy(o.ovpn_version, p, _countof(o.ovpn_version)-1);
|
||||
o.ovpn_version[_countof(o.ovpn_version)] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
|
|
Loading…
Reference in New Issue