aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/bsc_msc_ip.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/bsc_msc_ip.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/bsc_msc_ip.c')
-rw-r--r--openbsc/src/bsc_msc_ip.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/openbsc/src/bsc_msc_ip.c b/openbsc/src/bsc_msc_ip.c
index 38761fe44..26f70e406 100644
--- a/openbsc/src/bsc_msc_ip.c
+++ b/openbsc/src/bsc_msc_ip.c
@@ -160,7 +160,7 @@ void msc_outgoing_sccp_state(struct sccp_connection *conn, int old_state)
DEBUGP(DMSC, "ERROR: The lchan is still associated\n.");
lchan->msc_data = NULL;
- put_lchan(lchan);
+ put_lchan(lchan, 0);
}
bss_sccp_free_data((struct bss_sccp_connection_data *)conn->data_ctx);
@@ -306,20 +306,20 @@ static int handle_ass_compl(struct msgb *msg)
if (!msg->lchan->msc_data) {
DEBUGP(DMSC, "No MSC data\n");
- put_lchan(msg->lchan);
+ put_lchan(msg->lchan, 0);
return -1;
}
if (msg->lchan->msc_data->secondary_lchan != msg->lchan) {
LOGP(DMSC, LOGL_NOTICE, "Wrong assignment complete.\n");
- put_lchan(msg->lchan);
+ put_lchan(msg->lchan, 0);
return -1;
}
if (msgb_l3len(msg) - sizeof(*gh) != 1) {
DEBUGP(DMSC, "assignment failure invalid: %d\n",
msgb_l3len(msg) - sizeof(*gh));
- put_lchan(msg->lchan);
+ put_lchan(msg->lchan, 0);
return -1;
}
@@ -332,7 +332,7 @@ static int handle_ass_compl(struct msgb *msg)
/* give up the old channel to not do a SACCH deactivate */
subscr_put(old_chan->subscr);
old_chan->subscr = NULL;
- put_lchan(old_chan);
+ put_lchan(old_chan, 1);
/* activate audio on it... */
if (is_ipaccess_bts(msg->lchan->ts->trx->bts) && msg->lchan->tch_mode != GSM48_CMODE_SIGN)
@@ -353,20 +353,20 @@ static int handle_ass_fail(struct msgb *msg)
DEBUGP(DMSC, "ASSIGNMENT FAILURE from MS, forwarding to MSC\n");
if (!msg->lchan->msc_data) {
DEBUGP(DMSC, "No MSC data\n");
- put_lchan(msg->lchan);
+ put_lchan(msg->lchan, 0);
return -1;
}
if (msg->lchan->msc_data->secondary_lchan != msg->lchan) {
LOGP(DMSC, LOGL_NOTICE, "Wrong assignment complete.\n");
- put_lchan(msg->lchan);
+ put_lchan(msg->lchan, 0);
return -1;
}
if (msgb_l3len(msg) - sizeof(*gh) != 1) {
DEBUGP(DMSC, "assignment failure invalid: %d\n",
msgb_l3len(msg) - sizeof(*gh));
- put_lchan(msg->lchan);
+ put_lchan(msg->lchan, 0);
return -1;
}