BUG/MINOR: tasklets: Just make sure we don't pass a tasklet to the handler.

We can't just set t to NULL if it's a tasklet, or we'd have a hard time
accessing to t->process, so just make sure we pass NULL as the first parameter
of t->process if it's a tasklet.
This should be a non-issue at this point, as tasklets aren't used yet.
This commit is contained in:
Olivier Houchard 2018-06-14 15:40:47 +02:00 committed by Willy Tarreau
parent dcd6f3a597
commit 9db0fedb59

View File

@ -358,13 +358,11 @@ void process_runnable_tasks()
rqueue_size[tid]--;
t->calls++;
curr_task = (struct task *)t;
if (TASK_IS_TASKLET(t))
t = NULL;
if (likely(process == process_stream))
t = process_stream(t, ctx, state);
else {
if (t->process != NULL)
t = process(t, ctx, state);
t = process(TASK_IS_TASKLET(t) ? NULL : t, ctx, state);
else {
__task_free(t);
t = NULL;