Merged revisions 49063 via svnmerge from
[asterisk/asterisk.git] / channels / chan_iax2.c
index dda1e68..5eb447e 100644 (file)
@@ -632,9 +632,7 @@ struct chan_iax2_pvt {
 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);
 
@@ -9986,6 +9984,8 @@ static int __unload_module(void)
        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])
@@ -10059,6 +10059,8 @@ static int load_module(void)
        }
 
        ast_netsock_init(netsock);
+
+       AST_LIST_HEAD_INIT(&iaxq.queue);
        
        ast_cli_register_multiple(cli_iax2, sizeof(cli_iax2) / sizeof(struct ast_cli_entry));