From 129bc60c77708295016d9020579f0909ef922e9c Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Mon, 9 Sep 2013 16:17:37 +0200 Subject: TRX: Free bust buffer memory to when changing lchan type --- src/osmo-bts-trx/scheduler.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/osmo-bts-trx/scheduler.c b/src/osmo-bts-trx/scheduler.c index 4cf6a683..f4b0d9cc 100644 --- a/src/osmo-bts-trx/scheduler.c +++ b/src/osmo-bts-trx/scheduler.c @@ -2496,6 +2496,15 @@ int trx_sched_set_lchan(struct trx_l1h *l1h, uint8_t chan_nr, uint8_t link_id, 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); + chan_state->dl_bursts = NULL; + } + if (chan_state->ul_bursts) { + talloc_free(chan_state->ul_bursts); + chan_state->ul_bursts = NULL; + } } } -- cgit v1.2.3