aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/abis_rsl.c
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/src/abis_rsl.c
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/src/abis_rsl.c')
-rw-r--r--openbsc/src/abis_rsl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/openbsc/src/abis_rsl.c b/openbsc/src/abis_rsl.c
index 3079d0d54..446e081ca 100644
--- a/openbsc/src/abis_rsl.c
+++ b/openbsc/src/abis_rsl.c
@@ -718,14 +718,15 @@ int rsl_establish_request(struct gsm_lchan *lchan, u_int8_t link_id)
RELEASE CONFIRM, which we in turn use to trigger RSL CHANNEL RELEASE,
which in turn is acknowledged by RSL CHANNEL RELEASE ACK, which calls
lchan_free() */
-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 reason)
{
struct msgb *msg;
msg = rsl_rll_simple(RSL_MT_REL_REQ, lchan2chan_nr(lchan),
link_id, 0);
- msgb_tv_put(msg, RSL_IE_RELEASE_MODE, 0); /* normal release */
+ /* 0 is normal release, 1 is local end */
+ msgb_tv_put(msg, RSL_IE_RELEASE_MODE, reason);
lchan->state = LCHAN_S_REL_REQ;
/* FIXME: start some timer in case we don't receive a REL ACK ? */