[svn-commits] russell: branch 1.4 r68280 - in /branches/1.4: apps/ channels/

svn-commits at lists.digium.com svn-commits at lists.digium.com
Thu Jun 7 14:16:07 MST 2007


Author: russell
Date: Thu Jun  7 16:16:07 2007
New Revision: 68280

URL: http://svn.digium.com/view/asterisk?view=rev&rev=68280
Log:
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)

Modified:
    branches/1.4/apps/app_queue.c
    branches/1.4/channels/chan_agent.c

Modified: branches/1.4/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_queue.c?view=diff&rev=68280&r1=68279&r2=68280
==============================================================================
--- branches/1.4/apps/app_queue.c (original)
+++ branches/1.4/apps/app_queue.c Thu Jun  7 16:16:07 2007
@@ -235,7 +235,7 @@
 "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
 
@@ -2938,10 +2938,14 @@
 				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

Modified: branches/1.4/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_agent.c?view=diff&rev=68280&r1=68279&r2=68280
==============================================================================
--- branches/1.4/channels/chan_agent.c (original)
+++ branches/1.4/channels/chan_agent.c Thu Jun  7 16:16:07 2007
@@ -144,7 +144,7 @@
 #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 */



More information about the svn-commits mailing list