summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2010-08-03 22:30:08 (GMT)
committerSamuel Ortiz <sameo@linux.intel.com>2010-08-03 22:30:08 (GMT)
commit0ea143da0f451d381111592918a64edea7e30986 (patch)
tree4cb09fd68172bd903e2738b1f1d40bcbd9b45883
parentd6bf08d00b9b64fe391be2f587d72d6731764b2f (diff)
downloadconnman-0ea143da0f451d381111592918a64edea7e30986.zip
connman-0ea143da0f451d381111592918a64edea7e30986.tar.gz
connman-0ea143da0f451d381111592918a64edea7e30986.tar.bz2
Use connman_resolver_append() for adding VPN nameservers
Only the last would be added with __connman_service_append_nameserver().
-rw-r--r--src/provider.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/provider.c b/src/provider.c
index 589a3d6..1753f2f 100644
--- a/src/provider.c
+++ b/src/provider.c
@@ -236,7 +236,7 @@ static int set_connected(struct connman_provider *provider,
enum connman_element_type type = CONNMAN_ELEMENT_TYPE_UNKNOWN;
struct connman_element *element;
char *nameservers = NULL, *name = NULL;
- const char *value;
+ const char *value, *first;
int err;
__connman_service_indicate_state(provider->vpn_service,
@@ -268,13 +268,15 @@ static int set_connected(struct connman_provider *provider,
nameservers = g_strdup(provider->dns);
value = nameservers;
+ first = strchr(value, ' ');
+ __connman_service_append_nameserver(service, first);
name = connman_inet_ifname(provider->element.index);
while (value) {
char *next = strchr(value, ' ');
if (next)
*(next++) = 0;
- __connman_service_append_nameserver(service, value);
+ connman_resolver_append(name, provider->domain, value);
value = next;
}