aboutsummaryrefslogtreecommitdiffstats
path: root/src/vty_interface_cmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vty_interface_cmds.c')
-rw-r--r--src/vty_interface_cmds.c16
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;
}