From: Jukka Rissanen Date: Fri, 26 Aug 2011 11:43:10 +0000 (+0300) Subject: network: Read only the ipconfig data if we have no address X-Git-Tag: 0.78~293 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0e9e9bb9ce59f3919b1dec1ab0cda22b7aedce2a;p=platform%2Fupstream%2Fconnman.git network: Read only the ipconfig data if we have no address We must not read ipconfig data from file if there is already a valid address that was set by service set_property(). Fixes BMC#22767 --- diff --git a/src/network.c b/src/network.c index 95aecc7..d360282 100644 --- a/src/network.c +++ b/src/network.c @@ -890,10 +890,11 @@ static void set_connected_manual(struct connman_network *network) service = __connman_service_lookup_from_network(network); - __connman_service_read_ip4config(service); - ipconfig = __connman_service_get_ip4config(service); + if (__connman_ipconfig_get_local(ipconfig) == NULL) + __connman_service_read_ip4config(service); + set_configuration(network); err = __connman_ipconfig_address_add(ipconfig); @@ -945,7 +946,8 @@ static int manual_ipv6_set(struct connman_network *network, if (service == NULL) return -EINVAL; - __connman_service_read_ip6config(service); + if (__connman_ipconfig_get_local(ipconfig_ipv6) == NULL) + __connman_service_read_ip6config(service); err = __connman_ipconfig_address_add(ipconfig_ipv6); if (err < 0) {