summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2013-04-09 18:13:10 +0200
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-04-18 08:43:49 +0300
commit67d8ce571c3bb2ac04a9a19ef6a64da2d42d281c (patch)
tree747911f4a3a7107cc9812cee16d12e2076a63776 /plugins
parent25e4aa455047194dfce99abe9575866830818062 (diff)
downloadconnman-67d8ce571c3bb2ac04a9a19ef6a64da2d42d281c.tar.gz
connman-67d8ce571c3bb2ac04a9a19ef6a64da2d42d281c.tar.bz2
connman-67d8ce571c3bb2ac04a9a19ef6a64da2d42d281c.zip
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.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/session_policy_local.c6
1 files changed, 2 insertions, 4 deletions
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",