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 8 years ago
parent d82471d927
commit 91b3eef40a

@ -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)

Loading…
Cancel
Save