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...
This commit is contained in:
Harald Welte 2009-01-09 21:39:17 +00:00
parent 498b0bbd9b
commit c627afceaa
1 changed files with 5 additions and 0 deletions

View File

@ -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);