summaryrefslogtreecommitdiff
path: root/src/providers/ldap/sdap_async_enum.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2013-08-22 11:02:32 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-08-28 18:06:57 +0200
commit66edf42c51f8591c93204b6490c103fa51346f47 (patch)
tree4d60cd3434c1ce2236e488a154720bdde2e75935 /src/providers/ldap/sdap_async_enum.c
parent34a63c4a00096da7a8e09d49b5970bb1f807eddc (diff)
downloadsssd-66edf42c51f8591c93204b6490c103fa51346f47.tar.gz
sssd-66edf42c51f8591c93204b6490c103fa51346f47.tar.bz2
sssd-66edf42c51f8591c93204b6490c103fa51346f47.zip
LDAP: Make the cleanup task reusable for subdomains
Instead of always performing the cleanup on the main domain, the task now accepts a sdap_domain structure to perform the cleanup on. This change will make the cleanup task reusable for subdomains.
Diffstat (limited to 'src/providers/ldap/sdap_async_enum.c')
-rw-r--r--src/providers/ldap/sdap_async_enum.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/providers/ldap/sdap_async_enum.c b/src/providers/ldap/sdap_async_enum.c
index b34b801a..625db645 100644
--- a/src/providers/ldap/sdap_async_enum.c
+++ b/src/providers/ldap/sdap_async_enum.c
@@ -93,7 +93,7 @@ sdap_dom_enum_send(TALLOC_CTX *memctx,
sdom->last_enum = tevent_timeval_current();
t = dp_opt_get_int(ctx->opts->basic, SDAP_CACHE_PURGE_TIMEOUT);
- if ((ctx->last_purge.tv_sec + t) < sdom->last_enum.tv_sec) {
+ if ((sdom->last_purge.tv_sec + t) < sdom->last_enum.tv_sec) {
state->purge = true;
}
@@ -311,7 +311,7 @@ static void sdap_dom_enum_services_done(struct tevent_req *subreq)
}
if (state->purge) {
- ret = ldap_id_cleanup(state->ctx);
+ ret = ldap_id_cleanup(state->ctx->opts, state->sdom->dom);
if (ret != EOK) {
/* Not fatal, worst case we'll have stale entries that would be
* removed on a subsequent online lookup