[asterisk-commits] mmichelson: branch mmichelson/queue_refcount r81037 - /team/mmichelson/queue_...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Aug 27 10:42:18 CDT 2007


Author: mmichelson
Date: Mon Aug 27 10:42:17 2007
New Revision: 81037

URL: http://svn.digium.com/view/asterisk?view=rev&rev=81037
Log:
Fixed an error where I was removing a reference when I shouldn't. Also cleaned up the __queues_show function a bit


Modified:
    team/mmichelson/queue_refcount/apps/app_queue.c

Modified: team/mmichelson/queue_refcount/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/mmichelson/queue_refcount/apps/app_queue.c?view=diff&rev=81037&r1=81036&r2=81037
==============================================================================
--- team/mmichelson/queue_refcount/apps/app_queue.c (original)
+++ team/mmichelson/queue_refcount/apps/app_queue.c Mon Aug 27 10:42:17 2007
@@ -580,14 +580,12 @@
 					*slash_pos = '\0';
 
 			if (strcasecmp(sc->dev, interface)) {
-				ao2_ref(q, -1);
 				continue;
 			}
 
 			if (cur->status != sc->state) {
 				cur->status = sc->state;
 				if (q->maskmemberstatus) {
-					ao2_ref(q, -1);
 					continue;
 				}
 
@@ -4054,11 +4052,7 @@
 		queue_show = 1;
 	else
 		return RESULT_SHOWUSAGE;
-
-	/* We only want to load realtime queues when a specific queue is asked for. */
-	if (queue_show)
-		load_realtime_queue(argv[2]);
-
+	
 	ao2_lock(queues);
 	if (!ao2_container_count(queues)) {
 		ao2_unlock(queues);
@@ -4080,7 +4074,7 @@
 	if(queue_show) {
 		struct call_queue tmpq;
 		ast_copy_string(tmpq.name, argv[2], sizeof(tmpq.name));
-		if(!(q = ao2_find(queues, &tmpq, OBJ_POINTER))) 
+		if(!(q = load_realtime_queue(argv[2])))
 			ast_cli(fd, "No such queue: %s.%s", argv[2], term);
 		else {
 			show(q, fd, argv, s, term);




More information about the asterisk-commits mailing list