When network gets remove ensure to disconnect the service
authorMarcel Holtmann <marcel@holtmann.org>
Fri, 17 Jul 2009 09:19:37 +0000 (11:19 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 17 Jul 2009 09:19:37 +0000 (11:19 +0200)
src/profile.c

index f6ab24b..1fd3068 100644 (file)
@@ -141,6 +141,8 @@ int __connman_profile_remove_device(struct connman_device *device)
        if (service == NULL)
                return -EINVAL;
 
+       __connman_service_disconnect(service);
+
        __connman_service_put(service);
 
        return 0;
@@ -169,6 +171,8 @@ int __connman_profile_remove_network(struct connman_network *network)
        if (service == NULL)
                return -EINVAL;
 
+       __connman_service_disconnect(service);
+
        __connman_service_put(service);
 
        return 0;