From: Olivier Houchard Date: Thu, 14 Jun 2018 13:40:47 +0000 (+0200) Subject: BUG/MINOR: tasklets: Just make sure we don't pass a tasklet to the handler. X-Git-Tag: v1.9-dev1~202 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9db0fedb596c278558b526b520925a8ea3a160c1;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/task.c b/src/task.c index c961725a1c..b0f9b498b5 100644 --- a/src/task.c +++ b/src/task.c @@ -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;