service: Call __connman_service_disconnect from remove_service
authorDanny Jeongseok Seo <s.seo@samsung.com>
Fri, 7 Oct 2011 19:31:03 +0000 (21:31 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Fri, 7 Oct 2011 19:31:03 +0000 (21:31 +0200)
Just calling __connman_network_disconnect() means missing proxy and
ipconfig clearance.

src/service.c

index 22f8320..1b95995 100644 (file)
@@ -3213,11 +3213,9 @@ static DBusMessage *remove_service(DBusConnection *conn,
                                                CONNMAN_SERVICE_STATE_FAILURE)
                return __connman_error_not_supported(msg);
 
-       if (service->network != NULL) {
-               set_reconnect_state(service, FALSE);
+       set_reconnect_state(service, FALSE);
 
-               __connman_network_disconnect(service->network);
-       }
+       __connman_service_disconnect(service);
 
        g_free(service->passphrase);
        service->passphrase = NULL;