diff options
author | Harald Welte <laforge@gnumonks.org> | 2009-01-09 21:39:17 +0000 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2009-01-09 21:39:17 +0000 |
commit | c627afceaa07dae35a474a3e32e1ae133f221895 (patch) | |
tree | 05e77e53285c2255383f312b6c9400db2392a3ca /src | |
parent | 498b0bbd9bd0ccb311692094dac15e0f5b31c88b (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')
-rw-r--r-- | src/chan_alloc.c | 5 |
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); |