DBG("device %p", device);
+ connman_device_set_disconnected(device, TRUE);
+
g_hash_table_iter_init(&iter, device->networks);
while (g_hash_table_iter_next(&iter, &key, &value) == TRUE) {
} else
network->connected = TRUE;
- connman_device_set_disconnected(network->device, FALSE);
-
return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);
}
connman_element_unregister_children(&network->element);
+ connman_device_set_disconnected(network->device, TRUE);
+
if (network->driver && network->driver->disconnect) {
err = network->driver->disconnect(network);
if (err < 0 && err != -EINPROGRESS)
} else
network->connected = FALSE;
- connman_device_set_disconnected(network->device, TRUE);
-
return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);
}
__connman_device_set_network(network->device, network);
+ connman_device_set_disconnected(network->device, FALSE);
+
element = connman_element_create(NULL);
if (element != NULL) {
element->type = type;