From: Jukka Rissanen Date: Tue, 15 Nov 2011 11:06:24 +0000 (+0200) Subject: l2tp: Check authentication error properly X-Git-Tag: 0.78~37 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=324cd0b9f7d3a66cdd2b6325befc3dd36a49c452;p=platform%2Fupstream%2Fconnman.git l2tp: Check authentication error properly --- diff --git a/plugins/l2tp.c b/plugins/l2tp.c index fce8902..78b8e37 100644 --- a/plugins/l2tp.c +++ b/plugins/l2tp.c @@ -158,6 +158,9 @@ static int l2tp_notify(DBusMessage *msg, struct connman_provider *provider) return VPN_STATE_FAILURE; } + if (strcmp(reason, "auth failed") == 0) + return VPN_STATE_AUTH_FAILURE; + if (strcmp(reason, "connect")) return VPN_STATE_DISCONNECT; @@ -473,12 +476,9 @@ static int l2tp_connect(struct connman_provider *provider, static int l2tp_error_code(int exit_code) { - switch (exit_code) { case 1: return CONNMAN_PROVIDER_ERROR_CONNECT_FAILED; - case 2: - return CONNMAN_PROVIDER_ERROR_LOGIN_FAILED; default: return CONNMAN_PROVIDER_ERROR_UNKNOWN; }