mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-21 09:10:36 +00:00
Fix broken call pickup
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
This commit is contained in:
@@ -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 *c = data;
|
||||||
struct ast_channel *chan = obj;
|
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
|
/* 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*
|
the channel do disappear from under us at this point. pickupgroup *could*
|
||||||
change while we're here, but that isn't a problem. */
|
change while we're here, but that isn't a problem. */
|
||||||
(c != chan) &&
|
(c != chan) &&
|
||||||
(chan->pickupgroup & c->callgroup) &&
|
(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;
|
return i ? CMP_MATCH | CMP_STOP : 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user