aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-09-19 23:26:11 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-09-19 21:50:34 +0000
commit4e21cab41997dea20effa4cf753f5b8758244bba (patch)
treea7f22f4dcfe3ab5caea4ad4917b4342710163fa5
parent42828cb6f7def34117211428ed704b5495dbf845 (diff)
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.
-rw-r--r--src/mgcp/mgcp_vty.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mgcp/mgcp_vty.c b/src/mgcp/mgcp_vty.c
index 48e2a34..3249fd3 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);