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.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/20698 )
Change subject: scheduler: treat subsequent lchan (de)activation as error
......................................................................
scheduler: treat subsequent lchan (de)activation as error
Trying to (de)activate logical channels that are already (de)activated
is not something that we normally expect. Treat this as error.
Change-Id: I6256280cae35b2b4d7a8ba4b3913ca69cde22611
---
M src/common/scheduler.c
1 file changed, 4 insertions(+), 4 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/common/scheduler.c b/src/common/scheduler.c
index 3dc4db5..8cb9bd4 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -974,8 +974,8 @@
uint8_t tn = L1SAP_CHAN2TS(chan_nr);
struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, tn);
uint8_t ss = l1sap_chan2ss(chan_nr);
+ bool found = false;
int i;
- int rc = -EINVAL;
/* look for all matching chan_nr/link_id */
for (i = 0; i < _TRX_CHAN_MAX; i++) {
@@ -985,10 +985,10 @@
continue;
if (trx_chan_desc[i].link_id != link_id)
continue;
-
- rc = 0;
if (chan_state->active == active)
continue;
+ found = true;
+
LOGP(DL1C, LOGL_NOTICE, "%s %s on trx=%d ts=%d\n",
(active) ? "Activating" : "Deactivating",
trx_chan_desc[i].name, l1t->trx->nr, tn);
@@ -1018,7 +1018,7 @@
if (!active)
_sched_act_rach_det(l1t, tn, ss, 0);
- return rc;
+ return found ? 0 : -EINVAL;
}
/* setting all logical channels given attributes to active/inactive */
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/20698
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I6256280cae35b2b4d7a8ba4b3913ca69cde22611
Gerrit-Change-Number: 20698
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-CC: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201019/31268885/attachment.htm>