From: Stuart Henderson Date: Thu, 21 Aug 2025 10:22:40 +0000 (+0000) Subject: app_queue: fix comparison for announce-position-only-up X-Git-Tag: 20.16.0-rc1~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=18f6b254259bcc30fa174941182b759d48260376;p=thirdparty%2Fasterisk.git 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 a32fe8572534f071dbf0a2d2ea9c7c0217426117) --- diff --git a/apps/app_queue.c b/apps/app_queue.c index d41b76de3d..39a2a17505 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -4440,7 +4440,7 @@ static int say_position(struct queue_ent *qe, int ringing) } /* 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; }