From: Martin Xu Date: Wed, 30 Dec 2009 08:24:09 +0000 (+0800) Subject: Set network method as CONNMAN_IPCONFIG_METHOD_DHCP X-Git-Tag: 2.0_alpha~2953 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4373a96829d0ed1153b5c72f8ef7c9522e3b7a07;p=framework%2Fconnectivity%2Fconnman.git Set network method as CONNMAN_IPCONFIG_METHOD_DHCP Before calling connman_network_set_connected(true), the method should be set to CONNMAN_IPCONFIG_METHOD_DHCP. --- diff --git a/plugins/bluetooth.c b/plugins/bluetooth.c index 9955f84..0647cc4 100644 --- a/plugins/bluetooth.c +++ b/plugins/bluetooth.c @@ -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: diff --git a/plugins/ethernet.c b/plugins/ethernet.c index 734523a..2181bde 100644 --- a/plugins/ethernet.c +++ b/plugins/ethernet.c @@ -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); } diff --git a/plugins/iwmx.c b/plugins/iwmx.c index 74e9786..e17528d 100644 --- a/plugins/iwmx.c +++ b/plugins/iwmx.c @@ -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)); diff --git a/plugins/mbm.c b/plugins/mbm.c index 9805df7..22d53ff 100644 --- a/plugins/mbm.c +++ b/plugins/mbm.c @@ -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); diff --git a/plugins/ofono.c b/plugins/ofono.c index 49d9c7a..586f68e 100644 --- a/plugins/ofono.c +++ b/plugins/ofono.c @@ -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; } diff --git a/plugins/supplicant.c b/plugins/supplicant.c index 8ae4b67..c9876ab 100644 --- a/plugins/supplicant.c +++ b/plugins/supplicant.c @@ -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;