summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2013-03-07 16:13:44 (GMT)
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-03-08 11:50:15 (GMT)
commitde460f095ede26b71270e7e122c4b88932860f2a (patch)
treeb28093d99f61cfaad580ea71609ca5f48ac61db4 /plugins
parent079002da173d6675072bd31a65917392119ec9e3 (diff)
downloadconnman-de460f095ede26b71270e7e122c4b88932860f2a.zip
connman-de460f095ede26b71270e7e122c4b88932860f2a.tar.gz
connman-de460f095ede26b71270e7e122c4b88932860f2a.tar.bz2
vpn: Check whether we have already removed the provider
The dbus messages from vpnd might come in different order so make sure we are not trying to access already removed provider.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/vpn.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/vpn.c b/plugins/vpn.c
index f15796d..04318a9 100644
--- a/plugins/vpn.c
+++ b/plugins/vpn.c
@@ -796,6 +796,14 @@ static int provider_remove(struct connman_provider *provider)
DBG("provider %p data %p", provider, data);
+ if (data == NULL) {
+ /*
+ * This means the provider is already removed,
+ * just ignore the dbus in this case.
+ */
+ return -EALREADY;
+ }
+
/*
* When provider.c:provider_remove() calls this function,
* it will remove the provider itself after the call.