DBG("service %p", service);
- if (service->pending != NULL)
- reply_pending(service, ECONNABORTED);
-
service->ignore = TRUE;
err = __connman_service_disconnect(service);
DBG("service %p", service);
- g_hash_table_remove(service_hash, service->identifier);
-
reply_pending(service, ENOENT);
+ g_hash_table_remove(service_hash, service->identifier);
+
service->path = NULL;
if (path != NULL) {
iter = g_hash_table_lookup(service_hash, service->identifier);
if (iter != NULL) {
- reply_pending(service, ENOENT);
-
__connman_service_disconnect(service);
service->state = CONNMAN_SERVICE_STATE_FAILURE;
DBG("service %p", service);
+ reply_pending(service, ECONNABORTED);
+
if (service->network != NULL) {
err = __connman_network_disconnect(service->network);
} else if (service->device != NULL) {