diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2009-11-17 20:42:09 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2009-11-20 17:40:28 +0100 |
commit | 80fb260a604fe49517d968ae1e9c0cc78a18b5de (patch) | |
tree | 8199744f03a992eb549b66cb8d6aa78e366aeb7c /openbsc/src/gsm_04_08.c | |
parent | 55a0716da7d06860addfba1812c309eac6d82f1a (diff) |
[lchan] Release the channel ones its' usecount drops to zero
Remove the timer handling from the LCHAN and release the
channel ones the use count is dropping to zero.
Change code that was sending/using the lchan after the
release and change the send data method to warn in case
the lchan is used after it has been freed.
Diffstat (limited to 'openbsc/src/gsm_04_08.c')
-rw-r--r-- | openbsc/src/gsm_04_08.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c index 1f8235411..6be83da6c 100644 --- a/openbsc/src/gsm_04_08.c +++ b/openbsc/src/gsm_04_08.c @@ -296,13 +296,13 @@ static int gsm0408_authorize(struct gsm_lchan *lchan, struct msgb *msg) int rc; db_subscriber_alloc_tmsi(lchan->subscr); - release_loc_updating_req(lchan); rc = gsm0408_loc_upd_acc(msg->lchan, lchan->subscr->tmsi); /* call subscr_update after putting the loc_upd_acc * in the transmit queue, since S_SUBSCR_ATTACHED might * trigger further action like SMS delivery */ subscr_update(lchan->subscr, msg->trx->bts, GSM_SUBSCRIBER_UPDATE_ATTACHED); + release_loc_updating_req(lchan); return rc; } @@ -972,9 +972,8 @@ static void loc_upd_rej_cb(void *data) { struct gsm_lchan *lchan = data; - release_loc_updating_req(lchan); gsm0408_loc_upd_rej(lchan, reject_cause); - lchan_auto_release(lchan); + release_loc_updating_req(lchan); } static void schedule_reject(struct gsm_lchan *lchan) |