From: Patrik Flykt <[email protected]>

Detect 'Host' and 'VPN.Domain' strings being set and insert them
properly into the provider structure. Also ensure that the
strings corresponding to provider structure members are not
duplicated into the provider string settings hash.
---
 src/provider.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/provider.c b/src/provider.c
index 5bc8c40..39b9a9b 100644
--- a/src/provider.c
+++ b/src/provider.c
@@ -623,9 +623,14 @@ int connman_provider_set_string(struct connman_provider 
*provider,
        } else if (g_str_equal(key, "Name") == TRUE) {
                g_free(provider->name);
                provider->name = g_strdup(value);
-       }
-
-       g_hash_table_replace(provider->setting_strings,
+       } else if (g_str_equal(key, "Host") == TRUE) {
+               g_free(provider->host);
+               provider->host = g_strdup(value);
+       } else if (g_str_equal(key, "VPN.Domain") == TRUE) {
+               g_free(provider->domain);
+               provider->domain = g_strdup(value);
+       } else
+               g_hash_table_replace(provider->setting_strings,
                                g_strdup(key), g_strdup(value));
        return 0;
 }
-- 
1.7.2.5

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to