]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
When joinempty=strict, it only failed on join if there were busy members. If
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 30 May 2008 21:17:45 +0000 (21:17 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 30 May 2008 21:17:45 +0000 (21:17 +0000)
all members were logged out OR paused, then it (incorrectly) let callers join
the queue.
(closes issue #12451)
 Reported by: davidw

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@119404 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_queue.c

index ce74c3f387dc3dcaacfacd9fc4df4bcd2eaaf3d8..6830745d72fe3c8378b73fcd4169177bb664f76a 100644 (file)
@@ -1422,7 +1422,7 @@ static int join_queue(char *queuename, struct queue_ent *qe, enum queue_result *
        stat = get_member_status(q, qe->max_penalty);
        if (!q->joinempty && (stat == QUEUE_NO_MEMBERS))
                *reason = QUEUE_JOINEMPTY;
-       else if ((q->joinempty == QUEUE_EMPTY_STRICT) && (stat == QUEUE_NO_REACHABLE_MEMBERS))
+       else if ((q->joinempty == QUEUE_EMPTY_STRICT) && (stat == QUEUE_NO_REACHABLE_MEMBERS || stat == QUEUE_NO_MEMBERS))
                *reason = QUEUE_JOINUNAVAIL;
        else if (q->maxlen && (q->count >= q->maxlen))
                *reason = QUEUE_FULL;