summaryrefslogtreecommitdiffstats
path: root/src/providers/dp_ptask.c
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2014-12-08 19:43:41 +0100
committerJakub Hrozek <jhrozek@redhat.com>2014-12-11 14:06:31 +0100
commit5d69dd4d62dab877dfc3c88e410816034981915f (patch)
treeec4ddc5d6527a990e9ec046fffbbef665c7339af /src/providers/dp_ptask.c
parent5a05b6127064c74349f1edae32e5e13032c386fe (diff)
downloadsssd-5d69dd4d62dab877dfc3c88e410816034981915f.tar.gz
sssd-5d69dd4d62dab877dfc3c88e410816034981915f.tar.xz
sssd-5d69dd4d62dab877dfc3c88e410816034981915f.zip
be_ptask: use gettimeofday() instead of time()
Sometimes the timestamp from gettimeofday() slightly differs from the one obtained via time() which caused unit test to fail on occasionaly. Resolves: https://fedorahosted.org/sssd/ticket/2521 Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
Diffstat (limited to 'src/providers/dp_ptask.c')
-rw-r--r--src/providers/dp_ptask.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/providers/dp_ptask.c b/src/providers/dp_ptask.c
index b5ab79b1d..e3450851e 100644
--- a/src/providers/dp_ptask.c
+++ b/src/providers/dp_ptask.c
@@ -132,7 +132,7 @@ static void be_ptask_execute(struct tevent_context *ev,
DEBUG(SSSDBG_TRACE_FUNC, "Task [%s]: executing task, timeout %lu "
"seconds\n", task->name, task->timeout);
- task->last_execution = time(NULL);
+ task->last_execution = tv.tv_sec;
task->req = task->send_fn(task, task->ev, task->be_ctx, task, task->pvt);
if (task->req == NULL) {