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:27:55 +0100 |
commit | ceb4a774d35d4ae4597f8bed40819a77cd1409c0 (patch) | |
tree | f715f9457253919ee9f1d71799ce3c3392c8739b | |
parent | 1459c08cc589264a1cef5ac845a2a36afdbf3c49 (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.
-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 7f285d0..460c47e 100644 --- a/src/vty_interface_cmds.c +++ b/src/vty_interface_cmds.c @@ -105,15 +105,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; } |