ports/net/quagga/files/patch-lib_thread.c
Eugene Grosbein a554592619 net/quagga: unbreak ripd for 1.2.4
ripd is essentially non-functional in quagga-1.2.4
as it aborts on first announce timeout due to some threading logic bug.

The problem was reported upstream over a year ago and ignored:
https://bugzilla.quagga.net/show_bug.cgi?id=985
https://bugzilla.quagga.net/show_bug.cgi?id=1008

Add work-around that restores ripd stability.

PR:		238760
Approved by:	pi (maintainer timeout, 2 weeks)
2019-07-06 14:08:35 +00:00

11 lines
351 B
C

--- lib/thread.c.orig 2018-02-19 21:24:55 UTC
+++ lib/thread.c
@@ -603,6 +603,8 @@ thread_add_fd (struct thread **thread_ar
static void
thread_add_unuse (struct thread *thread)
{
+ if (thread->type == THREAD_UNUSED)
+ return;
thread->type = THREAD_UNUSED;
assert (thread->master != NULL && thread != NULL);
assert (thread->next == NULL);