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 5d366ae..fc0c9e1 100644
--- a/src/provider.c
+++ b/src/provider.c
@@ -628,9 +628,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