diff options
author | Jukka Rissanen <jukka.rissanen@linux.intel.com> | 2012-11-12 14:07:31 +0200 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-11-23 12:58:51 +0200 |
commit | f9603194e91e48ce1badc1378a7b973a7e925013 (patch) | |
tree | 538b2e6b452a5258fa0b73d637030438c9c2bf24 /vpn | |
parent | 4034f337edbb89f87465a05066cace379f6cc14f (diff) | |
download | connman-f9603194e91e48ce1badc1378a7b973a7e925013.tar.gz connman-f9603194e91e48ce1badc1378a7b973a7e925013.tar.bz2 connman-f9603194e91e48ce1badc1378a7b973a7e925013.zip |
vpn: Resolve vpn hostname if necessary
Diffstat (limited to 'vpn')
-rw-r--r-- | vpn/vpn-provider.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/vpn/vpn-provider.c b/vpn/vpn-provider.c index eb12f04e..5dfd0106 100644 --- a/vpn/vpn-provider.c +++ b/vpn/vpn-provider.c @@ -1749,7 +1749,13 @@ const char *vpn_provider_get_string(struct vpn_provider *provider, return provider->name; else if (g_str_equal(key, "Host") == TRUE) return provider->host; - else if (g_str_equal(key, "VPN.Domain") == TRUE) + else if (g_str_equal(key, "HostIP") == TRUE) { + if (provider->host_ip == NULL || + provider->host_ip[0] == NULL) + return provider->host; + else + return provider->host_ip[0]; + } else if (g_str_equal(key, "VPN.Domain") == TRUE) return provider->domain; return g_hash_table_lookup(provider->setting_strings, key); |