aboutsummaryrefslogtreecommitdiffstats
path: root/src/libbsc/chan_alloc.c
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-06-01 16:46:39 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-01-19 16:03:16 +0100
commit970b43486f6c85ce1da11ba8f10b18323b1e023b (patch)
tree31cdb772460fd3889ba924b7ab46f473f94e1942 /src/libbsc/chan_alloc.c
parent4d3baa6bdf85999dad28659461e8f9911cdd48ab (diff)
HO: Count the actual meas.rep. get_meas_rep_avg fails if not reached
get_meas_rep_avg will return -EINVAL, if the required number of measurements are not reached. There will be no handover possible until the given number of measurements are available. Change-Id: Ibc4410b4e162cdb6c070128d2c63946bb79d6d65
Diffstat (limited to 'src/libbsc/chan_alloc.c')
-rw-r--r--src/libbsc/chan_alloc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libbsc/chan_alloc.c b/src/libbsc/chan_alloc.c
index 07248fb23..1caa13d9a 100644
--- a/src/libbsc/chan_alloc.c
+++ b/src/libbsc/chan_alloc.c
@@ -347,6 +347,10 @@ struct gsm_lchan *lchan_alloc(struct gsm_bts *bts, enum gsm_chan_t type,
gsm_ts_and_pchan_name(lchan->ts),
lchan->nr, gsm_lchant_name(lchan->type));
+ /* reset measurement report counter and index */
+ lchan->meas_rep_count = 0;
+ lchan->meas_rep_idx = 0;
+
/* clear sapis */
memset(lchan->sapis, 0, ARRAY_SIZE(lchan->sapis));