Realtime queues failed to load queue information without queue member table
authorMatthew Jordan <mjordan@digium.com>
Fri, 13 Jan 2012 17:00:12 +0000 (17:00 +0000)
committerMatthew Jordan <mjordan@digium.com>
Fri, 13 Jan 2012 17:00:12 +0000 (17:00 +0000)
Previously, realtime queues could be loaded without defining the queue member
table.  This allowed for queue members to be dynamic, while the realtime
queue definitions could exist in some backing storage.  Revision 342223 broke
this when it changed the return value for realtime_multientry to return NULL
when no results are returned.  Previously, an empty ast_config object was
expected.

(closes issue ASTERISK-19170)
Reported by: Rene Mendoza
Tested by: Rene Mendoza
Patches:
  rt_queue_member_patch.diff uploaded by Matt Jordan (license 6283)
........

Merged revisions 350552 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 350553 from http://svn.asterisk.org/svn/asterisk/branches/10

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

apps/app_queue.c

index ec9ad39..c7dc141 100644 (file)
@@ -2432,9 +2432,8 @@ static struct call_queue *find_load_queue_rt_friendly(const char *queuename)
                if (queue_vars) {
                        member_config = ast_load_realtime_multientry("queue_members", "interface LIKE", "%", "queue_name", queuename, SENTINEL);
                        if (!member_config) {
                if (queue_vars) {
                        member_config = ast_load_realtime_multientry("queue_members", "interface LIKE", "%", "queue_name", queuename, SENTINEL);
                        if (!member_config) {
-                               ast_log(LOG_ERROR, "no queue_members defined in your config (extconfig.conf).\n");
-                               ast_variables_destroy(queue_vars);
-                               return NULL;
+                               ast_debug(1, "No queue_members defined in config extconfig.conf\n");
+                               member_config = ast_config_new();
                        }
                }
                if (q) {
                        }
                }
                if (q) {