lib: Fix workqueue error function callback

After exceeding the max retry number for a thread,
we were passing the data rather than the work_queue_item
struct.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
This commit is contained in:
Stephen Worley 2019-04-17 19:18:04 -04:00
parent 3c7940063b
commit 095e181928

View File

@ -280,7 +280,7 @@ int work_queue_run(struct thread *thread)
if (item->ran > wq->spec.max_retries) {
/* run error handler, if any */
if (wq->spec.errorfunc)
wq->spec.errorfunc(wq, item->data);
wq->spec.errorfunc(wq, item);
work_queue_item_remove(wq, item);
continue;
}