Change in osmo-bts[master]: common/scheduler: fix unreachable code in trx_sched_set_lchan()

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.org
Fri Jun 5 20:11:22 UTC 2020


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/18699 )


Change subject: common/scheduler: fix unreachable code in trx_sched_set_lchan()
......................................................................

common/scheduler: fix unreachable code in trx_sched_set_lchan()

Change-Id: Ie9d8f8ca86195be4408db717cd3194a7d2ddc918
---
M src/common/scheduler.c
1 file changed, 5 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/99/18699/1

diff --git a/src/common/scheduler.c b/src/common/scheduler.c
index be3ae42..276f3fd 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -986,9 +986,6 @@
 			LOGP(DL1C, LOGL_NOTICE, "%s %s on trx=%d ts=%d\n",
 				(active) ? "Activating" : "Deactivating",
 				trx_chan_desc[i].name, l1t->trx->nr, tn);
-			if (active)
-				memset(chan_state, 0, sizeof(*chan_state));
-			chan_state->active = active;
 			/* free burst memory, to cleanly start with burst 0 */
 			if (chan_state->dl_bursts) {
 				talloc_free(chan_state->dl_bursts);
@@ -998,8 +995,12 @@
 				talloc_free(chan_state->ul_bursts);
 				chan_state->ul_bursts = NULL;
 			}
-			if (!active)
+
+			if (active)
+				memset(chan_state, 0, sizeof(*chan_state));
+			else
 				chan_state->ho_rach_detect = 0;
+			chan_state->active = active;
 		}
 	}
 

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ie9d8f8ca86195be4408db717cd3194a7d2ddc918
Gerrit-Change-Number: 18699
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/20200605/6fb3476c/attachment.htm>


More information about the gerrit-log mailing list