aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/bts.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-11-29 12:15:16 +0100
committerHarald Welte <laforge@gnumonks.org>2011-11-29 12:15:16 +0100
commit143bb812dc196c5774cbc2fe992f67452cac92fd (patch)
tree6a844009ead71ac7166e230baee8d6c488312023 /src/common/bts.c
parentfe4893e625dd196e11c17dd468d73b60f17db9f9 (diff)
LAPDm: Use lapdm_channel_exit() and avoid copy+paste bug
We have to either lapdm_exit() both DCCH and ACCH (not 2x ACCH) or rather call lapdm_channel_exit() which does that for us. Thanks to Holger Freyther for spotting this bug.
Diffstat (limited to 'src/common/bts.c')
-rw-r--r--src/common/bts.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/common/bts.c b/src/common/bts.c
index b228341d..19bdd3be 100644
--- a/src/common/bts.c
+++ b/src/common/bts.c
@@ -248,8 +248,7 @@ int create_ms(struct osmobts_trx *trx, int maskc, uint8_t *maskv_tx,
void destroy_lchan(struct osmobts_lchan *lchan)
{
LOGP(DSUM, LOGL_INFO, "Destroying logical channel. (trx=%d ts=%d ss=%d)\n", lchan->slot->trx->trx_nr, lchan->slot->slot_nr, lchan->lchan_nr);
- lapdm_exit(&lchan->l2_entity.lapdm_acch);
- lapdm_exit(&lchan->l2_entity.lapdm_acch);
+ lapdm_channel_exit(&lchan->l2_entity);
if (lchan->rtp.socket_created)
rtp_close_socket(&lchan->rtp);
talloc_free(lchan);