[packages] quagga: Fix thread_cancel_event()
[openwrt/svn-archive/archive.git] / net / quagga / patches / 008-fix-thread_cancel_event.patch
1 Index: quagga-0.99.21/lib/thread.c
2 ===================================================================
3 --- quagga-0.99.21.orig/lib/thread.c
4 +++ quagga-0.99.21/lib/thread.c
5 @@ -916,6 +916,24 @@ thread_cancel_event (struct thread_maste
6 thread_add_unuse (m, t);
7 }
8 }
9 +
10 + /* thread can be on the ready list too */
11 + thread = m->ready.head;
12 + while (thread)
13 + {
14 + struct thread *t;
15 +
16 + t = thread;
17 + thread = t->next;
18 +
19 + if (t->arg == arg)
20 + {
21 + ret++;
22 + thread_list_delete (&m->ready, t);
23 + t->type = THREAD_UNUSED;
24 + thread_add_unuse (m, t);
25 + }
26 + }
27 return ret;
28 }
29