summaryrefslogtreecommitdiff
path: root/src/provider.c
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2010-08-09 14:32:45 (GMT)
committerSamuel Ortiz <sameo@linux.intel.com>2010-08-09 14:35:50 (GMT)
commit10849f787cd0d1a64a2c0b16663ae3b8743bb5c2 (patch)
tree8047c589655e5b9a63c358ee8ac7d0b57d659ba6 /src/provider.c
parent43e7b0260857b48f19aa4165699453dd6608bb3b (diff)
downloadconnman-10849f787cd0d1a64a2c0b16663ae3b8743bb5c2.zip
connman-10849f787cd0d1a64a2c0b16663ae3b8743bb5c2.tar.gz
connman-10849f787cd0d1a64a2c0b16663ae3b8743bb5c2.tar.bz2
Fix provider refcounting
The VPN service refcount is bumped at creation time and decreased at destruction time. The openconnect provider bumps the provider refcount at task creation time and decreases it at task destruction time. The service code bumps the provider refcount at service creation time and decreases it at service releasing time.
Diffstat (limited to 'src/provider.c')
-rw-r--r--src/provider.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/provider.c b/src/provider.c
index 8783a30..47aaa76 100644
--- a/src/provider.c
+++ b/src/provider.c
@@ -330,7 +330,7 @@ static void unregister_provider(gpointer data)
DBG("provider %p", provider);
- __connman_provider_disconnect(provider);
+ __connman_service_put(provider->vpn_service);
connman_element_unregister(&provider->element);
connman_provider_unref(provider);
@@ -347,7 +347,6 @@ static void provider_destruct(struct connman_element *element)
g_free(provider->domain);
g_free(provider->identifier);
g_free(provider->dns);
- __connman_service_put(provider->vpn_service);
}
static void __connman_provider_initialize(struct connman_provider *provider)