projects
/
framework
/
connectivity
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b9777fe
)
openconnect: error_code implementation
author
Mohamed Abbas
<mabbas@linux.intel.com>
Fri, 28 Jan 2011 04:55:36 +0000
(20:55 -0800)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Fri, 28 Jan 2011 11:38:28 +0000
(12:38 +0100)
plugins/openconnect.c
patch
|
blob
|
history
diff --git
a/plugins/openconnect.c
b/plugins/openconnect.c
index
cc8b51b
..
795a5f6
100644
(file)
--- a/
plugins/openconnect.c
+++ b/
plugins/openconnect.c
@@
-161,9
+161,23
@@
static int oc_connect(struct connman_provider *provider,
return 0;
}
+static int oc_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;
+ }
+}
+
static struct vpn_driver vpn_driver = {
.notify = oc_notify,
.connect = oc_connect,
+ .error_code = oc_error_code,
};
static int openconnect_init(void)