summaryrefslogtreecommitdiff
path: root/vpn/vpn-provider.c
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2013-02-19 10:45:06 +0200
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-02-19 14:29:40 +0200
commit905d85575aacb039295f1d8bd26088dcb8da6355 (patch)
treeea9d32cb83fcaff1e39f691333f771997fcf5f0f /vpn/vpn-provider.c
parent4115c1071718019c38c76f27e17d7161012551de (diff)
downloadconnman-905d85575aacb039295f1d8bd26088dcb8da6355.tar.gz
connman-905d85575aacb039295f1d8bd26088dcb8da6355.tar.bz2
connman-905d85575aacb039295f1d8bd26088dcb8da6355.zip
vpn-provider: Allow use of Domain property name
Allow use of both VPN.Domain and Domain property strings.
Diffstat (limited to 'vpn/vpn-provider.c')
-rw-r--r--vpn/vpn-provider.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/vpn/vpn-provider.c b/vpn/vpn-provider.c
index 9d4de011..0b5b5623 100644
--- a/vpn/vpn-provider.c
+++ b/vpn/vpn-provider.c
@@ -1758,7 +1758,8 @@ int __vpn_provider_create(DBusMessage *msg)
dbus_message_iter_get_basic(&value, &name);
else if (g_str_equal(key, "Host") == TRUE)
dbus_message_iter_get_basic(&value, &host);
- else if (g_str_equal(key, "VPN.Domain") == TRUE)
+ else if (g_str_equal(key, "VPN.Domain") == TRUE ||
+ g_str_equal(key, "Domain") == TRUE)
dbus_message_iter_get_basic(&value, &domain);
break;
case DBUS_TYPE_ARRAY:
@@ -2091,7 +2092,8 @@ static int set_string(struct vpn_provider *provider,
g_free(provider->host);
provider->host = g_strdup(value);
send_value(provider->path, "Host", provider->host);
- } else if (g_str_equal(key, "VPN.Domain") == TRUE) {
+ } else if (g_str_equal(key, "VPN.Domain") == TRUE ||
+ g_str_equal(key, "Domain") == TRUE) {
g_free(provider->domain);
provider->domain = g_strdup(value);
send_value(provider->path, "Domain", provider->domain);
@@ -2146,7 +2148,8 @@ const char *vpn_provider_get_string(struct vpn_provider *provider,
return provider->host;
else
return provider->host_ip[0];
- } else if (g_str_equal(key, "VPN.Domain") == TRUE)
+ } else if (g_str_equal(key, "VPN.Domain") == TRUE ||
+ g_str_equal(key, "Domain") == TRUE)
return provider->domain;
setting = g_hash_table_lookup(provider->setting_strings, key);