diff options
author | Pavel Březina <pbrezina@redhat.com> | 2014-11-10 13:59:27 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-11-28 16:16:50 +0100 |
commit | da747252563b94069ccc7fa6882bc608bb84053d (patch) | |
tree | 15fbe2c6fd7d68a7f017f0e6088b8c3568030e20 | |
parent | fa70db6004a099afb7cb55031cd7bacb9e78202e (diff) | |
download | sssd-da747252563b94069ccc7fa6882bc608bb84053d.tar.gz sssd-da747252563b94069ccc7fa6882bc608bb84053d.tar.xz sssd-da747252563b94069ccc7fa6882bc608bb84053d.zip |
be_ptask: handle OFFLINE_DISABLE mode before task execution
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
-rw-r--r-- | src/providers/dp_ptask.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/providers/dp_ptask.c b/src/providers/dp_ptask.c index d8734b2f3..5a14e60b2 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 */ |