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 <vyanits...@sysmocom.de>
Gerrit-MessageType: newchange

Reply via email to