diff options
author | Sumit Bose <sbose@redhat.com> | 2010-05-20 13:18:30 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-05-27 14:44:14 -0400 |
commit | beb8badafcd17a279e910b1133e777c129166ce1 (patch) | |
tree | be84864770ed82c6fdcf6f1a853a1af69200a321 | |
parent | 35480afaefafb77b28d35b29039989ab888aafe9 (diff) | |
download | sssd-beb8badafcd17a279e910b1133e777c129166ce1.tar.gz sssd-beb8badafcd17a279e910b1133e777c129166ce1.tar.bz2 sssd-beb8badafcd17a279e910b1133e777c129166ce1.zip |
Reset run_online_cb flag even if there are no callbacks
-rw-r--r-- | src/providers/data_provider_callbacks.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/providers/data_provider_callbacks.c b/src/providers/data_provider_callbacks.c index 55527130..8ed2e5b6 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")); + } } } |