projects
/
platform
/
upstream
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
38f52db
)
l2tp: Check authentication error properly
author
Jukka Rissanen
<jukka.rissanen@linux.intel.com>
Tue, 15 Nov 2011 11:06:24 +0000
(13:06 +0200)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Tue, 15 Nov 2011 12:41:45 +0000
(13:41 +0100)
plugins/l2tp.c
patch
|
blob
|
history
diff --git
a/plugins/l2tp.c
b/plugins/l2tp.c
index
fce8902
..
78b8e37
100644
(file)
--- 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;
}