[asterisk-commits] rmudgett: branch 11 r398417 - in /branches/11: ./ channels/chan_iax2.c

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


Author: rmudgett
Date: Thu Sep  5 12:29:24 2013
New Revision: 398417

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

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

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

Modified: branches/11/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/channels/chan_iax2.c?view=diff&rev=398417&r1=398416&r2=398417
==============================================================================
--- branches/11/channels/chan_iax2.c (original)
+++ branches/11/channels/chan_iax2.c Thu Sep  5 12:29:24 2013
@@ -11985,9 +11985,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);
@@ -14569,7 +14569,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;
@@ -14612,9 +14612,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