mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-02 02:18:31 +00:00
app_queue: fix comparison for announce-position-only-up
Numerically comparing that the current queue position is less than
last_pos_said can only be done after at least one announcement has been
made, otherwise last_pos_said is at the default (0).
Fixes: #1386
(cherry picked from commit cfcb245634
)
This commit is contained in:
committed by
Asterisk Development Team
parent
a8e7f3c396
commit
347788f354
@@ -4370,7 +4370,7 @@ static int say_position(struct queue_ent *qe, int ringing)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Only announce if the caller's queue position has improved since last time */
|
/* Only announce if the caller's queue position has improved since last time */
|
||||||
if (qe->parent->announceposition_only_up && qe->last_pos_said <= qe->pos) {
|
if (qe->parent->announceposition_only_up && qe->last_pos_said > 0 && qe->last_pos_said <= qe->pos) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user