Merged revisions 68280 via svnmerge from
authorRussell Bryant <russell@russellbryant.com>
Thu, 7 Jun 2007 21:17:52 +0000 (21:17 +0000)
committerRussell Bryant <russell@russellbryant.com>
Thu, 7 Jun 2007 21:17:52 +0000 (21:17 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r68280 | russell | 2007-06-07 16:16:07 -0500 (Thu, 07 Jun 2007) | 4 lines

Fix loading persistent queue members when using realtime configuration for queues.
Also, remove an unneeded leading slash for the astdb family.
(issue #9911, patch by atis)

........

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

apps/app_queue.c
channels/chan_agent.c

index f0e6dae..5aff0ab 100644 (file)
@@ -239,7 +239,7 @@ static char *app_ql_descrip =
 "Example: QueueLog(101|${UNIQUEID}|${AGENT}|WENTONBREAK|600)\n";
 
 /*! \brief Persistent Members astdb family */
-static const char *pm_family = "/Queue/PersistentMembers";
+static const char *pm_family = "Queue/PersistentMembers";
 /* The maximum length of each persistent member queue database entry */
 #define PM_MAX_LEN 8192
 
@@ -3111,10 +3111,14 @@ static void reload_queue_members(void)
                                break;
                        ast_mutex_unlock(&cur_queue->lock);
                }
+               
+               if (!cur_queue)
+                       cur_queue = load_realtime_queue(queue_name);
 
                if (!cur_queue) {
                        /* If the queue no longer exists, remove it from the
                         * database */
+                       ast_log(LOG_WARNING, "Error loading persistent queue: '%s': it does not exist\n", queue_name);
                        ast_db_del(pm_family, queue_name);
                        continue;
                } else
index 739c35d..7ad477c 100644 (file)
@@ -134,7 +134,7 @@ static char moh[80] = "default";
 #define AST_MAX_BUF    256
 #define AST_MAX_FILENAME_LEN   256
 
-static const char pa_family[] = "/Agents";          /*!< Persistent Agents astdb family */
+static const char pa_family[] = "Agents";          /*!< Persistent Agents astdb family */
 #define PA_MAX_LEN 2048                             /*!< The maximum length of each persistent member agent database entry */
 
 static int persistent_agents = 0;                   /*!< queues.conf [general] option */