[asterisk-commits] twilson: branch 1.4 r306672 - /branches/1.4/res/res_features.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Feb 7 16:35:25 CST 2011


Author: twilson
Date: Mon Feb  7 16:35:20 2011
New Revision: 306672

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=306672
Log:
Don't try to pickup a call in the middle of a masquerade

If A calls B which doesn't answer and C & D both try to do a call pickup, it is
possible for ast_pickup_call to answer the call, then fail to masquerade one of
the calls because the other one is already in the process of masquerading. This
patch checks to see if the channel is in the process of masquerading before
call before selecting it for a pickup.

Review: https://reviewboard.asterisk.org/r/1094/

Modified:
    branches/1.4/res/res_features.c

Modified: branches/1.4/res/res_features.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/res/res_features.c?view=diff&rev=306672&r1=306671&r2=306672
==============================================================================
--- branches/1.4/res/res_features.c (original)
+++ branches/1.4/res/res_features.c Mon Feb  7 16:35:20 2011
@@ -3288,7 +3288,8 @@
 			(cur != chan) &&
 			(chan->pickupgroup & cur->callgroup) &&
 			((cur->_state == AST_STATE_RINGING) ||
-			 (cur->_state == AST_STATE_RING))) {
+			 (cur->_state == AST_STATE_RING)) &&
+			!cur->masq) {
 			 	break;
 		}
 		ast_channel_unlock(cur);




More information about the asterisk-commits mailing list