diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-04-30 19:53:36 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-04-30 19:53:36 +0000 |
commit | 4cb72485bdf24d80be65769403b0e925cb20d2c8 (patch) | |
tree | 5aa8fbba852a13b89a8e65450a01ab19989ec03e | |
parent | a6700509d190146123ab7eeb3a80c01f11d14aea (diff) |
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.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@260344 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | apps/app_queue.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index bc1ca969e..6e255aa61 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -2263,7 +2263,7 @@ static int join_queue(char *queuename, struct queue_ent *qe, enum queue_result * /* <= 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) { |