summaryrefslogtreecommitdiff
path: root/vpn/plugins/vpn.c
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2012-11-12 12:07:56 (GMT)
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-11-23 10:58:52 (GMT)
commita1562f49d0e9c7ae7906344d896df38201376505 (patch)
treeeab7b5d1e36788b84641d2fd3035578ed997da30 /vpn/plugins/vpn.c
parent5fb8847d3b6454a8467c0b3e3f5a9db2115f8655 (diff)
downloadconnman-a1562f49d0e9c7ae7906344d896df38201376505.zip
connman-a1562f49d0e9c7ae7906344d896df38201376505.tar.gz
connman-a1562f49d0e9c7ae7906344d896df38201376505.tar.bz2
vpn: Go to failure state if vpn information cannot be found
Diffstat (limited to 'vpn/plugins/vpn.c')
-rw-r--r--vpn/plugins/vpn.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/vpn/plugins/vpn.c b/vpn/plugins/vpn.c
index df030b0..d0b3381 100644
--- a/vpn/plugins/vpn.c
+++ b/vpn/plugins/vpn.c
@@ -223,14 +223,24 @@ static DBusMessage *vpn_notify(struct connman_task *task,
data = vpn_provider_get_data(provider);
name = vpn_provider_get_driver_name(provider);
- if (name == NULL)
+
+ if (name == NULL) {
+ DBG("Cannot find VPN driver for provider %p", provider);
+ vpn_provider_set_state(provider, VPN_PROVIDER_STATE_FAILURE);
return NULL;
+ }
vpn_driver_data = g_hash_table_lookup(driver_hash, name);
- if (vpn_driver_data == NULL)
+ if (vpn_driver_data == NULL) {
+ DBG("Cannot find VPN driver data for name %s", name);
+ vpn_provider_set_state(provider, VPN_PROVIDER_STATE_FAILURE);
return NULL;
+ }
state = vpn_driver_data->vpn_driver->notify(msg, provider);
+
+ DBG("provider %p driver %s state %d", provider, name, state);
+
switch (state) {
case VPN_STATE_CONNECT:
case VPN_STATE_READY: