From: Samuel Ortiz Date: Thu, 24 Feb 2011 01:47:00 +0000 (+0100) Subject: network: Fix the manual setting case X-Git-Tag: 2.0_alpha~1691 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f01f715d0fb71586a7d5fb08ce9727fe92ecb54b;p=framework%2Fconnectivity%2Fconnman.git network: Fix the manual setting case --- diff --git a/src/network.c b/src/network.c index c36ddcb..0ab23e2 100644 --- a/src/network.c +++ b/src/network.c @@ -743,8 +743,6 @@ static void set_connected_manual(struct connman_network *network) { struct connman_service *service; struct connman_ipconfig *ipconfig; - const char *nameserver = NULL; - const char *gateway; int err; DBG("network %p", network); @@ -759,19 +757,9 @@ static void set_connected_manual(struct connman_network *network) if (err < 0) goto err; - connman_element_get_value(&network->element, - CONNMAN_PROPERTY_ID_IPV4_NAMESERVER, &nameserver); - if (nameserver != NULL) - __connman_service_nameserver_append(service, nameserver); - - connman_element_get_value(&network->element, - CONNMAN_PROPERTY_ID_IPV4_GATEWAY, &gateway); - if (gateway != NULL) { - __connman_ipconfig_set_gateway(ipconfig, gateway); - err = __connman_ipconfig_gateway_add(ipconfig); - if (err < 0) - goto err; - } + err = __connman_ipconfig_gateway_add(ipconfig); + if (err < 0) + goto err; network->connecting = FALSE; @@ -780,6 +768,8 @@ static void set_connected_manual(struct connman_network *network) __connman_service_indicate_state(service, CONNMAN_SERVICE_STATE_READY, CONNMAN_IPCONFIG_TYPE_IPV4); + return; + err: connman_network_set_error(network, CONNMAN_NETWORK_ERROR_CONFIGURE_FAIL); @@ -1101,7 +1091,6 @@ static int manual_ipv4_set(struct connman_network *network, struct connman_ipconfig *ipconfig) { struct connman_service *service; - const char *gateway; int err; service = __connman_service_lookup_from_network(network); @@ -1115,12 +1104,7 @@ static int manual_ipv4_set(struct connman_network *network, return err; } - connman_element_get_value(&network->element, - CONNMAN_PROPERTY_ID_IPV4_GATEWAY, &gateway); - if (gateway != NULL) { - __connman_ipconfig_set_gateway(ipconfig, gateway); - __connman_ipconfig_gateway_add(ipconfig); - } + __connman_ipconfig_gateway_add(ipconfig); __connman_service_indicate_state(service, CONNMAN_SERVICE_STATE_READY, CONNMAN_IPCONFIG_TYPE_IPV4);