aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-14 23:24:26 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-14 23:24:26 +0000
commit67bec5d6ff7d1781ef71787216eca62d34ba8f97 (patch)
tree6eb6262435801e263127735f9fb14082df19af47 /apps
parenta48d90e91c401f70bb4c24545829023c131f385a (diff)
use the proper named constants for checking device state, and don't treat UNKNOWN as not available in autofill mode
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@34194 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_queue.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 9dc284531..01db3d6a9 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2037,11 +2037,13 @@ static int is_our_turn(struct queue_ent *qe)
ast_log(LOG_DEBUG, "Even though there are %d available members, the strategy is ringall so only the head call is allowed in\n", avl);
avl = 1;
} else {
- cur = qe->parent->members;
- while (cur) {
- if (cur->status == 1)
+ for (cur = qe->parent->members; cur; cur = cur->next) {
+ switch (cur->status) {
+ case AST_DEVICE_NOT_INUSE:
+ case AST_DEVICE_UNKNOWN:
avl++;
- cur = cur->next;
+ break;
+ }
}
}