vpn: Remove VPN provider from service list when destroying it
authorJukka Rissanen <jukka.rissanen@linux.intel.com>
Thu, 7 Mar 2013 16:13:42 +0000 (18:13 +0200)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Fri, 8 Mar 2013 11:50:10 +0000 (13:50 +0200)
When provider is destroyed in vpnd, we get a notification about
that. We must then remove the provider which will also unref it
so the provider data will get removed properly.
Old code just unreffed the provider but it was left hanging in
service list.

plugins/vpn.c

index f60a658..cda0c1b 100644 (file)
@@ -1440,7 +1440,7 @@ static void destroy_provider(struct connection_data *data)
 
        connman_provider_set_data(data->provider, NULL);
 
-       connman_provider_put(data->provider);
+       connman_provider_remove(data->provider);
 
        data->provider = NULL;
 }