[asterisk-commits] mmichelson: trunk r260344 - /trunk/apps/app_queue.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Apr 30 14:53:40 CDT 2010
Author: mmichelson
Date: Fri Apr 30 14:53:36 2010
New Revision: 260344
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=260344
Log:
Fix logic reversal error when queue callers join the queue.
When a specific position is specified for the queue, the idea
was that the caller cannot be placed ahead of higher-priority
callers. Unfortunately, the logic was reversed so that the caller
could ONLY be placed ahead of higher priority callers.
Discovered while writing a unit test.
Modified:
trunk/apps/app_queue.c
Modified: trunk/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_queue.c?view=diff&rev=260344&r1=260343&r2=260344
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Fri Apr 30 14:53:36 2010
@@ -2263,7 +2263,7 @@
/* <= is necessary for the position comparison because it may not be possible to enter
* at our desired position since higher-priority callers may have taken the position we want
*/
- if (!inserted && (qe->prio <= cur->prio) && position && (position <= pos + 1)) {
+ if (!inserted && (qe->prio >= cur->prio) && position && (position <= pos + 1)) {
insert_entry(q, prev, qe, &pos);
/*pos is incremented inside insert_entry, so don't need to add 1 here*/
if (position < pos) {
More information about the asterisk-commits
mailing list