diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-12-27 12:31:02 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-12-27 12:55:44 +0100 |
commit | 40aac3f7f6d30f90f192b9e88c71f81b09c27840 (patch) | |
tree | 7724da8b6a1022ff599887af600208156f70bb9c /openbsc/src/libbsc/bsc_api.c | |
parent | 3365cd1cfe110e5ce3d7c65022b9b3c8c27f3e4c (diff) |
bsc: Assume assignment_complete/assignment_fail is set
The osmo-nitb application sometimes crashes because the BSC API
is doing an assignment underneath which is not handled by the code,
add dumy handlers to not crash, the right thing to do is to change
MNCC to have an assignment that can succeed/fail.
The keyword to look for is MNCC_LCHAN_MODIFY and mncc_sock should
wait for an ack/nack but right now the call just continues.
Diffstat (limited to 'openbsc/src/libbsc/bsc_api.c')
-rw-r--r-- | openbsc/src/libbsc/bsc_api.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c index c1aedb2fb..ad4391d1a 100644 --- a/openbsc/src/libbsc/bsc_api.c +++ b/openbsc/src/libbsc/bsc_api.c @@ -380,8 +380,7 @@ static void handle_ass_compl(struct gsm_subscriber_connection *conn, if (is_ipaccess_bts(conn->bts) && conn->lchan->tch_mode != GSM48_CMODE_SIGN) rsl_ipacc_crcx(conn->lchan); - if (api->assign_compl) - api->assign_compl(conn, gh->data[0], + api->assign_compl(conn, gh->data[0], lchan_to_chosen_channel(conn->lchan), conn->lchan->encr.alg_id, chan_mode_to_speech(conn->lchan)); @@ -451,15 +450,16 @@ static void dispatch_dtap(struct gsm_subscriber_connection *conn, case GSM48_MT_RR_CHAN_MODE_MODIF_ACK: osmo_timer_del(&conn->T10); rc = gsm48_rx_rr_modif_ack(msg); - if (rc < 0 && api->assign_fail) { + if (rc < 0) { api->assign_fail(conn, GSM0808_CAUSE_NO_RADIO_RESOURCE_AVAILABLE, NULL); - } else if (rc >= 0 && api->assign_compl) + } else if (rc >= 0) { api->assign_compl(conn, 0, lchan_to_chosen_channel(conn->lchan), conn->lchan->encr.alg_id, chan_mode_to_speech(conn->lchan)); + } return; break; } |