-
Notifications
You must be signed in to change notification settings - Fork 403
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In '--connect profile-name' make the extension (.ovpn) optional
Treat '--connect foo.ovpn' and '--connect foo' as the same. This matches with the behaviour of '--command connect foo'. Note: the argument is first compared against config file names and then against config names. Based on comment by larson0815 here: selvanair#5 Signed-off-by: Selva Nair <selva.nair@gmail.com>
- Loading branch information
Showing
2 changed files
with
3 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,21 +79,10 @@ static int | |
VerifyAutoConnections() | ||
{ | ||
int i; | ||
BOOL match; | ||
|
||
for (i = 0; i < MAX_CONFIGS && o.auto_connect[i] != 0; i++) | ||
{ | ||
int j; | ||
match = FALSE; | ||
for (j = 0; j < MAX_CONFIGS; j++) | ||
{ | ||
if (_tcsicmp(o.conn[j].config_file, o.auto_connect[i]) == 0) | ||
{ | ||
match = TRUE; | ||
break; | ||
} | ||
} | ||
if (match == FALSE) | ||
if (GetConnByName(o.auto_connect[i]) == NULL) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
selvanair
Author
Collaborator
|
||
{ | ||
/* autostart config not found */ | ||
ShowLocalizedMsg(IDS_ERR_AUTOSTART_CONF, o.auto_connect[i]); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(GetConnect_ByName(o.auto_connect[i]) == NULL)