From d7869282218dbdfa5ac4276ce7d9a3eccb9d8bf1 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 19 Sep 2011 23:26:11 +0200 Subject: [PATCH] mgcp: Improve the show mgcp command to print the domain name For virtual trunk's we only have the virtual domain name they are serving. Print that instead of the trunk->nr which has no meaning in this context. --- src/mgcp/mgcp_vty.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/mgcp/mgcp_vty.c b/src/mgcp/mgcp_vty.c index bd31b21..368841f 100644 --- a/src/mgcp/mgcp_vty.c +++ b/src/mgcp/mgcp_vty.c @@ -167,9 +167,15 @@ static void dump_trunk(struct vty *vty, struct mgcp_trunk_config *cfg) { int i; - vty_out(vty, "%s trunk nr %d with %d endpoints:%s", - cfg->trunk_type == MGCP_TRUNK_VIRTUAL ? "Virtual" : "E1", - cfg->trunk_nr, cfg->number_endpoints - 1, VTY_NEWLINE); + if (cfg->trunk_type == MGCP_TRUNK_VIRTUAL) { + vty_out(vty, "vtrunk %s with %d endpoints:%s", + cfg->virtual_domain, cfg->number_endpoints - 1, + VTY_NEWLINE); + } else { + vty_out(vty, "trunk nr %d with %d endpoints:%s", + cfg->trunk_nr, cfg->number_endpoints - 1, + VTY_NEWLINE); + } if (!cfg->endpoints) { vty_out(vty, "No endpoints allocated yet.%s", VTY_NEWLINE);