summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2010-08-03 22:22:33 (GMT)
committerSamuel Ortiz <sameo@linux.intel.com>2010-08-03 22:22:33 (GMT)
commitd6bf08d00b9b64fe391be2f587d72d6731764b2f (patch)
treec88dd9dde6ef35c242bd3755edbe6c62fa14000a
parent0452e97a9d6907b13a600276d4ffa22a911166fa (diff)
downloadconnman-d6bf08d00b9b64fe391be2f587d72d6731764b2f.zip
connman-d6bf08d00b9b64fe391be2f587d72d6731764b2f.tar.gz
connman-d6bf08d00b9b64fe391be2f587d72d6731764b2f.tar.bz2
Add VPN nameservers after being connected
-rw-r--r--src/provider.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/provider.c b/src/provider.c
index ca9c830..589a3d6 100644
--- a/src/provider.c
+++ b/src/provider.c
@@ -251,6 +251,19 @@ static int set_connected(struct connman_provider *provider,
element->type = type;
element->index = provider->element.index;
+ err = connman_provider_setup_vpn_ipv4(provider, element);
+ if (err < 0) {
+ connman_element_unref(element);
+
+ __connman_service_indicate_state(service,
+ CONNMAN_SERVICE_STATE_FAILURE);
+
+ return err;
+ }
+
+ __connman_service_indicate_state(service,
+ CONNMAN_SERVICE_STATE_READY);
+
__connman_service_set_domainname(service, provider->domain);
nameservers = g_strdup(provider->dns);
@@ -268,18 +281,6 @@ static int set_connected(struct connman_provider *provider,
g_free(nameservers);
g_free(name);
- err = connman_provider_setup_vpn_ipv4(provider, element);
- if (err < 0) {
- connman_element_unref(element);
-
- __connman_service_indicate_state(service,
- CONNMAN_SERVICE_STATE_FAILURE);
-
- return err;
- }
-
- __connman_service_indicate_state(service,
- CONNMAN_SERVICE_STATE_READY);
} else {
connman_element_unregister_children(&provider->element);
__connman_service_indicate_state(service,