fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/42512?usp=email )
Change subject: osmo-bts-trx: clean up log messages in response handlers
......................................................................
osmo-bts-trx: clean up log messages in response handlers
Drop the redundant "transceiver" prefix from LOGPPHI() calls -
the macro already prepends the PHY instance name.
Change-Id: Iec722198f161621dd00ce3baabb732e1a1d91a37
---
M src/osmo-bts-trx/trx_if.c
1 file changed, 6 insertions(+), 7 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, approved
laforge: Looks good to me, but someone else must approve
diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c
index 56910fd..6445e9d 100644
--- a/src/osmo-bts-trx/trx_if.c
+++ b/src/osmo-bts-trx/trx_if.c
@@ -511,13 +511,13 @@
unsigned int tn, ts_type;
if (rsp->status)
- LOGPPHI(pinst, DTRX, LOGL_ERROR, "transceiver SETSLOT failed with status %d\n",
+ LOGPPHI(pinst, DTRX, LOGL_ERROR, "SETSLOT failed with status %d\n",
rsp->status);
/* Since message was already validated against CMD we sent, we know format
* of params is: "<TN> <TS_TYPE>" */
if (sscanf(rsp->params, "%u %u", &tn, &ts_type) < 2) {
- LOGPPHI(pinst, DTRX, LOGL_ERROR, "transceiver SETSLOT unable to parse params\n");
+ LOGPPHI(pinst, DTRX, LOGL_ERROR, "Failed to parse SETSLOT response\n");
return -EINVAL;
}
@@ -575,10 +575,9 @@
int nominal_power;
if (rsp->status)
- LOGPPHI(pinst, DTRX, LOGL_ERROR, "transceiver NOMTXPOWER failed "
- "with status %d. If your transceiver doesn't support this "
- "command, then please set the nominal transmit power manually "
- "through VTY cmd 'nominal-tx-power'.\n",
+ LOGPPHI(pinst, DTRX, LOGL_ERROR, "NOMTXPOWER failed with status %d. "
+ "If your transceiver doesn't support this command, then please "
+ "set the nominal transmit power manually through VTY cmd 'nominal-tx-power'.\n",
rsp->status);
if (cb) {
if (sscanf(rsp->params, "%d", &nominal_power) != 1) {
@@ -597,7 +596,7 @@
int power_att;
if (rsp->status)
- LOGPPHI(pinst, DTRX, LOGL_ERROR, "transceiver SETPOWER failed with status %d\n",
+ LOGPPHI(pinst, DTRX, LOGL_ERROR, "SETPOWER failed with status %d\n",
rsp->status);
if (cb) {
if (sscanf(rsp->params, "%d", &power_att) != 1) {
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/42512?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Iec722198f161621dd00ce3baabb732e1a1d91a37
Gerrit-Change-Number: 42512
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/42513?usp=email )
Change subject: l1sap: check_for_ciph_cmd(): add missing msgb length check
......................................................................
l1sap: check_for_ciph_cmd(): add missing msgb length check
The function accesses msg->data[0..4] without first verifying that the
message is at least 5 bytes long, which would cause a buffer over-read
on a malformed (too short) LAPDm frame.
Change-Id: I47690f1a6357e42913bfa8100e36c05cb4f0607a
---
M src/common/l1sap.c
1 file changed, 3 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, approved
laforge: Looks good to me, but someone else must approve
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 3d0263f..e150398 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -215,6 +215,9 @@
return 0;
}
+ if (msgb_length(msg) < 5)
+ return 0;
+
/* First byte (Address Field) of LAPDm header) */
if (msg->data[0] != 0x03)
return 0;
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/42513?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I47690f1a6357e42913bfa8100e36c05cb4f0607a
Gerrit-Change-Number: 42513
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/42509?usp=email )
Change subject: phy_link: phy_{link,instance}_name(): fix shared static buffer
......................................................................
phy_link: phy_{link,instance}_name(): fix shared static buffer
Both functions were writing into the same static buffer, so any caller
holding a pointer returned by one and then invoking the other would
silently end up with a stale/overwritten string. Move name_buf into
each function as a local static, so the two buffers are independent.
Change-Id: I79e9d7f5b1e5c275911cf88854211f1ce8a28669
---
M src/common/phy_link.c
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, approved
laforge: Looks good to me, but someone else must approve
diff --git a/src/common/phy_link.c b/src/common/phy_link.c
index ee5ef8a..8f1e389 100644
--- a/src/common/phy_link.c
+++ b/src/common/phy_link.c
@@ -149,9 +149,9 @@
talloc_free(plink);
}
-static char name_buf[32];
const char *phy_link_name(const struct phy_link *plink)
{
+ static char name_buf[32];
snprintf(name_buf, sizeof(name_buf), "phy%u", plink->num);
return name_buf;
}
@@ -182,6 +182,7 @@
const char *phy_instance_name(const struct phy_instance *pinst)
{
+ static char name_buf[32];
snprintf(name_buf, sizeof(name_buf), "phy%u.%u", pinst->phy_link->num,
pinst->num);
return name_buf;
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/42509?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I79e9d7f5b1e5c275911cf88854211f1ce8a28669
Gerrit-Change-Number: 42509
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/42508?usp=email )
Change subject: scheduler: trx_sched_is_sacch_fn(): fix returning non-bool
......................................................................
scheduler: trx_sched_is_sacch_fn(): fix returning non-bool
The function is declared `bool` but returns `-EINVAL` on an error path.
`-EINVAL` is `-22`, which in C implicitly converts to `bool true`.
Returning `false` makes more sense when we don't know the MF layout.
Change-Id: Ib2394687815aed4990c3880446176e4c97440667
---
M src/common/scheduler_mframe.c
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, approved
laforge: Looks good to me, approved
diff --git a/src/common/scheduler_mframe.c b/src/common/scheduler_mframe.c
index 60b6353..647ffc0 100644
--- a/src/common/scheduler_mframe.c
+++ b/src/common/scheduler_mframe.c
@@ -1009,7 +1009,7 @@
i = find_sched_mframe_idx(ts_pchan(ts), ts->nr);
if (i < 0)
- return -EINVAL;
+ return false;
sched = &trx_sched_multiframes[i];
frame = &sched->frames[fn % sched->period];
if (uplink)
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/42508?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ib2394687815aed4990c3880446176e4c97440667
Gerrit-Change-Number: 42508
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: fixeria.
pespin has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-bts/+/42515?usp=email )
Change subject: measurement: is_meas_complete(): fix fn_mod variable type
......................................................................
Patch Set 1:
(1 comment)
File src/common/measurement.c:
https://gerrit.osmocom.org/c/osmo-bts/+/42515/comment/0a2c2b6c_ee141e25?usp… :
PS1, Line 277: fn_mod = fn % 102;
so here and in line 283 we are now doing (-1 % 102)?
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/42515?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I6b0bce9bc9fca1d6effbb2da2319132cdff4e9c7
Gerrit-Change-Number: 42515
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 27 Mar 2026 07:40:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No