pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-sigtran/+/38363?usp=email )


Change subject: src/osmo_ss7_vty.c: Improve error formatting in 'update route' 
cmd
......................................................................

src/osmo_ss7_vty.c: Improve error formatting in 'update route' cmd

(cherry picked from commit 250fe1c248e91f722f9734c146f510f79865d89a)
Change-Id: Ib9cccc508ce158e9e738e9ba4da69b819b41832d
---
M src/osmo_ss7_vty.c
M tests/vty/osmo_stp_test.vty
2 files changed, 6 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran 
refs/changes/63/38363/1

diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index 97c06fe..b1ae66d 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -348,18 +348,18 @@
        unsigned int argind;

        if (dpc < 0) {
-               vty_out(vty, "Invalid point code (%s)%s", argv[0], VTY_NEWLINE);
+               vty_out(vty, "%% Invalid point code (%s)%s", argv[0], 
VTY_NEWLINE);
                return CMD_WARNING;
        }

        if (mask < 0) {
-               vty_out(vty, "Invalid point code (%s)%s", argv[1], VTY_NEWLINE);
+               vty_out(vty, "%% Invalid point code (%s)%s", argv[1], 
VTY_NEWLINE);
                return CMD_WARNING;
        }

        rt = osmo_ss7_route_create(rtable, dpc, mask, ls_name);
        if (!rt) {
-               vty_out(vty, "cannot create route %s/%s to %s%s",
+               vty_out(vty, "%% Cannot create route %s/%s to %s%s",
                        argv[0], argv[1], argv[2], VTY_NEWLINE);
                return CMD_WARNING;
        }
@@ -378,6 +378,7 @@
                        return CMD_WARNING;
                break; /* Parse values below */
        default:
+               vty_out(vty, "%% Incomplete command (missing an argument?)%s", 
VTY_NEWLINE);
                return CMD_WARNING;
        }

diff --git a/tests/vty/osmo_stp_test.vty b/tests/vty/osmo_stp_test.vty
index c983305..64337f6 100644
--- a/tests/vty/osmo_stp_test.vty
+++ b/tests/vty/osmo_stp_test.vty
@@ -619,3 +619,5 @@
 ...
  route-table system
 ... !update route 3.2.1 7.255.7 linkset my-ass priority 5 qos-class 1
+OsmoSTP(config-cs7-rt)# update route 3.2.1 7.255.7 linkset my-ass priority
+% Incomplete command (missing an argument?)

--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/38363?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: pespin/2.0.0
Gerrit-Change-Id: Ib9cccc508ce158e9e738e9ba4da69b819b41832d
Gerrit-Change-Number: 38363
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>

Reply via email to