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 23:26:11 +0200
commitd7869282218dbdfa5ac4276ce7d9a3eccb9d8bf1 (patch)
tree3ee8caa823edf30a29bf4b62c384f3c8d3850fd1
parentca5254b29ce9926e7a2ccb05432b31cec8ee32d1 (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 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);