[asterisk-commits] rmudgett: branch 12 r398418 - in /branches/12: ./ channels/chan_iax2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 5 12:30:25 CDT 2013


Author: rmudgett
Date: Thu Sep  5 12:30:23 2013
New Revision: 398418

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=398418
Log:
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

Modified:
    branches/12/   (props changed)
    branches/12/channels/chan_iax2.c

Propchange: branches/12/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Modified: branches/12/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/channels/chan_iax2.c?view=diff&rev=398418&r1=398417&r2=398418
==============================================================================
--- branches/12/channels/chan_iax2.c (original)
+++ branches/12/channels/chan_iax2.c Thu Sep  5 12:30:23 2013
@@ -11696,9 +11696,9 @@
 	}
 
 	/*!
-	 * \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 @@
 	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 @@
 	}
 
 	/* 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);




More information about the asterisk-commits mailing list