Change in osmo-bts[master]: vty: cosmetic: make an error message more informative

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Thu Jun 4 22:20:06 UTC 2020


laforge has submitted this change. ( 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(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



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 <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200604/3c222e74/attachment.htm>


More information about the gerrit-log mailing list