]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix broken call pickup
authorJeff Peeler <jpeeler@digium.com>
Tue, 4 Aug 2009 15:35:49 +0000 (15:35 +0000)
committerJeff Peeler <jpeeler@digium.com>
Tue, 4 Aug 2009 15:35:49 +0000 (15:35 +0000)
The find_channel_by_group callback was only looking at the channel that was
attempting to make the pickup instead of the other channels in the container.

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

main/features.c

index 457e6c9484c3c63409b6b8e30a63882f8dc1ac4c..b0774c2b729cba044064a902dce09067e7445397 100644 (file)
@@ -4630,13 +4630,13 @@ static int find_channel_by_group(void *obj, void *arg, void *data, int flags)
        struct ast_channel *c = data;
        struct ast_channel *chan = obj;
 
-       int i = !c->pbx &&
+       int i = !chan->pbx &&
                /* Accessing 'chan' here is safe without locking, because there is no way for
                   the channel do disappear from under us at this point.  pickupgroup *could*
                   change while we're here, but that isn't a problem. */
                (c != chan) &&
                (chan->pickupgroup & c->callgroup) &&
-               ((c->_state == AST_STATE_RINGING) || (c->_state == AST_STATE_RING));
+               ((chan->_state == AST_STATE_RINGING) || (chan->_state == AST_STATE_RING));
 
        return i ? CMP_MATCH | CMP_STOP : 0;
 }