aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-cscn
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-01-28 14:27:22 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-03-03 16:19:09 +0100
commit39daffd7a5602816bd10130e1c93f213ab46315b (patch)
treee40ddbc2041205a4c094a35628b819e933dae5fe /openbsc/src/osmo-cscn
parent71d1e17e5e0c420cf00ea759743b81aaff72136e (diff)
cscn: allocate IuCS conn, properly return rc.
Diffstat (limited to 'openbsc/src/osmo-cscn')
-rw-r--r--openbsc/src/osmo-cscn/iu_cs.c28
1 files changed, 10 insertions, 18 deletions
diff --git a/openbsc/src/osmo-cscn/iu_cs.c b/openbsc/src/osmo-cscn/iu_cs.c
index db9cc1bb1..e3f22af25 100644
--- a/openbsc/src/osmo-cscn/iu_cs.c
+++ b/openbsc/src/osmo-cscn/iu_cs.c
@@ -71,31 +71,23 @@ int gsm0408_rcvmsg_iucs(struct gsm_network *network, struct msgb *msg, uint8_t l
uint8_t pdisc = gh->proto_discr & 0x0f;
OSMO_ASSERT(pdisc != GSM48_PDISC_RR);
- gsm0408_dispatch(conn, msg);
+ rc = gsm0408_dispatch(conn, msg);
} else {
/* allocate a new connection */
- /* TODO */
-
-#if 0
- rc = BSC_API_CONN_POL_REJECT;
- conn = subscr_conn_allocate_iu(msg->lchan);
- if (!lchan->conn) {
- lchan_release(lchan, 1, RSL_REL_NORMAL);
- return -1;
- }
-
- /* fwd via bsc_api to send COMPLETE L3 INFO to MSC */
- rc = api->compl_l3(lchan->conn, msg, 0);
+ conn = subscr_conn_allocate_iu(network, link_id, ue_ctx->conn_id);
+ if (!conn)
+ abort();
+ rc = msc_compl_l3(conn, msg, 0);
if (rc != BSC_API_CONN_POL_ACCEPT) {
- lchan->conn->lchan = NULL;
- subscr_con_free(lchan->conn);
- lchan_release(lchan, 1, RSL_REL_NORMAL);
+ subscr_con_free(conn);
+ rc = -1;
}
-#endif
+ else
+ rc = 0;
}
- return 0;
+ return rc;
}