aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/transaction.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@netfilter.org>2009-12-18 14:51:48 +0100
committerHarald Welte <laforge@netfilter.org>2009-12-18 14:51:48 +0100
commit18750cf1df7d7a134c5dbfc2544800f746927bb0 (patch)
treee0a40e62192693693a04d5056f8e623784c231e7 /openbsc/src/transaction.c
parent3b104996946b66e6956da2d299557a1486dc26ed (diff)
[handover] lchan use count handling in case of trans_lchan_change()
Diffstat (limited to 'openbsc/src/transaction.c')
-rw-r--r--openbsc/src/transaction.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/openbsc/src/transaction.c b/openbsc/src/transaction.c
index 9f1bbf36d..026928876 100644
--- a/openbsc/src/transaction.c
+++ b/openbsc/src/transaction.c
@@ -152,7 +152,12 @@ int trans_lchan_change(struct gsm_lchan *lchan_old,
llist_for_each_entry(trans, &net->trans_list, entry) {
if (trans->lchan == lchan_old) {
+ /* drop old channel use cound */
+ put_lchan(trans->lchan);
+ /* assign new channel */
trans->lchan = lchan_new;
+ /* bump new channel use count */
+ use_lchan(trans->lchan);
num++;
}
}