Review at  https://gerrit.osmocom.org/2348

osmo_ss7_vty: Print AS and ASP state names during 'show'

Change-Id: I6a06d93d6e6c0386676742d6d19f5483a46d7fba
---
M src/osmo_ss7_vty.c
1 file changed, 10 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/48/2348/1

diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index a05d74f..8356d16 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -579,13 +579,13 @@
                return CMD_WARNING;
        }
 
-       vty_out(vty, "                                                     
Effect Primary%s", VTY_NEWLINE);
-       vty_out(vty, "ASP Name      AS Name       State     Type  Rmt Port 
Remote IP Addr  SCTP%s", VTY_NEWLINE);
-       vty_out(vty, "------------  ------------  --------  ----  -------- 
--------------- ----------%s", VTY_NEWLINE);
+       vty_out(vty, "                                                          
Effect Primary%s", VTY_NEWLINE);
+       vty_out(vty, "ASP Name      AS Name       State          Type  Rmt Port 
Remote IP Addr  SCTP%s", VTY_NEWLINE);
+       vty_out(vty, "------------  ------------  -------------  ----  -------- 
--------------- ----------%s", VTY_NEWLINE);
 
        llist_for_each_entry(asp, &inst->asp_list, list) {
-               vty_out(vty, "%-12s  %-12s  %-8s  %-4s  %-8u %-15s %-10s%s",
-                       asp->cfg.name, "?", "?",
+               vty_out(vty, "%-12s  %-12s  %-13s  %-4s  %-8u %-15s %-10s%s",
+                       asp->cfg.name, "?", osmo_fsm_inst_state_name(asp->fi),
                        get_value_string(osmo_ss7_asp_protocol_vals, 
asp->cfg.proto),
                        asp->cfg.remote.port, asp->cfg.remote.host, "", 
VTY_NEWLINE);
        }
@@ -846,9 +846,9 @@
                return CMD_WARNING;
        }
 
-       vty_out(vty, "                    Routing    Routing Key                
          Cic   Cic%s", VTY_NEWLINE);
-       vty_out(vty, "AS Name      State  Context    Dpc           Si   Opc     
      Ssn Min   Max%s", VTY_NEWLINE);
-       vty_out(vty, "------------ ------ ---------- ------------- ---- 
------------- --- ----- -----%s", VTY_NEWLINE);
+       vty_out(vty, "                          Routing    Routing Key          
                Cic   Cic%s", VTY_NEWLINE);
+       vty_out(vty, "AS Name      State        Context    Dpc           Si   
Opc           Ssn Min   Max%s", VTY_NEWLINE);
+       vty_out(vty, "------------ ------------ ---------- ------------- ---- 
------------- --- ----- -----%s", VTY_NEWLINE);
 
        llist_for_each_entry(as, &inst->as_list, list) {
                if (filter && !strcmp(filter, "m3ua") && as->cfg.proto != 
OSMO_SS7_ASP_PROT_M3UA)
@@ -856,8 +856,8 @@
                if (filter && !strcmp(filter, "sua") && as->cfg.proto != 
OSMO_SS7_ASP_PROT_SUA)
                        continue;
                /* FIXME: active filter */
-               vty_out(vty, "%-12s %-6s %-10u %-13s %4s %13s %3s %5s %4s%s",
-                       as->cfg.name, "fixme", as->cfg.routing_key.context,
+               vty_out(vty, "%-12s %-12s %-10u %-13s %4s %13s %3s %5s %4s%s",
+                       as->cfg.name, osmo_fsm_inst_state_name(as->fi), 
as->cfg.routing_key.context,
                        osmo_ss7_pointcode_print(as->inst, 
as->cfg.routing_key.pc),
                        "", "", "", "", "", VTY_NEWLINE);
        }

-- 
To view, visit https://gerrit.osmocom.org/2348
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6a06d93d6e6c0386676742d6d19f5483a46d7fba
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <lafo...@gnumonks.org>

Reply via email to