summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-07-05 09:35:54 -0700
committerMarcel Holtmann <marcel@holtmann.org>2009-07-05 09:35:54 -0700
commit213033c085063b081fd9fdd0c26752dc5ca6bbd4 (patch)
treeaa862942bbff5a57c876aa37c6322a35298ab041
parentadbfb7fa9c750f394939d10733cff6f29f150f71 (diff)
downloadconnman-213033c085063b081fd9fdd0c26752dc5ca6bbd4.tar.gz
connman-213033c085063b081fd9fdd0c26752dc5ca6bbd4.tar.bz2
connman-213033c085063b081fd9fdd0c26752dc5ca6bbd4.zip
Fix race condition with IDLE state on disconnect
-rw-r--r--src/network.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/network.c b/src/network.c
index c9e9dc35..45284fa9 100644
--- a/src/network.c
+++ b/src/network.c
@@ -742,14 +742,14 @@ static gboolean set_connected(gpointer user_data)
CONNMAN_SERVICE_STATE_CONFIGURATION);
}
} else {
- __connman_service_indicate_state(service,
- CONNMAN_SERVICE_STATE_IDLE);
-
connman_element_unregister_children(&network->element);
__connman_device_set_network(network->device, NULL);
__connman_device_decrease_connections(network->device);
+
+ __connman_service_indicate_state(service,
+ CONNMAN_SERVICE_STATE_IDLE);
}
return FALSE;