[asterisk-commits] mnicholson: trunk r281761 - in /trunk: ./ channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Aug 11 12:29:20 CDT 2010
Author: mnicholson
Date: Wed Aug 11 12:29:16 2010
New Revision: 281761
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=281761
Log:
Merged revisions 281760 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r281760 | mnicholson | 2010-08-11 12:27:59 -0500 (Wed, 11 Aug 2010) | 4 lines
Avoid a deadlock in add_header_max_forwards().
Related to r276951
........
Modified:
trunk/ (props changed)
trunk/channels/chan_sip.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=281761&r1=281760&r2=281761
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Aug 11 12:29:16 2010
@@ -9038,8 +9038,16 @@
char clen[10];
const char *max = NULL;
+ /* deadlock avoidance */
+ while (dialog->owner && ast_channel_trylock(dialog->owner)) {
+ sip_pvt_unlock(dialog);
+ usleep(1);
+ sip_pvt_lock(dialog);
+ }
+
if (dialog->owner) {
max = pbx_builtin_getvar_helper(dialog->owner, "SIP_MAX_FORWARDS");
+ ast_channel_unlock(dialog->owner);
}
/* The channel variable overrides the peer/channel value */
More information about the asterisk-commits
mailing list