[svn-commits] mmichelson: trunk r103957 - in /trunk: ./ apps/app_queue.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Feb 20 16:34:17 CST 2008


Author: mmichelson
Date: Wed Feb 20 16:34:12 2008
New Revision: 103957

URL: http://svn.digium.com/view/asterisk?view=rev&rev=103957
Log:
Merged revisions 103956 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r103956 | mmichelson | 2008-02-20 16:32:22 -0600 (Wed, 20 Feb 2008) | 8 lines

Clear up confusion when viewing the QUEUE_WAITING_COUNT of a 
"dead" realtime queue. Since from the user's perspective, the queue
does exist, we shouldn't tell them we couldn't find the queue. Instead
since it is a dead queue, report a 0 waiting count

This issue was brought up on IRC by jmls


........

Modified:
    trunk/   (props changed)
    trunk/apps/app_queue.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_queue.c?view=diff&rev=103957&r1=103956&r2=103957
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Wed Feb 20 16:34:12 2008
@@ -4688,6 +4688,7 @@
 	struct call_queue *q, tmpq = {
 		.name = data,	
 	};
+	struct ast_variable *var = NULL;
 
 	buf[0] = '\0';
 	
@@ -4701,6 +4702,13 @@
 		count = q->count;
 		ao2_unlock(q);
 		queue_unref(q);
+	} else if ((var = ast_load_realtime("queues", "name", data, NULL))) {
+		/* if the queue is realtime but was not found in memory, this
+		 * means that the queue had been deleted from memory since it was 
+		 * "dead." This means it has a 0 waiting count
+		 */
+		count = 0;
+		ast_variables_destroy(var);
 	} else
 		ast_log(LOG_WARNING, "queue %s was not found\n", data);
 




More information about the svn-commits mailing list