diff options
author | Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com> | 2011-12-29 13:02:22 +0200 |
---|---|---|
committer | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2012-01-05 11:03:39 +0100 |
commit | de96413b24937db8993a4eaee6ee03db9b9047e0 (patch) | |
tree | 385b2d341ca05264a2d9a88ba98cc009d112a3d2 /src/wispr.c | |
parent | c3fca5e6ccf799a5ced41edd29ff384c4468794c (diff) | |
download | connman-de96413b24937db8993a4eaee6ee03db9b9047e0.tar.gz connman-de96413b24937db8993a4eaee6ee03db9b9047e0.tar.bz2 connman-de96413b24937db8993a4eaee6ee03db9b9047e0.zip |
wispr: using only the nameservers from requested service
Diffstat (limited to 'src/wispr.c')
-rw-r--r-- | src/wispr.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/wispr.c b/src/wispr.c index 84df2bc9..85ee857f 100644 --- a/src/wispr.c +++ b/src/wispr.c @@ -625,8 +625,10 @@ static int wispr_portal_detect(struct connman_wispr_portal_context *wp_context) { enum connman_service_type service_type; char *interface = NULL; + char **nameservers; int if_index; int err = 0; + int i; DBG("wispr/portal context %p", wp_context); DBG("service %p", wp_context->service); @@ -660,6 +662,12 @@ static int wispr_portal_detect(struct connman_wispr_portal_context *wp_context) goto done; } + nameservers = connman_service_get_nameservers(wp_context->service); + if (nameservers == NULL) { + err = -EINVAL; + goto done; + } + wp_context->web = g_web_new(if_index); if (wp_context->web == NULL) { err = -ENOMEM; @@ -674,6 +682,9 @@ static int wispr_portal_detect(struct connman_wispr_portal_context *wp_context) wp_context->status_url = STATUS_URL_IPV6; } + for (i = 0; nameservers[i] != NULL; i++) + g_web_add_nameserver(wp_context->web, nameservers[i]); + wp_context->token = connman_proxy_lookup(interface, wp_context->status_url, wp_context->service, |