]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: Fix workqueue error function callback
authorStephen Worley <sworley@cumulusnetworks.com>
Wed, 17 Apr 2019 23:18:04 +0000 (19:18 -0400)
committerStephen Worley <sworley@cumulusnetworks.com>
Wed, 17 Apr 2019 23:29:05 +0000 (19:29 -0400)
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>
lib/workqueue.c

index 066d81f35020e66998fe59ec3ce75ef1754ee2b1..54090d0d0f82720852ffa150e1786c431e3eb736 100644 (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;
                }