9
0
Fork 0

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.
This commit is contained in:
Holger Hans Peter Freyther 2011-09-19 23:26:11 +02:00
parent ca5254b29c
commit d786928221
1 changed files with 9 additions and 3 deletions

View File

@ -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);