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/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has uploaded this change for review. ( 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(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/98/20698/1
diff --git a/src/common/scheduler.c b/src/common/scheduler.c
index dedf096..86fcef7 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -976,8 +976,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++) {
@@ -987,10 +987,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);
@@ -1020,7 +1020,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: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201017/477eb927/attachment.htm>