aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/chan_alloc.h
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/openbsc/chan_alloc.h
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/openbsc/chan_alloc.h')
-rw-r--r--openbsc/include/openbsc/chan_alloc.h6
1 files changed, 3 insertions, 3 deletions
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;