diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-11-25 17:26:44 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-11-25 17:26:44 +0100 |
commit | c5e8f08303842033b9d5cd92b240b210f53f8fb2 (patch) | |
tree | 3d97eebb3919018ac9b48f7b540aa16e9b3e996e /src/vty_interface_cmds.c | |
parent | fffdd76f567313624016be34621c0021056797e3 (diff) |
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.
Diffstat (limited to 'src/vty_interface_cmds.c')
-rw-r--r-- | src/vty_interface_cmds.c | 16 |
1 files 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; } |