[asterisk-commits] russell: trunk r77941 - /trunk/channels/chan_iax2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Aug 2 12:09:43 CDT 2007


Author: russell
Date: Thu Aug  2 12:09:42 2007
New Revision: 77941

URL: http://svn.digium.com/view/asterisk?view=rev&rev=77941
Log:
Fix an issue that Simon pointed out to me on IRC.  There were cases in the
trunk version of find_idle_thread() where the old full frame processing
information was not cleared out.  This would have caused full frames to get
deferred for processing by threads that weren't actually processing frames for
that call.  Nice catch!!

Modified:
    trunk/channels/chan_iax2.c

Modified: trunk/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_iax2.c?view=diff&rev=77941&r1=77940&r2=77941
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Thu Aug  2 12:09:42 2007
@@ -1014,8 +1014,10 @@
 	AST_LIST_UNLOCK(&idle_list);
 
 	/* If we popped a thread off the idle list, just return it */
-	if (thread)
+	if (thread) {
+		memset(&thread->ffinfo, 0, sizeof(thread->ffinfo));
 		return thread;
+	}
 
 	/* Pop the head of the dynamic list off */
 	AST_LIST_LOCK(&dynamic_list);
@@ -1023,8 +1025,10 @@
 	AST_LIST_UNLOCK(&dynamic_list);
 
 	/* If we popped a thread off the dynamic list, just return it */
-	if (thread)
+	if (thread) {
+		memset(&thread->ffinfo, 0, sizeof(thread->ffinfo));
 		return thread;
+	}
 
 	/* If we can't create a new dynamic thread for any reason, return no thread at all */
 	if (iaxdynamicthreadcount >= iaxmaxthreadcount || !(thread = ast_calloc(1, sizeof(*thread))))




More information about the asterisk-commits mailing list