mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 23:27:04 +02:00
CLEANUP: task: remain consistent when using the task's handler
A pointer "process" is assigned the task's handler in process_runnable_tasks(), we have no reason to use t->process right after it is assigned.
This commit is contained in:
parent
8c12e2f785
commit
03dd029a5b
10
src/task.c
10
src/task.c
@ -384,13 +384,11 @@ void process_runnable_tasks()
|
|||||||
curr_task = (struct task *)t;
|
curr_task = (struct task *)t;
|
||||||
if (likely(process == process_stream))
|
if (likely(process == process_stream))
|
||||||
t = process_stream(t, ctx, state);
|
t = process_stream(t, ctx, state);
|
||||||
|
else if (process != NULL)
|
||||||
|
t = process(TASK_IS_TASKLET(t) ? NULL : t, ctx, state);
|
||||||
else {
|
else {
|
||||||
if (t->process != NULL)
|
__task_free(t);
|
||||||
t = process(TASK_IS_TASKLET(t) ? NULL : t, ctx, state);
|
t = NULL;
|
||||||
else {
|
|
||||||
__task_free(t);
|
|
||||||
t = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
curr_task = NULL;
|
curr_task = NULL;
|
||||||
/* If there is a pending state we have to wake up the task
|
/* If there is a pending state we have to wake up the task
|
||||||
|
Loading…
Reference in New Issue
Block a user