Mark status as connected only if openvpn reports CONNECTED,SUCCESS

Avoid reporting a connection that completed with errors (state change
message = CONNECTED,ERROR) as successful.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
pull/112/head
Selva Nair 2017-01-02 14:17:25 -05:00
parent d82471d927
commit 91b3eef40a
1 changed files with 1 additions and 1 deletions

View File

@ -191,7 +191,7 @@ OnStateChange(connection_t *c, char *data)
return;
*pos = '\0';
if (strcmp(state, "CONNECTED") == 0)
if (strcmp(state, "CONNECTED") == 0 && strcmp(message, "SUCCESS") == 0)
{
/* Run Connect Script */
if (c->state == connecting || c->state == resuming)