Marcel:
I found a race condition issue. I have worked out a patch to fix the issue. 
Please review it. 
The IDLE state should be set after all the connection, dhclient elements have 
been cleared. Otherwise the race condition issue may happen.

diff --git a/src/network.c b/src/network.c
index c9e9dc3..2801ce0 100644
--- a/src/network.c
+++ b/src/network.c
@@ -742,14 +742,17 @@ 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;
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to