summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2013-09-05 17:31:29 +0000
committerRichard Mudgett <rmudgett@digium.com>2013-09-05 17:31:29 +0000
commit5954da694edadf0e6a21beb1ce7fec95501c1843 (patch)
tree2f83a122ec7d355c724ac5bcd99b1088abd069a7 /channels
parentbdb0121769a47b1e8e2f043679746dc017e7068b (diff)
chan_iax2: Fix stray reference to worker thread idle_list.
* Fix stray reference to idle_list in cleanup_thread_list(). This may be the reason for the note in iax2_process_thread() about threads not being removed from the task lists. * Move cleanup_thread_list(&idle_list) to after the other lists are cleaned up. ........ Merged revisions 398416 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 398417 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 398418 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_iax2.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 3069bc9bb..4d8f6df08 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -11696,9 +11696,9 @@ static void *iax2_process_thread(void *data)
}
/*!
- * \note For some reason, idle threads are exiting without being removed
- * from an idle list, which is causing memory corruption. Forcibly remove
- * it from the list, if it's there.
+ * \note For some reason, idle threads are exiting without being
+ * removed from an idle list, which is causing memory
+ * corruption. Forcibly remove it from the list, if it's there.
*/
AST_LIST_LOCK(&idle_list);
AST_LIST_REMOVE(&idle_list, thread, list);
@@ -14193,7 +14193,7 @@ static void cleanup_thread_list(void *head)
struct iax2_thread *thread;
AST_LIST_LOCK(list_head);
- while ((thread = AST_LIST_REMOVE_HEAD(&idle_list, list))) {
+ while ((thread = AST_LIST_REMOVE_HEAD(list_head, list))) {
pthread_t thread_id = thread->threadid;
thread->stop = 1;
@@ -14236,9 +14236,9 @@ static int __unload_module(void)
}
/* Call for all threads to halt */
- cleanup_thread_list(&idle_list);
cleanup_thread_list(&active_list);
cleanup_thread_list(&dynamic_list);
+ cleanup_thread_list(&idle_list);
ast_netsock_release(netsock);
ast_netsock_release(outsock);