From: Patrik Flykt Date: Fri, 1 Jul 2011 08:01:08 +0000 (+0300) Subject: provider: Properly set host and domain provider members X-Git-Tag: 2.0_alpha~1349 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=74099465def80adc6f820ecd1237ec47bfe6cdb4;p=framework%2Fconnectivity%2Fconnman.git provider: Properly set host and domain provider members 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. --- 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; }