[packages] quagga: Fix thread_cancel_event()
authoracinonyx <acinonyx@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 13 Jul 2012 16:35:46 +0000 (16:35 +0000)
committeracinonyx <acinonyx@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 13 Jul 2012 16:35:46 +0000 (16:35 +0000)
git-svn-id: svn+ssh://svn.openwrt.org/openwrt@32699 3c298f89-4303-0410-b956-a3cf2f4a3e73

patches/008-fix-thread_cancel_event.patch [new file with mode: 0644]

diff --git a/patches/008-fix-thread_cancel_event.patch b/patches/008-fix-thread_cancel_event.patch
new file mode 100644 (file)
index 0000000..45f314d
--- /dev/null
@@ -0,0 +1,29 @@
+Index: quagga-0.99.21/lib/thread.c
+===================================================================
+--- quagga-0.99.21.orig/lib/thread.c
++++ quagga-0.99.21/lib/thread.c
+@@ -916,6 +916,24 @@ thread_cancel_event (struct thread_maste
+           thread_add_unuse (m, t);
+         }
+     }
++
++  /* thread can be on the ready list too */
++  thread = m->ready.head;
++  while (thread)
++    {
++      struct thread *t;
++
++      t = thread;
++      thread = t->next;
++
++      if (t->arg == arg)
++        {
++          ret++;
++          thread_list_delete (&m->ready, t);
++          t->type = THREAD_UNUSED;
++          thread_add_unuse (m, t);
++        }
++    }
+   return ret;
+ }