[asterisk-commits] file: trunk r48503 - in /trunk: ./ channels/chan_iax2.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Dec 15 12:26:46 MST 2006


Author: file
Date: Fri Dec 15 13:26:45 2006
New Revision: 48503

URL: http://svn.digium.com/view/asterisk?view=rev&rev=48503
Log:
Merged revisions 48502 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48502 | file | 2006-12-15 14:24:15 -0500 (Fri, 15 Dec 2006) | 2 lines

Lock network retransmission queue in all places that it is used.

........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_iax2.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_iax2.c?view=diff&rev=48503&r1=48502&r2=48503
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Fri Dec 15 13:26:45 2006
@@ -1788,11 +1788,14 @@
 			ast_queue_hangup(owner);
 		}
 
+		AST_LIST_LOCK(&iaxq.queue);
 		AST_LIST_TRAVERSE(&iaxq.queue, cur, list) {
 			/* Cancel any pending transmissions */
 			if (cur->callno == pvt->callno) 
 				cur->retries = -1;
 		}
+		AST_LIST_UNLOCK(&iaxq.queue);
+
 		if (pvt->reg)
 			pvt->reg->callno = 0;
 		if (!owner) {
@@ -2099,8 +2102,11 @@
 {
 	struct iax_frame *cur;
 	int cnt = 0, dead=0, final=0;
+
 	if (argc != 3)
 		return RESULT_SHOWUSAGE;
+
+	AST_LIST_LOCK(&iaxq.queue);
 	AST_LIST_TRAVERSE(&iaxq.queue, cur, list) {
 		if (cur->retries < 0)
 			dead++;
@@ -2108,6 +2114,8 @@
 			final++;
 		cnt++;
 	}
+	AST_LIST_UNLOCK(&iaxq.queue);
+
 	ast_cli(fd, "    IAX Statistics\n");
 	ast_cli(fd, "---------------------\n");
 	ast_cli(fd, "Outstanding frames: %d (%d ingress, %d egress)\n", iax_get_frames(), iax_get_iframes(), iax_get_oframes());



More information about the asterisk-commits mailing list