Fix connected state change handling
authorMarcel Holtmann <marcel@holtmann.org>
Sun, 8 Mar 2009 15:25:41 +0000 (16:25 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Sun, 8 Mar 2009 15:25:41 +0000 (16:25 +0100)
src/network.c

index 66158e9..e0f0fa8 100644 (file)
@@ -658,7 +658,7 @@ int connman_network_set_connected(struct connman_network *network,
        network->connected = connected;
 
        if (network->registered == FALSE)
-               return 0;
+               goto connected;
 
        signal = dbus_message_new_signal(network->element.path,
                                CONNMAN_NETWORK_INTERFACE, "PropertyChanged");
@@ -676,6 +676,7 @@ int connman_network_set_connected(struct connman_network *network,
 
        g_dbus_send_message(connection, signal);
 
+connected:
        if (connected == TRUE) {
                struct connman_element *element;
                enum connman_element_type type = CONNMAN_ELEMENT_TYPE_UNKNOWN;