Set network method as CONNMAN_IPCONFIG_METHOD_DHCP
authorMartin Xu <martin.xu@intel.com>
Wed, 30 Dec 2009 08:24:09 +0000 (16:24 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 30 Dec 2009 08:52:30 +0000 (00:52 -0800)
Before calling connman_network_set_connected(true), the method should
be set to CONNMAN_IPCONFIG_METHOD_DHCP.

plugins/bluetooth.c
plugins/ethernet.c
plugins/iwmx.c
plugins/mbm.c
plugins/ofono.c
plugins/supplicant.c

index 9955f84..0647cc4 100644 (file)
@@ -110,6 +110,9 @@ static void connect_reply(DBusPendingCall *call, void *user_data)
        index = connman_inet_ifindex(interface);
 
        connman_network_set_index(network, index);
+
+       connman_network_set_method(network, CONNMAN_IPCONFIG_METHOD_DHCP);
+
        connman_network_set_connected(network, TRUE);
 
 done:
index 734523a..2181bde 100644 (file)
@@ -106,6 +106,8 @@ static void add_network(struct connman_device *device)
 
        connman_network_set_group(network, "cable");
 
+       connman_network_set_method(network, CONNMAN_IPCONFIG_METHOD_DHCP);
+
        connman_network_set_connected(network, TRUE);
 }
 
index 74e9786..e17528d 100644 (file)
@@ -234,6 +234,7 @@ static void iwmx_cm_dev_connected(struct wmxsdk *wmxsdk)
        }
        wmxsdk->nw = connman_network_ref(nw);
        wmxsdk->connecting_nw = NULL;
+       connman_network_set_method(network, CONNMAN_IPCONFIG_METHOD_DHCP);
        connman_network_set_connected(nw, TRUE);
        DBG("connected to network %s\n",
            connman_network_get_identifier(nw));
index 9805df7..22d53ff 100644 (file)
@@ -670,6 +670,8 @@ static void mbm_newlink(unsigned flags, unsigned change, void *user_data)
 
        if ((data->flags & IFF_LOWER_UP) != (flags & IFF_LOWER_UP)) {
                if (flags & IFF_LOWER_UP) {
+                       connman_network_set_method(network,
+                                       CONNMAN_IPCONFIG_METHOD_DHCP);
                        connman_network_set_connected(data->network, TRUE);
                } else {
                        connman_network_set_connected(data->network, FALSE);
index 49d9c7a..586f68e 100644 (file)
@@ -1375,6 +1375,8 @@ static void pri_context_changed(DBusConnection *connection,
                                set_network_active(pending_network, FALSE);
                        break;
                case CONNMAN_IPCONFIG_METHOD_DHCP:
+                       connman_network_set_method(pending_network,
+                                               CONNMAN_IPCONFIG_METHOD_DHCP);
                        connman_network_set_connected(pending_network, active);
                        break;
                }
index 8ae4b67..c9876ab 100644 (file)
@@ -1897,6 +1897,8 @@ static void state_change(struct supplicant_task *task, DBusMessage *msg)
                                                        bssid, bssid_len);
 
                /* carrier on */
+               connman_network_set_method(task->network,
+                               CONNMAN_IPCONFIG_METHOD_DHCP);
                connman_network_set_connected(task->network, TRUE);
                break;