diff options
author | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2013-05-31 09:13:30 +0200 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2013-05-31 14:39:41 +0300 |
commit | 61ed5e2bd527eb2631b365123462503cfe6952fb (patch) | |
tree | e139046a0b46ee7597029deaf69472a9b9c1f127 /plugins | |
parent | 99249a49b7d5e9c763ff21214b08aac3b5fbfd99 (diff) | |
download | connman-61ed5e2bd527eb2631b365123462503cfe6952fb.tar.gz connman-61ed5e2bd527eb2631b365123462503cfe6952fb.tar.bz2 connman-61ed5e2bd527eb2631b365123462503cfe6952fb.zip |
session_policy_local: Update session before unref policy
The update flag can be removed as it is no longer needed.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/session_policy_local.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/plugins/session_policy_local.c b/plugins/session_policy_local.c index 21b794dd..33152abe 100644 --- a/plugins/session_policy_local.c +++ b/plugins/session_policy_local.c @@ -347,18 +347,12 @@ static void update_session(struct connman_session *session) static void remove_policy(struct policy_data *policy) { - connman_bool_t update = FALSE; - - if (policy->session != NULL) - update = TRUE; + if (policy->session != NULL) { + connman_session_set_default_config(policy->config); + update_session(policy->session); + } policy_unref(policy); - - if (update == FALSE) - return; - - connman_session_set_default_config(policy->config); - update_session(policy->session); } static void notify_handler(struct inotify_event *event, |