Browse Source

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
commit
91b3eef40a
  1. 2
      openvpn.c

2
openvpn.c

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

Loading…
Cancel
Save