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.
diff --git a/include/openbsc/abis_rsl.h b/include/openbsc/abis_rsl.h
index a0e8cba..e7fea80 100644
--- a/include/openbsc/abis_rsl.h
+++ b/include/openbsc/abis_rsl.h
@@ -345,7 +345,6 @@
u_int8_t ta);
int rsl_chan_activate_tch_f(struct gsm_bts_trx_ts *ts);
int rsl_chan_activate_sdcch(struct gsm_bts_trx_ts *ts);
-int rsl_chan_release(struct gsm_lchan *lchan);
int rsl_paging_cmd(struct gsm_bts *bts, u_int8_t paging_group, u_int8_t len,
u_int8_t *ms_ident, u_int8_t chan_needed);
int rsl_paging_cmd_imsi(struct gsm_bts *bts, u_int8_t chan_needed, const char *imsi_str);
@@ -357,6 +356,7 @@
/* to be provided by external code */
int abis_rsl_sendmsg(struct msgb *msg);
+int rsl_chan_release(struct gsm_lchan *lchan);
#endif /* RSL_MT_H */