[asterisk-commits] kmoore: trunk r331000 - /trunk/apps/app_queue.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Aug 8 10:00:32 CDT 2011


Author: kmoore
Date: Mon Aug  8 10:00:26 2011
New Revision: 331000

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=331000
Log:
app_queue: Add StateInterface to output of "queue show" and "QueueStatus"

This patch adds the state_interface of the queue member struct to the output
of "queue show" (CLI command) and "QueueStatus" (AMI action) when displaying
relevant queue member information.  For the AMI event message the variable
StateInterface has been added.

(closes issue ASTERISK-18071)
Review: https://reviewboard.asterisk.org/r/1300/
Patch-by: Jamuel Starkey

Modified:
    trunk/apps/app_queue.c

Modified: trunk/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_queue.c?view=diff&rev=331000&r1=330999&r2=331000
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Mon Aug  8 10:00:26 2011
@@ -1457,13 +1457,14 @@
 		"Queue: %s\r\n"
 		"Location: %s\r\n"
 		"MemberName: %s\r\n"
+		"StateInterface: %s\r\n"
 		"Membership: %s\r\n"
 		"Penalty: %d\r\n"
 		"CallsTaken: %d\r\n"
 		"LastCall: %d\r\n"
 		"Status: %d\r\n"
 		"Paused: %d\r\n",
-		q->name, m->interface, m->membername, m->dynamic ? "dynamic" : m->realtime ? "realtime" : "static",
+		q->name, m->interface, m->membername, m->state_interface, m->dynamic ? "dynamic" : m->realtime ? "realtime" : "static",
 		m->penalty, m->calls, (int)m->lastcall, m->status, m->paused
 	);
 
@@ -5321,13 +5322,14 @@
 				"Queue: %s\r\n"
 				"Location: %s\r\n"
 				"MemberName: %s\r\n"
+				"StateInterface: %s\r\n"
 				"Membership: %s\r\n"
 				"Penalty: %d\r\n"
 				"CallsTaken: %d\r\n"
 				"LastCall: %d\r\n"
 				"Status: %d\r\n"
 				"Paused: %d\r\n",
-				q->name, new_member->interface, new_member->membername,
+				q->name, new_member->interface, new_member->membername, state_interface,
 				"dynamic",
 				new_member->penalty, new_member->calls, (int) new_member->lastcall,
 				new_member->status, new_member->paused);
@@ -7149,7 +7151,11 @@
 			while ((mem = ao2_iterator_next(&mem_iter))) {
 				ast_str_set(&out, 0, "      %s", mem->membername);
 				if (strcasecmp(mem->membername, mem->interface)) {
-					ast_str_append(&out, 0, " (%s)", mem->interface);
+					ast_str_append(&out, 0, " (%s", mem->interface);
+					if (mem->state_interface) {
+						ast_str_append(&out, 0, " from %s", mem->state_interface);
+					}
+					ast_str_append(&out, 0, ")");
 				}
 				if (mem->penalty)
 					ast_str_append(&out, 0, " with penalty %d", mem->penalty);
@@ -7417,6 +7423,7 @@
 						"Queue: %s\r\n"
 						"Name: %s\r\n"
 						"Location: %s\r\n"
+						"StateInterface: %s\r\n"
 						"Membership: %s\r\n"
 						"Penalty: %d\r\n"
 						"CallsTaken: %d\r\n"
@@ -7425,7 +7432,7 @@
 						"Paused: %d\r\n"
 						"%s"
 						"\r\n",
-						q->name, mem->membername, mem->interface, mem->dynamic ? "dynamic" : "static",
+						q->name, mem->membername, mem->interface, mem->state_interface, mem->dynamic ? "dynamic" : "static",
 						mem->penalty, mem->calls, (int)mem->lastcall, mem->status, mem->paused, idText);
 				}
 				ao2_ref(mem, -1);




More information about the asterisk-commits mailing list