aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-05-20 17:15:44 +0200
committerHarald Welte <laforge@gnumonks.org>2016-12-02 12:09:17 +0000
commit42eb0141d7f41ca4576c92bf694406f9fefa26df (patch)
tree951186c930eed621ac5c37814154dcc15f8e044a /openbsc/src/libbsc
parent640b794de072131f0976ffc00e45fc5f7d8dc439 (diff)
split subscr_con_allocate()/_free() in bsc_ and msc_
Rename current subscr_con_allocate() and subscr_con_free to bsc_*, and add two separate msc_subscr_con_allocate() and _free(). The msc_subscr_con_free() ignores all lchan members. In libbsc use bsc_*, in libmsc use msc_*. Change-Id: I3cf7c7cafdf4672ec7b26058bba8a77159855257 Future: there will be distinct subscr conns for libbsc and libmsc.
Diffstat (limited to 'openbsc/src/libbsc')
-rw-r--r--openbsc/src/libbsc/bsc_api.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c
index 207e12ad..395002ad 100644
--- a/openbsc/src/libbsc/bsc_api.c
+++ b/openbsc/src/libbsc/bsc_api.c
@@ -239,7 +239,7 @@ static int handle_new_assignment(struct gsm_subscriber_connection *conn, int cha
return 0;
}
-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 *net = lchan->ts->trx->bts->network;
@@ -256,8 +256,7 @@ struct gsm_subscriber_connection *subscr_con_allocate(struct gsm_lchan *lchan)
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;
@@ -682,7 +681,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;
@@ -693,7 +692,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);
}
}
@@ -852,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,