diff options
author | Pavel Březina <pbrezina@redhat.com> | 2013-10-24 11:17:43 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-10-25 22:12:19 +0200 |
commit | 6e3f79799ce7e736dd19ae2e05a60dc1901613f1 (patch) | |
tree | ec39b2221565b071dae76085af4169d30d49892b /src/providers/ldap/ldap_common.c | |
parent | 4d6edda295ff05825d924f0450d2c2bf2034c357 (diff) | |
download | sssd-6e3f79799ce7e736dd19ae2e05a60dc1901613f1.tar.gz sssd-6e3f79799ce7e736dd19ae2e05a60dc1901613f1.tar.xz sssd-6e3f79799ce7e736dd19ae2e05a60dc1901613f1.zip |
dp: convert cleanup task to be_ptask
Resolves:
https://fedorahosted.org/sssd/ticket/1968
Diffstat (limited to 'src/providers/ldap/ldap_common.c')
-rw-r--r-- | src/providers/ldap/ldap_common.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/providers/ldap/ldap_common.c b/src/providers/ldap/ldap_common.c index e5c457c24..fcb8c4884 100644 --- a/src/providers/ldap/ldap_common.c +++ b/src/providers/ldap/ldap_common.c @@ -951,29 +951,19 @@ int sdap_id_setup_tasks(struct sdap_id_ctx *ctx, be_ptask_send_t send_fn, be_ptask_recv_t recv_fn) { - struct timeval tv; - int ret = EOK; - int delay; + int ret; /* set up enumeration task */ if (sdom->dom->enumerate) { - DEBUG(SSSDBG_TRACE_FUNC, ("Setting up enumeration for %s\n", sdom->dom->name)); + DEBUG(SSSDBG_TRACE_FUNC, ("Setting up enumeration for %s\n", + sdom->dom->name)); ret = ldap_setup_enumeration(ctx, conn, sdom, send_fn, recv_fn); } else { /* the enumeration task, runs the cleanup process by itself, * but if enumeration is not running we need to schedule it */ - delay = dp_opt_get_int(ctx->opts->basic, SDAP_CACHE_PURGE_TIMEOUT); - if (delay == 0) { - /* Cleanup has been explicitly disabled, so we won't - * schedule any cleanup tasks. - */ - return EOK; - } - - /* run the first one in a couple of seconds so that we have time to - * finish initializations first*/ - tv = tevent_timeval_current_ofs(10, 0); - ret = ldap_id_cleanup_create_timer(ctx, sdom, tv); + DEBUG(SSSDBG_TRACE_FUNC, ("Setting up cleanup task for %s\n", + sdom->dom->name)); + ret = ldap_setup_cleanup(ctx, sdom); } return ret; |