Index: apps/app_queue.c =================================================================== --- apps/app_queue.c (revision 82293) +++ apps/app_queue.c (working copy) @@ -368,6 +368,7 @@ unsigned int strategy:3; unsigned int maskmemberstatus:1; unsigned int realtime:1; + unsigned int found:1; /*!< Has a queue with this name been found in the config already? */ int announcefrequency; /*!< How often to announce their position */ int minannouncefrequency; /*!< The minimum number of seconds between position announcements (def. 15) */ int periodicannouncefrequency; /*!< How often to play periodic announcement */ @@ -776,6 +777,7 @@ q->dead = 0; q->retry = DEFAULT_RETRY; + q->found = 1; q->timeout = -1; q->maxlen = 0; q->announcefrequency = 0; @@ -1168,6 +1170,7 @@ ast_mutex_unlock(&q->lock); return NULL; } else { + ast_log(LOG_WARNING, "Static queue '%s' already exists. Not loading from realtime\n", queuename); ast_mutex_unlock(&q->lock); return q; } @@ -3128,7 +3131,7 @@ AST_LIST_LOCK(&queues); AST_LIST_TRAVERSE(&queues, q, list) { ast_mutex_lock(&q->lock); - if (strcmp(q->name, queuename)) { + if (strcasecmp(q->name, queuename)) { ast_mutex_unlock(&q->lock); continue; } @@ -3297,7 +3300,7 @@ AST_LIST_TRAVERSE(&queues, cur_queue, list) { ast_mutex_lock(&cur_queue->lock); - if (!strcmp(queue_name, cur_queue->name)) + if (!strcasecmp(queue_name, cur_queue->name)) break; ast_mutex_unlock(&cur_queue->lock); } @@ -4078,8 +4081,10 @@ use_weight=0; /* Mark all queues as dead for the moment */ AST_LIST_TRAVERSE(&queues, q, list) { - if(!q->realtime) + if(!q->realtime) { q->dead = 1; + q->found = 0; + } } /* Chug through config file */ @@ -4103,7 +4108,7 @@ } else { /* Define queue */ /* Look for an existing one */ AST_LIST_TRAVERSE(&queues, q, list) { - if (!strcmp(q->name, cat)) + if (!strcasecmp(q->name, cat)) break; } if (!q) { @@ -4115,6 +4120,10 @@ } else new = 0; if (q) { + if(q->found) { + ast_log(LOG_WARNING, "Queue '%s' already defined! Skipping!\n", cat); + continue; + } if (!new) ast_mutex_lock(&q->lock); /* Re-initialize the queue, and clear statistics */ @@ -4389,7 +4398,7 @@ ast_mutex_lock(&q->lock); /* List queue properties */ - if (ast_strlen_zero(queuefilter) || !strcmp(q->name, queuefilter)) { + if (ast_strlen_zero(queuefilter) || !strcasecmp(q->name, queuefilter)) { /* List Queue Members */ mem_iter = ao2_iterator_init(q->members, 0); while ((mem = ao2_iterator_next(&mem_iter))) { @@ -4451,7 +4460,7 @@ ast_mutex_lock(&q->lock); /* List queue properties */ - if (ast_strlen_zero(queuefilter) || !strcmp(q->name, queuefilter)) { + if (ast_strlen_zero(queuefilter) || !strcasecmp(q->name, queuefilter)) { sl = ((q->callscompleted > 0) ? 100 * ((float)q->callscompletedinsl / (float)q->callscompleted) : 0); astman_append(s, "Event: QueueParams\r\n" "Queue: %s\r\n"