Add nameserver settings to the manual configuration setting
authorSamuel Ortiz <sameo@linux.intel.com>
Fri, 11 Jun 2010 13:24:10 +0000 (15:24 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Fri, 11 Jun 2010 13:34:33 +0000 (15:34 +0200)
This is needed for ofono when the modem sends fixed IP settings, along
with namesevers.

src/network.c

index 4310490..74b104b 100644 (file)
@@ -745,6 +745,7 @@ static void set_connected_manual(struct connman_network *network)
 {
        struct connman_service *service;
        struct connman_ipconfig *ipconfig;
+       const char *nameserver = NULL;
        int err;
 
        DBG("network %p", network);
@@ -762,6 +763,11 @@ static void set_connected_manual(struct connman_network *network)
                return;
        }
 
+       connman_element_get_value(&network->element,
+                       CONNMAN_PROPERTY_ID_IPV4_NAMESERVER, &nameserver);
+       if (nameserver != NULL)
+               __connman_service_append_nameserver(service, nameserver);
+
        __connman_ipconfig_set_gateway(ipconfig, &network->element);
 
        network->connecting = FALSE;