]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 306673 via svnmerge from
authorTerry Wilson <twilson@digium.com>
Mon, 7 Feb 2011 22:43:22 +0000 (22:43 +0000)
committerTerry Wilson <twilson@digium.com>
Mon, 7 Feb 2011 22:43:22 +0000 (22:43 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r306673 | twilson | 2011-02-07 14:40:20 -0800 (Mon, 07 Feb 2011) | 17 lines

  Merged revisions 306672 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.4

  ........
    r306672 | twilson | 2011-02-07 14:35:20 -0800 (Mon, 07 Feb 2011) | 10 lines

    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/
  ........
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@306674 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/features.c

index 8df3bf1998b86cdfe428a3c45092298b60783bcf..f8d167afc100b1b742817918f03fda6277ee75d5 100644 (file)
@@ -5570,7 +5570,8 @@ static int find_channel_by_group(void *obj, void *arg, void *data, int flags)
                   change while we're here, but that isn't a problem. */
                (c != chan) &&
                (chan->pickupgroup & c->callgroup) &&
-               ((chan->_state == AST_STATE_RINGING) || (chan->_state == AST_STATE_RING));
+               ((chan->_state == AST_STATE_RINGING) || (chan->_state == AST_STATE_RING)) &&
+               !c->masq;
 
        return i ? CMP_MATCH | CMP_STOP : 0;
 }