[asterisk-commits] mmichelson: branch 1.4 r125476 - /branches/1.4/apps/app_queue.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jun 26 15:56:01 CDT 2008


Author: mmichelson
Date: Thu Jun 26 15:56:01 2008
New Revision: 125476

URL: http://svn.digium.com/view/asterisk?view=rev&rev=125476
Log:
Prior to this patch, the "queue show" command used cached
information for realtime queues instead of giving up-to-date
info. Now realtime is queried for the latest and greatest in
queue info.

(closes issue #12858)
Reported by: bcnit
Patches:
      queue_show.patch uploaded by putnopvut (license 60)


Modified:
    branches/1.4/apps/app_queue.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=125476&r1=125475&r2=125476
==============================================================================
--- branches/1.4/apps/app_queue.c (original)
+++ branches/1.4/apps/app_queue.c Thu Jun 26 15:56:01 2008
@@ -4311,8 +4311,18 @@
 		return RESULT_SHOWUSAGE;
 
 	/* We only want to load realtime queues when a specific queue is asked for. */
-	if (queue_show)
+	if (queue_show) {
 		load_realtime_queue(argv[2]);
+	} else if (ast_check_realtime("queues")) {
+		struct ast_config *cfg = ast_load_realtime_multientry("queues", "name LIKE", "%", (char *) NULL);
+		char *queuename;
+		if (cfg) {
+			for (queuename = ast_category_browse(cfg, NULL); !ast_strlen_zero(queuename); queuename = ast_category_browse(cfg, queuename)) {
+				load_realtime_queue(queuename);
+			}
+			ast_config_destroy(cfg);
+		}
+	}
 
 	AST_LIST_LOCK(&queues);
 	if (AST_LIST_EMPTY(&queues)) {




More information about the asterisk-commits mailing list