diff options
author | Kinsey Moore <kmoore@digium.com> | 2012-06-05 14:41:43 +0000 |
---|---|---|
committer | Kinsey Moore <kmoore@digium.com> | 2012-06-05 14:41:43 +0000 |
commit | 571445ab9c9f268abfa7cdea1f80d199686c5fac (patch) | |
tree | bcaac031cac910fbc4aa613cb62700bcca8f8a48 /apps/app_queue.c | |
parent | d210685a20c950e418b84e3c6f085e2f7f19f299 (diff) |
Convert AST_FLAG_ANSWERED_ELSEWHERE usage to AST_CAUSE_ANSWERED_ELSEWHERE
This was essentially duplicated functionality where normal channels used
AST_CAUSE_ANSWERED_ELSEWHERE while local channels and queues used
AST_FLAG_ANSWERED_ELSEWHERE. This removes the flag and converts that usage
into AST_CAUSE_ANSWERED_ELSEWHER usage.
Review: https://reviewboard.asterisk.org/r/1944
(closes issue ASTERISK-19865)
Patch-by: Birger Harzenetter
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r-- | apps/app_queue.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index cb9674959..931733cfc 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -3103,7 +3103,7 @@ static void hangupcalls(struct callattempt *outgoing, struct ast_channel *except /* Hangup any existing lines we have open */ if (outgoing->chan && (outgoing->chan != exception)) { if (exception || cancel_answered_elsewhere) { - ast_set_flag(ast_channel_flags(outgoing->chan), AST_FLAG_ANSWERED_ELSEWHERE); + ast_channel_hangupcause_set(outgoing->chan, AST_CAUSE_ANSWERED_ELSEWHERE); } ast_hangup(outgoing->chan); } @@ -3357,7 +3357,7 @@ static int ring_entry(struct queue_ent *qe, struct callattempt *tmp, int *busies ast_channel_lock_both(tmp->chan, qe->chan); if (qe->cancel_answered_elsewhere) { - ast_set_flag(ast_channel_flags(tmp->chan), AST_FLAG_ANSWERED_ELSEWHERE); + ast_channel_hangupcause_set(tmp->chan, AST_CAUSE_ANSWERED_ELSEWHERE); } ast_channel_appl_set(tmp->chan, "AppQueue"); ast_channel_data_set(tmp->chan, "(Outgoing Line)"); @@ -4825,10 +4825,10 @@ static int try_calling(struct queue_ent *qe, const struct ast_flags opts, char * qe->cancel_answered_elsewhere = 1; } - /* if the calling channel has the ANSWERED_ELSEWHERE flag set, make sure this is inherited. + /* if the calling channel has AST_CAUSE_ANSWERED_ELSEWHERE set, make sure this is inherited. (this is mainly to support chan_local) */ - if (ast_test_flag(ast_channel_flags(qe->chan), AST_FLAG_ANSWERED_ELSEWHERE)) { + if (ast_channel_hangupcause(qe->chan) == AST_CAUSE_ANSWERED_ELSEWHERE) { qe->cancel_answered_elsewhere = 1; } |