Change in osmo-bts[master]: osmo-bts-trx/vty: ensure backwards compatibility with older config files

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
Tue Dec 31 17:03:38 UTC 2019


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16653 )

Change subject: osmo-bts-trx/vty: ensure backwards compatibility with older config files
......................................................................

osmo-bts-trx/vty: ensure backwards compatibility with older config files

osmo-bts-trx used to have its own (low-level) MS Power Control loop,
but recently it has been ripped out. Since [1], the process fails to
start if the configuration file still contains 'ms-power-control dsp'.

Let's be more tolerant: override 'dsp' by 'osmo' and print a warning.

[1] I49706926b1e962b18791174627bc3cc0cd0cd9d5

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

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



diff --git a/src/common/vty.c b/src/common/vty.c
index 8b947a7..b32b39b 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -792,8 +792,17 @@
 	bool soft = !strcmp(argv[0], "osmo");
 
 	if (!soft && !gsm_bts_has_feature(trx->bts, BTS_FEAT_MS_PWR_CTRL_DSP)) {
-		vty_out(vty, "This BTS model has no DSP/HW MS Power Control support%s", VTY_NEWLINE);
-		return CMD_WARNING;
+		/* NOTE: osmo-bts-trx used to have its own (low-level) MS Power Control loop, which
+		 * has been ripped out in favour of the common implementation. Configuration files
+		 * may still contain 'dsp', so let's be tolerant and override 'dsp' by 'osmo'. */
+		if (trx->bts->variant == BTS_OSMO_TRX && vty->type == VTY_FILE) {
+			vty_out(vty, "BTS model 'osmo-bts-trx' has no DSP/HW MS Power Control support, "
+				     "consider updating your configuration file!%s", VTY_NEWLINE);
+			soft = true; /* override */
+		} else {
+			vty_out(vty, "This BTS model has no DSP/HW MS Power Control support%s", VTY_NEWLINE);
+			return CMD_WARNING;
+		}
 	}
 
 	trx->ms_pwr_ctl_soft = soft;

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I4facd21bca3d8cb80d21e83ea267bc013e474533
Gerrit-Change-Number: 16653
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191231/b56c0068/attachment.htm>


More information about the gerrit-log mailing list