diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-03-04 14:39:22 +0100 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-03-04 14:57:09 +0100 |
commit | 5d9004bc9b6f486fff032aaa2a6cc10fca180de3 (patch) | |
tree | feb1289dbede42ad3c7ec4a77df445be4421794d /openbsc/src/libbsc | |
parent | a4198d192234a8180a89be8b91e867a1cbc1f512 (diff) |
gsm_subscriber_connection: further split between BSC and MSC
Move some Iu/A members into the MSC #ifdef.
Have separate allocate and free functions for the two scopes.
Diffstat (limited to 'openbsc/src/libbsc')
-rw-r--r-- | openbsc/src/libbsc/bsc_api.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c index 9dc394c9c..ec3d92677 100644 --- a/openbsc/src/libbsc/bsc_api.c +++ b/openbsc/src/libbsc/bsc_api.c @@ -240,11 +240,7 @@ static int handle_new_assignment(struct gsm_subscriber_connection *conn, int cha return 0; } -/* Allocate a subscriber connection for A-interface link. For Iu-CS see - * subscr_con_allocate_iu(). */ -/* TODO this shall move to libmsc, behind an actual A-interface, and lchan will - * not be involved. */ -struct gsm_subscriber_connection *subscr_con_allocate(struct gsm_lchan *lchan) +struct gsm_subscriber_connection *bsc_subscr_con_allocate(struct gsm_lchan *lchan) { struct gsm_subscriber_connection *conn; struct gsm_network *network = lchan->ts->trx->bts->network; @@ -256,15 +252,13 @@ struct gsm_subscriber_connection *subscr_con_allocate(struct gsm_lchan *lchan) /* Configure the time and start it so it will be closed */ /* FIXME: above comment is weird in at least two ways */ conn->network = network; - conn->via_iface = IFACE_A; conn->lchan = lchan; lchan->conn = conn; llist_add_tail(&conn->entry, &network->subscr_conns); return conn; } -/* TODO: move subscriber put here... */ -void subscr_con_free(struct gsm_subscriber_connection *conn) +void bsc_subscr_con_free(struct gsm_subscriber_connection *conn) { if (!conn) return; @@ -688,7 +682,7 @@ int gsm0408_rcvmsg(struct msgb *msg, uint8_t link_id) } else { /* allocate a new connection */ rc = BSC_API_CONN_POL_REJECT; - lchan->conn = subscr_con_allocate(msg->lchan); + lchan->conn = bsc_subscr_con_allocate(msg->lchan); if (!lchan->conn) { lchan_release(lchan, 1, RSL_REL_NORMAL); return -1; @@ -699,7 +693,7 @@ int gsm0408_rcvmsg(struct msgb *msg, uint8_t link_id) if (rc != BSC_API_CONN_POL_ACCEPT) { lchan->conn->lchan = NULL; - subscr_con_free(lchan->conn); + bsc_subscr_con_free(lchan->conn); lchan_release(lchan, 1, RSL_REL_NORMAL); } } @@ -857,7 +851,7 @@ static void handle_release(struct gsm_subscriber_connection *conn, gsm0808_clear(conn); if (destruct) - subscr_con_free(conn); + bsc_subscr_con_free(conn); } static void handle_chan_ack(struct gsm_subscriber_connection *conn, |