aboutsummaryrefslogtreecommitdiffstats
path: root/src/chan_alloc.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-01-09 21:39:17 +0000
committerHarald Welte <laforge@gnumonks.org>2009-01-09 21:39:17 +0000
commitc627afceaa07dae35a474a3e32e1ae133f221895 (patch)
tree05e77e53285c2255383f312b6c9400db2392a3ca /src/chan_alloc.c
parent498b0bbd9bd0ccb311692094dac15e0f5b31c88b (diff)
Reset the use_count to zero in chan_free
It is possible that the BTS is closing the channel even when our upper layers are doing work. Reset the use_count add a fixme to call cancellations for pending operations. Cancellation of the call state (state machines in general) and such come into mind...
Diffstat (limited to 'src/chan_alloc.c')
-rw-r--r--src/chan_alloc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/chan_alloc.c b/src/chan_alloc.c
index b50b19fc8..307072f08 100644
--- a/src/chan_alloc.c
+++ b/src/chan_alloc.c
@@ -193,6 +193,11 @@ void lchan_free(struct gsm_lchan *lchan)
lchan->subscr = 0;
}
+ /* We might kill an active channel... FIXME: call cancellations */
+ if (lchan->use_count != 0) {
+ lchan->use_count = 0;
+ }
+
/* stop the timer */
del_timer(&lchan->release_timer);