diff options
author | Richard Mudgett <rmudgett@digium.com> | 2011-05-20 16:20:25 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2011-05-20 16:20:25 +0000 |
commit | b1cfd0e059b5fc742fbe8afce8823a76019214dc (patch) | |
tree | 139a772d406adfe41347a8daa02ed801316636f6 /main | |
parent | 0436c501c9329bae04c22f2830629449b6fdc91c (diff) |
Merged revisions 320007 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r320007 | rmudgett | 2011-05-20 11:19:01 -0500 (Fri, 20 May 2011) | 2 lines
Change some variable names to make pickup code easier to understand.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@320013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r-- | main/features.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/main/features.c b/main/features.c index db52417a2..17dd2b7f7 100644 --- a/main/features.c +++ b/main/features.c @@ -5759,19 +5759,19 @@ static int manager_park(struct mansession *s, const struct message *m) static int find_channel_by_group(void *obj, void *arg, void *data, int flags) { - struct ast_channel *chan = obj; - struct ast_channel *c = data; + struct ast_channel *target = obj;/*!< Potential pickup target */ + struct ast_channel *chan = data;/*!< Channel wanting to pickup call */ - ast_channel_lock(chan); - if (c != chan && (c->pickupgroup & chan->callgroup) && - !chan->pbx && - ((chan->_state == AST_STATE_RINGING) || (chan->_state == AST_STATE_RING)) && - !chan->masq && - !ast_test_flag(chan, AST_FLAG_ZOMBIE)) { + ast_channel_lock(target); + if (chan != target && (chan->pickupgroup & target->callgroup) && + !target->pbx && + ((target->_state == AST_STATE_RINGING) || (target->_state == AST_STATE_RING)) && + !target->masq && + !ast_test_flag(target, AST_FLAG_ZOMBIE)) { /* Return with the channel still locked on purpose */ return CMP_MATCH | CMP_STOP; } - ast_channel_unlock(chan); + ast_channel_unlock(target); return 0; } @@ -5786,7 +5786,7 @@ static int find_channel_by_group(void *obj, void *arg, void *data, int flags) */ int ast_pickup_call(struct ast_channel *chan) { - struct ast_channel *target; + struct ast_channel *target;/*!< Potential pickup target */ int res = -1; ast_debug(1, "pickup attempt by %s\n", chan->name); |