From ab0ab5a30379b84d6e05e1f2dc457bd1dd97401f Mon Sep 17 00:00:00 2001 From: Michal Zidek Date: Mon, 7 Jul 2014 16:46:18 +0200 Subject: ptask: Allow adding random_offset to scheduled execution time Reviewed-by: Jakub Hrozek Reviewed-by: Simo Sorce --- src/providers/ldap/ldap_id_cleanup.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/providers/ldap/ldap_id_cleanup.c') diff --git a/src/providers/ldap/ldap_id_cleanup.c b/src/providers/ldap/ldap_id_cleanup.c index 6b0bead28..0c473da30 100644 --- a/src/providers/ldap/ldap_id_cleanup.c +++ b/src/providers/ldap/ldap_id_cleanup.c @@ -86,9 +86,10 @@ errno_t ldap_setup_cleanup(struct sdap_id_ctx *id_ctx, } ret = be_ptask_create_sync(sdom, id_ctx->be, period, first_delay, - 5 /* enabled delay */, period /* timeout */, - BE_PTASK_OFFLINE_SKIP, ldap_cleanup_task, - cleanup_ctx, name, &sdom->cleanup_task); + 5 /* enabled delay */, 0 /* random offset */, + period /* timeout */, BE_PTASK_OFFLINE_SKIP, + ldap_cleanup_task, cleanup_ctx, name, + &sdom->cleanup_task); if (ret != EOK) { DEBUG(SSSDBG_FATAL_FAILURE, "Unable to initialize cleanup periodic " "task for %s\n", sdom->dom->name); -- cgit