aboutsummaryrefslogtreecommitdiffstats
path: root/src/gsm_04_08.c
diff options
context:
space:
mode:
authorHolger Freyther <zecke@selfish.org>2009-01-01 03:46:11 +0000
committerHolger Freyther <zecke@selfish.org>2009-01-01 03:46:11 +0000
commit67b4b9a017647b7d28343a352778920633ebf575 (patch)
tree50927c6f0fb08f82cb32cedb8daf609211703293 /src/gsm_04_08.c
parent3eaa792b21d19dd1cd512b87a391826cf1f3fef4 (diff)
Do not call rsl_chan_release directly but use the use_count of the lchan
Call use_lchan early in allocate_loc_updating_req, do not directly call rsl_chan_release but go through channel alloc to take the use_count into account.
Diffstat (limited to 'src/gsm_04_08.c')
-rw-r--r--src/gsm_04_08.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gsm_04_08.c b/src/gsm_04_08.c
index fc7457943..61080b454 100644
--- a/src/gsm_04_08.c
+++ b/src/gsm_04_08.c
@@ -98,12 +98,12 @@ static void release_loc_updating_req(struct gsm_lchan *lchan)
static void allocate_loc_updating_req(struct gsm_lchan *lchan)
{
+ use_lchan(lchan);
release_loc_updating_req(lchan);
lchan->loc_operation = (struct gsm_loc_updating_operation *)
malloc(sizeof(*lchan->loc_operation));
memset(lchan->loc_operation, 0, sizeof(*lchan->loc_operation));
- use_lchan(lchan);
}
static void parse_lai(struct gsm_lai *lai, const struct gsm48_loc_area_id *lai48)
@@ -397,7 +397,7 @@ static void loc_upd_rej_cb(void *data)
release_loc_updating_req(lchan);
gsm0408_loc_upd_rej(lchan, reject_cause);
- rsl_chan_release(lchan);
+ lchan_auto_release(lchan);
}
static void schedule_reject(struct gsm_lchan *lchan)