Move discardremoteholdretrieval test so it applies only to the specific notification indicator values.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@214654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Richard Mudgett
2009-08-28 19:13:53 +00:00
parent 27fb59b001
commit f199054c88

View File

@@ -2294,20 +2294,26 @@ static void *pri_dchannel(void *vpri)
if (chanpos < 0) {
ast_log(LOG_WARNING, "Received NOTIFY on unconfigured channel %d/%d span %d\n",
PRI_SPAN(e->notify.channel), PRI_CHANNEL(e->notify.channel), pri->span);
} else if (!pri->discardremoteholdretrieval) {
struct ast_frame f = { AST_FRAME_CONTROL, };
} else {
sig_pri_lock_private(pri->pvts[chanpos]);
sig_pri_handle_subcmds(pri, chanpos, e->e, e->notify.channel,
e->notify.subcmds);
switch (e->notify.info) {
case PRI_NOTIFY_REMOTE_HOLD:
f.subclass = AST_CONTROL_HOLD;
pri_queue_frame(pri->pvts[chanpos], &f, pri);
if (!pri->discardremoteholdretrieval) {
struct ast_frame f = { AST_FRAME_CONTROL, };
f.subclass = AST_CONTROL_HOLD;
pri_queue_frame(pri->pvts[chanpos], &f, pri);
}
break;
case PRI_NOTIFY_REMOTE_RETRIEVAL:
f.subclass = AST_CONTROL_UNHOLD;
pri_queue_frame(pri->pvts[chanpos], &f, pri);
if (!pri->discardremoteholdretrieval) {
struct ast_frame f = { AST_FRAME_CONTROL, };
f.subclass = AST_CONTROL_UNHOLD;
pri_queue_frame(pri->pvts[chanpos], &f, pri);
}
break;
}
sig_pri_unlock_private(pri->pvts[chanpos]);