diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-02-22 20:57:08 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-02-23 15:25:35 +0100 |
commit | 7176030e02ca59d5b4ee015f24ee2bf733eeed8e (patch) | |
tree | eed6a2bb6bd74d365a09e77cbdc875bfcac689ed /src/vty_interface_cmds.c | |
parent | 2917644d503b706f0df5cf7228fc284a79436e31 (diff) |
vty: Add all mighty new vty interface for osmo-stp
This new interface allows to have multiple linksets, msc
connections and ways to connect those in one instance of
the osmo-stp. Forbid to reset linksets without an app.
Diffstat (limited to 'src/vty_interface_cmds.c')
-rw-r--r-- | src/vty_interface_cmds.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/vty_interface_cmds.c b/src/vty_interface_cmds.c index e3c82cb..988444b 100644 --- a/src/vty_interface_cmds.c +++ b/src/vty_interface_cmds.c @@ -65,13 +65,14 @@ static void dump_state(struct vty *vty, struct mtp_link_set *set) { struct mtp_link *link; - if (!set) { - vty_out(vty, "LinkSet for %s is not configured.%s", set->name, VTY_NEWLINE); + if (!set->app) { + vty_out(vty, "LinkSet %d not assigned to an application.%s", + set->nr, VTY_NEWLINE); return; } - vty_out(vty, "LinkSet for %s is %s, remote sccp is %s.%s", - set->name, + vty_out(vty, "LinkSet for %d/%s is %s, remote sccp is %s.%s", + set->nr, set->name, set->available == 0 ? "not available" : "available", set->sccp_up == 0? "not established" : "established", VTY_NEWLINE); @@ -200,6 +201,10 @@ DEFUN(pcap_set_stop, pcap_set_stop_cmd, vty_out(vty, "Unknown Linkset nr %d.%s", set_no, VTY_NEWLINE); \ return CMD_WARNING; \ } \ + if (!set->app) { \ + vty_out(vty, "Linkset nr %d has no application.%s", \ + set_no, VTY_NEWLINE); \ + } \ link = mtp_link_num(set, nr); \ if (!link) { \ vty_out(vty, "Can not find link %d.%s", nr, VTY_NEWLINE); \ |