summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2013-04-09 16:13:13 (GMT)
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-04-18 05:44:08 (GMT)
commit7b7d8617ac4e6c3455c051fd80466a2fd2452455 (patch)
tree8396aced5688e7672a0dec05ea6397bdaddbc306 /plugins
parentf9e7f5c9b73fd81e2b1ccd89833506c8e66156aa (diff)
downloadconnman-7b7d8617ac4e6c3455c051fd80466a2fd2452455.zip
connman-7b7d8617ac4e6c3455c051fd80466a2fd2452455.tar.gz
connman-7b7d8617ac4e6c3455c051fd80466a2fd2452455.tar.bz2
session_policy_local: Load policy when a new file is added
When a file is added (not modified) we need to parse it as well
Diffstat (limited to 'plugins')
-rw-r--r--plugins/session_policy_local.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/session_policy_local.c b/plugins/session_policy_local.c
index aa734a1..6a527cb 100644
--- a/plugins/session_policy_local.c
+++ b/plugins/session_policy_local.c
@@ -404,6 +404,13 @@ static void notify_handler(struct inotify_event *event,
policy_ref(policy);
else
policy = create_policy(ident);
+
+ err = load_policy(policy);
+ if (err < 0) {
+ connman_warn("Loading policy file '%s' failed with %s",
+ ident, strerror(-err));
+ return;
+ }
}
if (policy == NULL)