[Asterisk-cvs] asterisk/channels chan_iax2.c,1.188.2.6,1.188.2.7
russell at lists.digium.com
russell at lists.digium.com
Fri Dec 3 18:37:16 CST 2004
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv24496/channels
Modified Files:
Tag: v1-0
chan_iax2.c
Log Message:
Release call lock while we look for the peer to avoid a deadlock
Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.188.2.6
retrieving revision 1.188.2.7
diff -u -d -r1.188.2.6 -r1.188.2.7
--- chan_iax2.c 25 Nov 2004 07:24:58 -0000 1.188.2.6
+++ chan_iax2.c 3 Dec 2004 23:35:36 -0000 1.188.2.7
@@ -3852,12 +3852,15 @@
ast_log(LOG_NOTICE, "Empty registration from %s\n", ast_inet_ntoa(iabuf, sizeof(iabuf), sin->sin_addr));
return -1;
}
-
+ /* We release the lock for the call to prevent a deadlock, but it's okay because
+ only the current thread could possibly make it go away or make changes */
+ ast_mutex_unlock(&iaxsl[callno]);
ast_mutex_lock(&peerl.lock);
for (p = peerl.peers; p ; p = p->next)
if (!strcasecmp(p->name, peer))
break;
ast_mutex_unlock(&peerl.lock);
+ ast_mutex_lock(&iaxsl[callno]);
#ifdef MYSQL_FRIENDS
if (!p)
p = mysql_peer(peer);
More information about the svn-commits
mailing list