summaryrefslogtreecommitdiffstats
path: root/server/providers/ldap/ldap_id_cleanup.c
diff options
context:
space:
mode:
Diffstat (limited to 'server/providers/ldap/ldap_id_cleanup.c')
-rw-r--r--server/providers/ldap/ldap_id_cleanup.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/providers/ldap/ldap_id_cleanup.c b/server/providers/ldap/ldap_id_cleanup.c
index 7267b3540..60d3b28ac 100644
--- a/server/providers/ldap/ldap_id_cleanup.c
+++ b/server/providers/ldap/ldap_id_cleanup.c
@@ -60,8 +60,6 @@ static void ldap_id_cleanup_timer(struct tevent_context *ev,
return;
}
- ctx->last_run = tv;
-
req = ldap_id_cleanup_send(ctx, ev, ctx);
if (!req) {
DEBUG(1, ("Failed to schedule cleanup, retrying later!\n"));
@@ -113,7 +111,7 @@ static void ldap_id_cleanup_reschedule(struct tevent_req *req)
/* On error schedule starting from now, not the last run */
tv = tevent_timeval_current();
} else {
- tv = ctx->last_run;
+ tv = ctx->last_purge;
}
talloc_zfree(req);
@@ -177,6 +175,8 @@ struct tevent_req *ldap_id_cleanup_send(TALLOC_CTX *memctx,
}
tevent_req_set_callback(subreq, ldap_id_cleanup_users_done, req);
+ ctx->last_purge = tevent_timeval_current();
+
return req;
}