summaryrefslogtreecommitdiff
path: root/plugins/session_policy_local.c
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2013-04-09 18:13:11 +0200
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-04-18 08:43:53 +0300
commit024b7ab98be603e7586aa5b36c8a65725b8b2ce4 (patch)
tree75a7d0b8abbbcdccb1ccabf2a72d6c4385b65afd /plugins/session_policy_local.c
parent67d8ce571c3bb2ac04a9a19ef6a64da2d42d281c (diff)
downloadconnman-024b7ab98be603e7586aa5b36c8a65725b8b2ce4.tar.gz
connman-024b7ab98be603e7586aa5b36c8a65725b8b2ce4.tar.bz2
connman-024b7ab98be603e7586aa5b36c8a65725b8b2ce4.zip
session_policy_local: Empty policy list indicated no match all
Match all is expressed via CONNMAN_SERVICE_TYPE_UNKNOWN. An empty list means no match.
Diffstat (limited to 'plugins/session_policy_local.c')
-rw-r--r--plugins/session_policy_local.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/plugins/session_policy_local.c b/plugins/session_policy_local.c
index ecaf15c9..fa8349f4 100644
--- a/plugins/session_policy_local.c
+++ b/plugins/session_policy_local.c
@@ -332,13 +332,13 @@ static int load_policy(struct policy_data *policy)
config->ecall = g_key_file_get_boolean(keyfile, "Default",
"EmergencyCall", NULL);
- g_slist_free(config->allowed_bearers);
- config->allowed_bearers = NULL;
-
str = g_key_file_get_string(keyfile, "Default", "AllowedBearers",
NULL);
if (str != NULL) {
+ g_slist_free(config->allowed_bearers);
+ config->allowed_bearers = NULL;
+
tokens = g_strsplit(str, " ", 0);
for (i = 0; tokens[i] != NULL; i++) {
@@ -350,11 +350,6 @@ static int load_policy(struct policy_data *policy)
g_free(str);
g_strfreev(tokens);
- } else {
- config->allowed_bearers = g_slist_append(NULL,
- GINT_TO_POINTER(CONNMAN_SERVICE_TYPE_UNKNOWN));
- if (config->allowed_bearers == NULL)
- err = -ENOMEM;
}
g_key_file_free(keyfile);