summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2014-11-10 13:59:27 +0100
committerJakub Hrozek <jhrozek@redhat.com>2014-11-28 16:16:50 +0100
commitda747252563b94069ccc7fa6882bc608bb84053d (patch)
tree15fbe2c6fd7d68a7f017f0e6088b8c3568030e20
parentfa70db6004a099afb7cb55031cd7bacb9e78202e (diff)
downloadsssd-da747252563b94069ccc7fa6882bc608bb84053d.zip
sssd-da747252563b94069ccc7fa6882bc608bb84053d.tar.gz
sssd-da747252563b94069ccc7fa6882bc608bb84053d.tar.xz
be_ptask: handle OFFLINE_DISABLE mode before task execution
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
-rw-r--r--src/providers/dp_ptask.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/providers/dp_ptask.c b/src/providers/dp_ptask.c
index d8734b2..5a14e60 100644
--- a/src/providers/dp_ptask.c
+++ b/src/providers/dp_ptask.c
@@ -109,7 +109,10 @@ static void be_ptask_execute(struct tevent_context *ev,
be_ptask_schedule(task, task->period, BE_PTASK_SCHEDULE_FROM_NOW);
return;
case BE_PTASK_OFFLINE_DISABLE:
- /* This case is handled by offline callback. */
+ /* This case is normally handled by offline callback but we
+ * should handle it here as well since we can get here in some
+ * special cases for example unit tests or tevent events order. */
+ be_ptask_disable(task);
return;
case BE_PTASK_OFFLINE_EXECUTE:
/* continue */