summaryrefslogtreecommitdiff
path: root/src/wispr.c
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2012-01-03 14:36:28 +0200
committerDaniel Wagner <daniel.wagner@bmw-carit.de>2012-01-05 11:09:16 +0100
commit70ce3cd0a6130605a5f3c1f4f334bd501bece184 (patch)
tree70b21b96f9c5b9e8b7b534c7da0def4bf8650150 /src/wispr.c
parent097f0059d972e639d75ac7d0b27db759fbf05e5c (diff)
downloadconnman-70ce3cd0a6130605a5f3c1f4f334bd501bece184.tar.gz
connman-70ce3cd0a6130605a5f3c1f4f334bd501bece184.tar.bz2
connman-70ce3cd0a6130605a5f3c1f4f334bd501bece184.zip
service: Return all system defined nameservers when asked
The connman_service_get_nameservers() is changed to return all system defined nameservers. This means that the function now returns an allocated array of all nameservers and caller must deallocate the returned array. The change is needed so that we can combine the nameservers that are set by DHCP code and the IPv6 nameservers that are set by router advertisements.
Diffstat (limited to 'src/wispr.c')
-rw-r--r--src/wispr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wispr.c b/src/wispr.c
index 31f4caa6..9c45c72e 100644
--- a/src/wispr.c
+++ b/src/wispr.c
@@ -627,7 +627,7 @@ static int wispr_portal_detect(struct connman_wispr_portal_context *wp_context)
{
enum connman_service_type service_type;
char *interface = NULL;
- char **nameservers;
+ char **nameservers = NULL;
int if_index;
int err = 0;
int i;
@@ -695,6 +695,8 @@ static int wispr_portal_detect(struct connman_wispr_portal_context *wp_context)
err = -EINVAL;
done:
+ g_strfreev(nameservers);
+
g_free(interface);
return err;
}