summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2014-11-10 14:26:32 +0100
committerJakub Hrozek <jhrozek@redhat.com>2014-11-28 16:16:52 +0100
commit087da85079ec1ac51b3b97cafca19c5d243769fb (patch)
tree4e9a58b2b34979d04721287ba64db0b187c07006 /src
parentda747252563b94069ccc7fa6882bc608bb84053d (diff)
downloadsssd-087da85079ec1ac51b3b97cafca19c5d243769fb.tar.gz
sssd-087da85079ec1ac51b3b97cafca19c5d243769fb.tar.xz
sssd-087da85079ec1ac51b3b97cafca19c5d243769fb.zip
be_ptask: add next_execution time to struct be_ptask
For debugging and testing purposes. Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/providers/dp_ptask.c2
-rw-r--r--src/providers/dp_ptask_private.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/providers/dp_ptask.c b/src/providers/dp_ptask.c
index 5a14e60b2..9eca429d1 100644
--- a/src/providers/dp_ptask.c
+++ b/src/providers/dp_ptask.c
@@ -238,6 +238,8 @@ static void be_ptask_schedule(struct be_ptask *task,
task->name);
be_ptask_disable(task);
}
+
+ task->next_execution = tv.tv_sec;
}
errno_t be_ptask_create(TALLOC_CTX *mem_ctx,
diff --git a/src/providers/dp_ptask_private.h b/src/providers/dp_ptask_private.h
index 29694720d..9c97fae7b 100644
--- a/src/providers/dp_ptask_private.h
+++ b/src/providers/dp_ptask_private.h
@@ -38,6 +38,7 @@ struct be_ptask {
void *pvt;
const char *name;
+ time_t next_execution; /* next time when the task is scheduled */
time_t last_execution; /* last time when send was called */
struct tevent_req *req; /* active tevent request */
struct tevent_timer *timer; /* active tevent timer */