From c5e8f08303842033b9d5cd92b240b210f53f8fb2 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 25 Nov 2011 17:26:44 +0100 Subject: msc: Make 'show msc' show the primary msc connection again Revert an accidental change when introducing show mscs. We want show msc to be like it was before. --- src/vty_interface_cmds.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/vty_interface_cmds.c b/src/vty_interface_cmds.c index 8697961..6f8ca05 100644 --- a/src/vty_interface_cmds.c +++ b/src/vty_interface_cmds.c @@ -106,15 +106,19 @@ DEFUN(show_msc, show_msc_cmd, "show msc", SHOW_STR "Display the status of the MSC\n") { - struct msc_connection *msc; + struct msc_connection *msc = msc_connection_num(bsc, 0); - llist_for_each_entry(msc, &bsc->mscs, entry) { - vty_out(vty, "MSC link is %s and had %s.%s", - msc->msc_link_down == 0 ? "up" : "down", - msc->first_contact == 1 ? "no contact" : "contact", - VTY_NEWLINE); + if (!msc) { + vty_out(vty, "%%No MSC Connection defined in this app.%s", VTY_NEWLINE); + return CMD_WARNING; } + + vty_out(vty, "MSC link is %s and had %s.%s", + msc->msc_link_down == 0 ? "up" : "down", + msc->first_contact == 1 ? "no contact" : "contact", + VTY_NEWLINE); + return CMD_SUCCESS; } -- cgit v1.2.3