diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2020-09-25 15:44:08 +0200 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2020-10-08 19:55:19 +0000 |
commit | 8be3fa6f368c7e12e2ede67fb1e1101ef6eed022 (patch) | |
tree | 5c150e182e3a1f948ec3e74118c186f327729e73 | |
parent | a2690a89211a28ddb90321bb28d9b5991846afb0 (diff) |
sched_lchan_tchh: initialize meas_avg with zeros
in function rx_tchh_fn() the variable meas_avg is not initalized. This
is not always a problem, since most of the time trx_sched_meas_avg() is
populating the variable properly. In cases where a FACCH is transmitted
(chan_state->ul_ongoing_facch = true) the variable is left unpopulated.
In order to have at least stable values for those cases, initalize the
variable with zeros for the ongoing facch phase.
Change-Id: I5c3c1c41d22f9edaaf6bd4478dd04f090dca12a9
Fixes: CID#214480
-rw-r--r-- | src/osmo-bts-trx/sched_lchan_tchh.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c b/src/osmo-bts-trx/sched_lchan_tchh.c index c400542a..18d90bbe 100644 --- a/src/osmo-bts-trx/sched_lchan_tchh.c +++ b/src/osmo-bts-trx/sched_lchan_tchh.c @@ -125,6 +125,7 @@ int rx_tchh_fn(struct l1sched_trx *l1t, enum trx_chan_type chan, memcpy(*bursts_p, *bursts_p + 232, 232); memcpy(*bursts_p + 232, *bursts_p + 464, 232); ber10k = 0; + memset(&meas_avg, 0, sizeof(meas_avg)); goto bfi; } |