fix queues properly (issue #5300, take two)
authorKevin P. Fleming <kpfleming@digium.com>
Fri, 30 Sep 2005 14:01:56 +0000 (14:01 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Fri, 30 Sep 2005 14:01:56 +0000 (14:01 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6699 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_queue.c

index 27a4662..6ddd721 100755 (executable)
@@ -761,7 +761,9 @@ static struct ast_call_queue *reload_queue_rt(const char *queuename, struct ast_
                                return q;
                        }
                }
-       }
+       } else if (!member_config)
+               /* Not found in the list, and it's not realtime ... */
+               return NULL;
 
        /* Check if queue is defined in realtime. */
        if (!queue_vars) {
@@ -872,12 +874,12 @@ static int join_queue(char *queuename, struct queue_ent *qe, enum queue_result *
           Thus we might see an empty member list when a queue is
           deleted. In practise, this is unlikely to cause a problem. */
        queue_vars = ast_load_realtime("queues", "name", queuename, NULL);
-       if(queue_vars)
+       if (queue_vars) {
                member_config = ast_load_realtime_multientry("queue_members", "interface LIKE", "%", "queue_name", queuename, NULL);
-       
-       if (!member_config) {
-               ast_log(LOG_ERROR, "no queue_members defined in your config (extconfig.conf).\n");
-               return res;
+               if (!member_config) {
+                       ast_log(LOG_ERROR, "no queue_members defined in your config (extconfig.conf).\n");
+                       return res;
+               }
        }
 
        ast_mutex_lock(&qlock);