summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2010-05-20 13:18:30 +0200
committerStephen Gallagher <sgallagh@redhat.com>2010-05-20 14:04:56 -0400
commiteb405b4d76371abffebbc4cabb327db24167e02b (patch)
tree792466d524741629839cca52f10d30cac863fe5d
parent9e4899d75dd13904b2310206fad4790b867c5a94 (diff)
downloadsssd-eb405b4d76371abffebbc4cabb327db24167e02b.tar.gz
sssd-eb405b4d76371abffebbc4cabb327db24167e02b.tar.xz
sssd-eb405b4d76371abffebbc4cabb327db24167e02b.zip
Reset run_online_cb flag even if there are no callbacks
-rw-r--r--src/providers/data_provider_callbacks.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/providers/data_provider_callbacks.c b/src/providers/data_provider_callbacks.c
index 555271306..8ed2e5b60 100644
--- a/src/providers/data_provider_callbacks.c
+++ b/src/providers/data_provider_callbacks.c
@@ -163,21 +163,23 @@ int be_add_online_cb(TALLOC_CTX *mem_ctx, struct be_ctx *ctx, be_callback_t cb,
void be_run_online_cb(struct be_ctx *be) {
int ret;
- if (be->run_online_cb && be->online_cb_list) {
+ if (be->run_online_cb) {
/* Reset the flag. We only want to run these
* callbacks when transitioning to online
*/
be->run_online_cb = false;
- DEBUG(3, ("Going online. Running callbacks.\n"));
+ if (be->online_cb_list) {
+ DEBUG(3, ("Going online. Running callbacks.\n"));
- ret = be_run_cb(be, be->online_cb_list);
- if (ret != EOK) {
- DEBUG(1, ("be_run_cb failed.\n"));
- }
+ ret = be_run_cb(be, be->online_cb_list);
+ if (ret != EOK) {
+ DEBUG(1, ("be_run_cb failed.\n"));
+ }
- } else {
- DEBUG(9, ("Online call back list is empty, nothing to do.\n"));
+ } else {
+ DEBUG(9, ("Online call back list is empty, nothing to do.\n"));
+ }
}
}