Suppress warning popups if silent_connection is set

Warnings dsabled if silent_connection is true
- interactive service is not installed or not running
- duplicate configs found and ignored

v2: Update description of --silent_connection in README
and English resource file (translations not updated).

Signed-off-by: Selva Nair <selva.nair@gmail.com>
pull/112/head
Selva Nair 2017-01-02 14:29:19 -05:00
parent 91b3eef40a
commit 9cea37ad80
4 changed files with 7 additions and 3 deletions

View File

@ -185,7 +185,8 @@ log_append
silent_connection
If set to "1", the status window with the OpenVPN log output will
not be showed while connecting.
not be shown while connecting. Warnings such as interactive service
not started or multiple config files with same name are also suppressed.
service_only
If set to "1", OpenVPN GUI's normal "Connect" and "Disconnect"

2
main.c
View File

@ -189,7 +189,7 @@ int WINAPI _tWinMain (HINSTANCE hThisInstance,
exit(1);
}
if (!IsUserAdmin() && strtod(o.ovpn_version, NULL) > 2.3)
if (!IsUserAdmin() && strtod(o.ovpn_version, NULL) > 2.3 && !o.silent_connection)
CheckIServiceStatus(TRUE);
BuildFileList();

View File

@ -221,6 +221,9 @@ BuildFileList()
{
static bool issue_warnings = true;
if (o.silent_connection)
issue_warnings = false;
/*
* If no connections are active reset num_configs and rescan
* to make a new list. Else we keep all current configs and

View File

@ -355,7 +355,7 @@ BEGIN
"--allow_proxy\t\t: 1=Show Proxy Settings menu.\n" \
"--show_balloon\t\t: 0=Never, 1=At initial connect, 2=At every re-connect.\n" \
"--service_only\t\t: 1=Enable Service Only mode.\n" \
"--silent_connection\t\t: 1=Do not show the status dialog while connecting.\n" \
"--silent_connection\t\t: 1=Do not show the status dialog while connecting or non-critical warnings at startup.\n" \
"--show_script_window\t: 0=Hide Script execution window, 1=Show it.\n" \
"--passphrase_attempts\t: Number of passphrase attempts to allow.\n" \
"--connectscript_timeout\t: Time to wait for connect script to finish.\n" \