Handle static method at function set_connected
authorMartin Xu <martin.xu@intel.com>
Thu, 17 Dec 2009 13:52:25 +0000 (21:52 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 17 Dec 2009 20:35:14 +0000 (12:35 -0800)
src/network.c

index 0b2023ce1869aa97158e3982f55953cd0ad606d5..8ae72e9ae5f48563f74356ce481c00331023fed5 100644 (file)
@@ -703,6 +703,19 @@ static gboolean set_connected(gpointer user_data)
 
                connman_device_set_disconnected(network->device, FALSE);
 
+               if (network->element.ipv4.method ==
+                                       CONNMAN_IPCONFIG_METHOD_STATIC) {
+
+                       network->connecting = FALSE;
+
+                       connman_network_set_associating(network, FALSE);
+
+                       __connman_service_indicate_state(service,
+                                               CONNMAN_SERVICE_STATE_READY);
+
+                       return TRUE;
+               }
+
                element = connman_element_create(NULL);
                if (element != NULL) {
                        element->type  = type;