fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/18665 )


Change subject: vty: cosmetic: make an error message more informative
......................................................................

vty: cosmetic: make an error message more informative

Change-Id: I9aeb1780b6a64f7bec80ecb243bd01b47cf4ef24
---
M src/common/vty.c
1 file changed, 4 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/65/18665/1

diff --git a/src/common/vty.c b/src/common/vty.c
index c2cbeb5..d94a927 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -414,9 +414,11 @@
        struct gsm_bts *bts = vty->index;
        int band = gsm_band_parse(argv[0]);

+       /* This should not happen with the recent versions of libosmovty,
+        * but old versions may pass incomplete choice values like 'GSM9'. */
        if (band < 0) {
-               vty_out(vty, "%% BAND %d is not a valid GSM band%s",
-                       band, VTY_NEWLINE);
+               vty_out(vty, "%% BAND '%s' is not a valid GSM band%s",
+                       argv[0], VTY_NEWLINE);
                return CMD_WARNING;
        }


--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/18665
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I9aeb1780b6a64f7bec80ecb243bd01b47cf4ef24
Gerrit-Change-Number: 18665
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanits...@sysmocom.de>
Gerrit-MessageType: newchange

Reply via email to