diff options
author | Harald Welte <laforge@gnumonks.org> | 2009-12-15 21:36:05 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2009-12-15 21:36:05 +0100 |
commit | d12b0fdf51b76f906d5ee5f5b7f266fe791eb800 (patch) | |
tree | a490b56bb3f4482a86ccd5c009d5a5d54054106f /openbsc/src/chan_alloc.c | |
parent | 0b12103965c824b0dae1ae10df00d87d4ef1ec7b (diff) |
introduce cache of 6 last recently received measurement reports for each lchan
Diffstat (limited to 'openbsc/src/chan_alloc.c')
-rw-r--r-- | openbsc/src/chan_alloc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/openbsc/src/chan_alloc.c b/openbsc/src/chan_alloc.c index 2f0d7b93f..0a2984773 100644 --- a/openbsc/src/chan_alloc.c +++ b/openbsc/src/chan_alloc.c @@ -235,6 +235,8 @@ struct gsm_lchan *lchan_alloc(struct gsm_bts *bts, enum gsm_chan_t type) /* Free a logical channel */ void lchan_free(struct gsm_lchan *lchan) { + int i; + lchan->type = GSM_LCHAN_NONE; if (lchan->subscr) { subscr_put(lchan->subscr); @@ -250,6 +252,13 @@ void lchan_free(struct gsm_lchan *lchan) /* stop the timer */ bsc_del_timer(&lchan->release_timer); + /* clear cached measuement reports */ + lchan->meas_rep_idx = 0; + for (i = 0; i < ARRAY_SIZE(lchan->meas_rep); i++) { + lchan->meas_rep[i].flags = 0; + lchan->meas_rep[i].nr = 0; + } + /* FIXME: ts_free() the timeslot, if we're the last logical * channel using it */ } |