aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-03-24 10:45:07 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-03-24 10:45:07 +0100
commit82a8d6e3931dea7f127f84e9f6c4102d858410da (patch)
treecac4411e66b7dd968f0401a3051903caaa7c55f6 /openbsc/include
parent1226c939375890d07c047e1de5e9e48f5e101854 (diff)
Specify a release reason for the lchan
In case the put_lchan is making the refcount drop to zero use the release reason specified in the put_lchan call. This is used by the BSC MSC IP implementation for the assignment handling where the old channel is getting closed with a local end release (1).
Diffstat (limited to 'openbsc/include')
-rw-r--r--openbsc/include/openbsc/abis_rsl.h2
-rw-r--r--openbsc/include/openbsc/chan_alloc.h6
2 files changed, 4 insertions, 4 deletions
diff --git a/openbsc/include/openbsc/abis_rsl.h b/openbsc/include/openbsc/abis_rsl.h
index b280184e0..532382ead 100644
--- a/openbsc/include/openbsc/abis_rsl.h
+++ b/openbsc/include/openbsc/abis_rsl.h
@@ -68,7 +68,7 @@ unsigned int get_paging_group(u_int64_t imsi, unsigned int bs_cc_chans,
unsigned int n_pag_blocks(int bs_ccch_sdcch_comb, unsigned int bs_ag_blks_res);
u_int64_t str_to_imsi(const char *imsi_str);
u_int8_t lchan2chan_nr(const struct gsm_lchan *lchan);
-int rsl_release_request(struct gsm_lchan *lchan, u_int8_t link_id);
+int rsl_release_request(struct gsm_lchan *lchan, u_int8_t link_id, u_int8_t release_reason);
/* to be provided by external code */
int abis_rsl_sendmsg(struct msgb *msg);
diff --git a/openbsc/include/openbsc/chan_alloc.h b/openbsc/include/openbsc/chan_alloc.h
index 346b43147..c2e05d6a7 100644
--- a/openbsc/include/openbsc/chan_alloc.h
+++ b/openbsc/include/openbsc/chan_alloc.h
@@ -34,13 +34,13 @@
lchan->nr, lchan->use_count); \
} while(0);
-#define put_lchan(lchan) \
+#define put_lchan(lchan, reason) \
do { lchan->use_count--; \
DEBUGP(DCC, "lchan (bts=%d,trx=%d,ts=%d,ch=%d) decreases usage to: %d\n", \
lchan->ts->trx->bts->nr, lchan->ts->trx->nr, lchan->ts->nr, \
lchan->nr, lchan->use_count); \
if (lchan->use_count <= 0) \
- _lchan_release(lchan); \
+ _lchan_release(lchan, reason); \
} while(0);
@@ -69,7 +69,7 @@ struct gsm_lchan *lchan_alloc(struct gsm_bts *bts, enum gsm_chan_t type);
void lchan_free(struct gsm_lchan *lchan);
/* internal.. do not use */
-int _lchan_release(struct gsm_lchan *lchan);
+int _lchan_release(struct gsm_lchan *lchan, u_int8_t release_reason);
struct load_counter {
unsigned int total;