[asterisk-commits] tilghman: branch 1.6.1 r154367 - in /branches/1.6.1: ./ channels/chan_iax2.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Nov 4 14:52:12 CST 2008
Author: tilghman
Date: Tue Nov 4 14:52:11 2008
New Revision: 154367
URL: http://svn.digium.com/view/asterisk?view=rev&rev=154367
Log:
Merged revisions 154366 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r154366 | tilghman | 2008-11-04 14:51:18 -0600 (Tue, 04 Nov 2008) | 16 lines
Merged revisions 154365 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r154365 | tilghman | 2008-11-04 14:49:33 -0600 (Tue, 04 Nov 2008) | 9 lines
On busy systems, it's possible for the values checked within a single line
of code to change, unless the structure is locked to ensure a consistent
state.
(closes issue #13717)
Reported by: kowalma
Patches:
20081102__bug13717.diff.txt uploaded by Corydon76 (license 14)
Tested by: kowalma
........
................
Modified:
branches/1.6.1/ (props changed)
branches/1.6.1/channels/chan_iax2.c
Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.1/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/channels/chan_iax2.c?view=diff&rev=154367&r1=154366&r2=154367
==============================================================================
--- branches/1.6.1/channels/chan_iax2.c (original)
+++ branches/1.6.1/channels/chan_iax2.c Tue Nov 4 14:52:11 2008
@@ -1703,11 +1703,20 @@
/* This will occur on the first response to a message that we initiated,
* such as a PING. */
+ if (dcallno) {
+ ast_mutex_lock(&iaxsl[dcallno]);
+ }
if (callno && dcallno && iaxs[dcallno] && !iaxs[dcallno]->peercallno && match(sin, callno, dcallno, iaxs[dcallno], check_dcallno)) {
iaxs[dcallno]->peercallno = callno;
res = dcallno;
store_by_peercallno(iaxs[dcallno]);
+ if (!res || !return_locked) {
+ ast_mutex_unlock(&iaxsl[dcallno]);
+ }
return res;
+ }
+ if (dcallno) {
+ ast_mutex_unlock(&iaxsl[dcallno]);
}
#ifdef IAX_OLD_FIND
More information about the asterisk-commits
mailing list