aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/bsc_msc_ip.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/bsc_msc_ip.c')
-rw-r--r--openbsc/src/bsc_msc_ip.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/openbsc/src/bsc_msc_ip.c b/openbsc/src/bsc_msc_ip.c
index 12d4c8bf3..0a7aa0dec 100644
--- a/openbsc/src/bsc_msc_ip.c
+++ b/openbsc/src/bsc_msc_ip.c
@@ -86,6 +86,19 @@ struct llist_head *bsc_sccp_connections()
return &active_connections;
}
+/*
+ * Having a subscriber in the lchan is used to indicate that a SACH DEACTIVATE
+ * should be send. We will just introduce a fake subscriber and bind it to the
+ * lchan.
+ */
+static void assign_dummy_subscr(struct gsm_lchan *lchan)
+{
+ if (!lchan->conn.subscr) {
+ lchan->conn.subscr = subscr_get_or_create(bsc_gsmnet, "2323");
+ lchan->conn.subscr->lac = 2323;
+ }
+}
+
struct bss_sccp_connection_data *bss_sccp_create_data()
{
struct bss_sccp_connection_data *data;
@@ -319,6 +332,8 @@ static int open_sccp_connection(struct msgb *layer3)
bsc_schedule_timer(&con_data->sccp_cc_timeout, 10, 0);
/* FIXME: Use transaction for this */
+ /* assign a dummy subscriber */
+ assign_dummy_subscr(layer3->lchan);
use_subscr_con(&layer3->lchan->conn);
sccp_connection_connect(sccp_connection, &sccp_ssn_bssap, data);
msgb_free(data);
@@ -426,6 +441,9 @@ static int handle_ass_compl(struct msgb *msg)
msg->lchan->msc_data->secondary_lchan = NULL;
old_chan->msc_data = NULL;
+ /* assign a dummy subscriber */
+ assign_dummy_subscr(msg->lchan);
+
/* give up the old channel to not do a SACCH deactivate */
if (old_chan->conn.subscr)
subscr_put(old_chan->conn.subscr);