]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
When using autofill, members who are in use should be counted towards the
authorMark Michelson <mmichelson@digium.com>
Thu, 28 Feb 2008 20:11:57 +0000 (20:11 +0000)
committerMark Michelson <mmichelson@digium.com>
Thu, 28 Feb 2008 20:11:57 +0000 (20:11 +0000)
number of available members to call if ringinuse is set to yes.

Thanks to jmls who brought this issue up on IRC

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

apps/app_queue.c

index f8ef4cb2d2e27a42029a01f7e66bf0c0d217230e..2378b70e9697a3d0b8825f13a19aca97585538b1 100644 (file)
@@ -2393,6 +2393,10 @@ static int is_our_turn(struct queue_ent *qe)
                        struct ao2_iterator mem_iter = ao2_iterator_init(qe->parent->members, 0);
                        while ((cur = ao2_iterator_next(&mem_iter))) {
                                switch (cur->status) {
+                               case AST_DEVICE_INUSE:
+                                       if (!qe->parent->ringinuse)
+                                               break;
+                                       /* else fall through */
                                case AST_DEVICE_NOT_INUSE:
                                case AST_DEVICE_UNKNOWN:
                                        if (!cur->paused)