summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2013-03-28 14:55:07 +0200
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-04-03 11:45:38 +0300
commit1634fcbb35f2968866b773ed2f9460d0d0f303b8 (patch)
tree47905de97163d817ae4f1f0616949103f1e3e4d0 /plugins
parentcc451da07895b1b2bc4c20c901344ce2ce3e3f08 (diff)
downloadconnman-1634fcbb35f2968866b773ed2f9460d0d0f303b8.tar.gz
connman-1634fcbb35f2968866b773ed2f9460d0d0f303b8.tar.bz2
connman-1634fcbb35f2968866b773ed2f9460d0d0f303b8.zip
vpn: Update domain name when received from vpnd
Diffstat (limited to 'plugins')
-rw-r--r--plugins/vpn.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/vpn.c b/plugins/vpn.c
index d33d7c1f..7a768c84 100644
--- a/plugins/vpn.c
+++ b/plugins/vpn.c
@@ -610,6 +610,7 @@ static void add_connection(const char *path, DBusMessageIter *properties,
data->host = g_strdup(str);
} else if (g_str_equal(key, "Domain") == TRUE) {
dbus_message_iter_get_basic(&value, &str);
+ g_free(data->domain);
data->domain = g_strdup(str);
} else if (g_str_equal(key, "Nameservers") == TRUE) {
extract_nameservers(&value, data);
@@ -647,6 +648,10 @@ static void add_connection(const char *path, DBusMessageIter *properties,
connman_provider_set_nameservers(data->provider,
data->nameservers);
+ if (data->domain != NULL)
+ connman_provider_set_domain(data->provider,
+ data->domain);
+
if (data->connect_pending == TRUE)
connect_provider(data, data->cb_data);
@@ -1764,6 +1769,11 @@ static gboolean property_changed(DBusConnection *conn,
data->nameservers != NULL)
connman_provider_set_nameservers(data->provider,
data->nameservers);
+ } else if (g_str_equal(key, "Domain") == TRUE) {
+ dbus_message_iter_get_basic(&value, &str);
+ g_free(data->domain);
+ data->domain = g_strdup(str);
+ connman_provider_set_domain(data->provider, data->domain);
}
if (ip_set == TRUE && err == 0) {