From 67d8ce571c3bb2ac04a9a19ef6a64da2d42d281c Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Tue, 9 Apr 2013 18:13:10 +0200 Subject: session_policy_local: Set default policy using common code Use connman_sessoin_set_default_config() instead of open coded version. This prepars the next fix. --- plugins/session_policy_local.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'plugins') diff --git a/plugins/session_policy_local.c b/plugins/session_policy_local.c index 5a8f6b8e..ecaf15c9 100644 --- a/plugins/session_policy_local.c +++ b/plugins/session_policy_local.c @@ -294,6 +294,8 @@ static int load_policy(struct policy_data *policy) char *str, **tokens; int i, err = 0; + connman_session_set_default_config(config); + pathname = g_strdup_printf("%s/%s", POLICYDIR, policy->ident); if(pathname == NULL) return -ENOMEM; @@ -318,8 +320,6 @@ static int load_policy(struct policy_data *policy) if (str != NULL) { config->roaming_policy = connman_session_parse_roaming_policy(str); g_free(str); - } else { - config->roaming_policy = CONNMAN_SESSION_ROAMING_POLICY_DEFAULT; } str = g_key_file_get_string(keyfile, "Default", "ConnectionType", @@ -327,8 +327,6 @@ static int load_policy(struct policy_data *policy) if (str != NULL) { config->type = connman_session_parse_connection_type(str); g_free(str); - } else { - config->type = CONNMAN_SESSION_TYPE_ANY; } config->ecall = g_key_file_get_boolean(keyfile, "Default", -- cgit v1.2.3