[asterisk-commits] file: branch 1.4 r49063 - /branches/1.4/channels/chan_iax2.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Dec 29 20:37:23 MST 2006


Author: file
Date: Fri Dec 29 21:37:22 2006
New Revision: 49063

URL: http://svn.digium.com/view/asterisk?view=rev&rev=49063
Log:
Initialize the packet queue in load_module instead of just declaring the list with the default value. (issue #8695 reported by ssokol)

Modified:
    branches/1.4/channels/chan_iax2.c

Modified: branches/1.4/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_iax2.c?view=diff&rev=49063&r1=49062&r2=49063
==============================================================================
--- branches/1.4/channels/chan_iax2.c (original)
+++ branches/1.4/channels/chan_iax2.c Fri Dec 29 21:37:22 2006
@@ -624,9 +624,7 @@
 static struct ast_iax2_queue {
 	AST_LIST_HEAD(, iax_frame) queue;
 	int count;
-} iaxq = {
-	.queue = AST_LIST_HEAD_INIT_VALUE
-};
+} iaxq;
 
 static AST_LIST_HEAD_STATIC(users, iax2_user);
 
@@ -9952,6 +9950,8 @@
 	AST_LIST_TRAVERSE_SAFE_END
         AST_LIST_UNLOCK(&dynamic_list);
 
+	AST_LIST_HEAD_DESTROY(&iaxq.queue);
+
 	ast_netsock_release(netsock);
 	for (x=0;x<IAX_MAX_CALLS;x++)
 		if (iaxs[x])
@@ -10024,6 +10024,8 @@
 	ast_netsock_init(netsock);
 
 	ast_mutex_init(&waresl.lock);
+
+	AST_LIST_HEAD_INIT(&iaxq.queue);
 	
 	ast_cli_register_multiple(cli_iax2, sizeof(cli_iax2) / sizeof(struct ast_cli_entry));
 



More information about the asterisk-commits mailing list