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/.
dexter gerrit-no-reply at lists.osmocom.orgdexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/26647 )
Change subject: bts: add missing return -EINVAL statements
......................................................................
bts: add missing return -EINVAL statements
The checks that make sure that an ARFCN falls in the correct range do
not return with -EINVAL as they should, instead nothing happens. (Only
the check for GSM1800 is corrct)
Change-Id: Iddadafe3fbc47e2f980d8e4ab4f320998cb454ff
Related: SYS#5369
---
M src/osmo-bsc/bts.c
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/47/26647/1
diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c
index c4ae518..2ce0344 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -441,6 +441,7 @@
if (bts->c0->arfcn < 512 || bts->c0->arfcn > 810) {
LOGP(DNM, LOGL_ERROR, "(bts=%u) GSM1900 channel (%u) must be between 512-810.\n",
bts->nr, bts->c0->arfcn);
+ return -EINVAL;
}
break;
case GSM_BAND_900:
@@ -448,16 +449,19 @@
bts->c0->arfcn > 1023) {
LOGP(DNM, LOGL_ERROR, "(bts=%u) GSM900 channel (%u) must be between 0-124, 955-1023.\n",
bts->nr, bts->c0->arfcn);
+ return -EINVAL;
}
break;
case GSM_BAND_850:
if (bts->c0->arfcn < 128 || bts->c0->arfcn > 251) {
LOGP(DNM, LOGL_ERROR, "(bts=%u) GSM850 channel (%u) must be between 128-251.\n",
bts->nr, bts->c0->arfcn);
+ return -EINVAL;
}
break;
default:
LOGP(DNM, LOGL_ERROR, "(bts=%u) Unsupported frequency band.\n", bts->nr);
+ return -EINVAL;
}
/* Verify the physical channel mapping */
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/26647
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Iddadafe3fbc47e2f980d8e4ab4f320998cb454ff
Gerrit-Change-Number: 26647
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211220/0fe92590/attachment.htm>