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

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Aug 4 17:13:45 MST 2006


Author: file
Date: Fri Aug  4 19:13:44 2006
New Revision: 38887

URL: http://svn.digium.com/view/asterisk?rev=38887&view=rev
Log:
It is better to hold a lock then not hold a lock when you are supposed to.

Modified:
    trunk/channels/chan_iax2.c

Modified: trunk/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_iax2.c?rev=38887&r1=38886&r2=38887&view=diff
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Fri Aug  4 19:13:44 2006
@@ -897,7 +897,7 @@
 static void __send_ping(void *data)
 {
 	int callno = (long)data;
-	send_command(iaxs[callno], AST_FRAME_IAX, IAX_COMMAND_PING, 0, NULL, 0, -1);
+	send_command_locked(callno, AST_FRAME_IAX, IAX_COMMAND_PING, 0, NULL, 0, -1);
 }
 
 static int send_ping(void *data)
@@ -930,7 +930,7 @@
 {
 	int callno = (long)data;
 	/* Ping only if it's real not if it's bridged */
-	send_command(iaxs[callno], AST_FRAME_IAX, IAX_COMMAND_LAGRQ, 0, NULL, 0, -1);
+	send_command_locked(callno, AST_FRAME_IAX, IAX_COMMAND_LAGRQ, 0, NULL, 0, -1);
 }
 
 static int send_lagrq(void *data)



More information about the asterisk-commits mailing list