diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-05-09 21:09:47 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-09-26 02:25:46 +0200 |
commit | a9f2bb5ab878ad192cd5a593596a6450e6ff7b58 (patch) | |
tree | 68b573589faafcbe7016e390c6f7a995535d7c29 /openbsc/src/libbsc/bsc_api.c | |
parent | 5e0b0a658fdc8d42de434eb1939352c55eeed30f (diff) |
mscsplit: directly access gsm_network backpointer from gsm_subscriber_connection
The previous commit added a network backpointer to gsm_subscriber_connection.
Use it wherever it makes sense, to skip the step through the bts structure.
In some places, remove local variables that become unused.
Change-Id: I34537025986713291e14c8212a81539b497befd4
Diffstat (limited to 'openbsc/src/libbsc/bsc_api.c')
-rw-r--r-- | openbsc/src/libbsc/bsc_api.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c index 02751f493..cc12e9f7e 100644 --- a/openbsc/src/libbsc/bsc_api.c +++ b/openbsc/src/libbsc/bsc_api.c @@ -146,7 +146,7 @@ static void assignment_t10_timeout(void *_conn) conn->secondary_lchan = NULL; /* inform them about the failure */ - api = conn->bts->network->bsc_api; + api = conn->network->bsc_api; api->assign_fail(conn, GSM0808_CAUSE_NO_RADIO_RESOURCE_AVAILABLE, NULL); } @@ -157,7 +157,7 @@ static void handle_mr_config(struct gsm_subscriber_connection *conn, struct gsm_lchan *lchan, int full_rate) { struct bsc_api *api; - api = conn->bts->network->bsc_api; + api = conn->network->bsc_api; struct amr_multirate_conf *mr; struct gsm48_multi_rate_conf *mr_conf; @@ -387,7 +387,7 @@ static int chan_compat_with_mode(struct gsm_lchan *lchan, int chan_mode, int ful int gsm0808_assign_req(struct gsm_subscriber_connection *conn, int chan_mode, int full_rate) { struct bsc_api *api; - api = conn->bts->network->bsc_api; + api = conn->network->bsc_api; if (!chan_compat_with_mode(conn->lchan, chan_mode, full_rate)) { if (handle_new_assignment(conn, chan_mode, full_rate) != 0) @@ -424,7 +424,7 @@ static void handle_ass_compl(struct gsm_subscriber_connection *conn, struct msgb *msg) { struct gsm48_hdr *gh; - struct bsc_api *api = conn->bts->network->bsc_api; + struct bsc_api *api = conn->network->bsc_api; if (conn->secondary_lchan != msg->lchan) { LOGP(DMSC, LOGL_ERROR, "Assignment Compl should occur on second lchan.\n"); @@ -461,7 +461,7 @@ static void handle_ass_compl(struct gsm_subscriber_connection *conn, static void handle_ass_fail(struct gsm_subscriber_connection *conn, struct msgb *msg) { - struct bsc_api *api = conn->bts->network->bsc_api; + struct bsc_api *api = conn->network->bsc_api; uint8_t *rr_failure; struct gsm48_hdr *gh; @@ -751,7 +751,7 @@ static void send_sapi_reject(struct gsm_subscriber_connection *conn, int link_id if (!conn) return; - api = conn->bts->network->bsc_api; + api = conn->network->bsc_api; if (!api || !api->sapi_n_reject) return; |