network: Re-read ipconfig from service when setting manual addresses
authorPatrik Flykt <patrik.flykt@linux.intel.com>
Mon, 22 Aug 2011 10:44:27 +0000 (13:44 +0300)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 23 Aug 2011 14:25:01 +0000 (16:25 +0200)
When a service was disconnected, its ipconfig data was cleared.
Re-read service ipconfig data before setting manual addresses.

Fixes BMC#17738

src/network.c

index 7690112..95aecc7 100644 (file)
@@ -890,6 +890,8 @@ 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);
 
        set_configuration(network);
@@ -943,6 +945,8 @@ static int manual_ipv6_set(struct connman_network *network,
        if (service == NULL)
                return -EINVAL;
 
+       __connman_service_read_ip6config(service);
+
        err = __connman_ipconfig_address_add(ipconfig_ipv6);
        if (err < 0) {
                connman_network_set_error(network,