diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-08-13 22:45:40 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-08-13 22:53:53 +0200 |
commit | 013ae46ef67ee560aeaa38e39936a1ae7e35232f (patch) | |
tree | fac8b6ee848d7f562e591748f3b7f9f325cbc240 /openbsc | |
parent | fc462dd59ee4772f06c9f2477b36b3f166a8e74b (diff) |
bsc: Crash fix for the osmo-nitb/MNCC code
It is possible that MNCC sends a MNCC_LCHAN_MODIFY and
wants a channel mode that is not possible on the current
lchan, in that case a new channel is assigned. We now crash
as the osmo-nitb is not having an assignment complete handler,
add a NULL check.
Diffstat (limited to 'openbsc')
-rw-r--r-- | openbsc/src/libbsc/bsc_api.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c index ab71ebb3d..78fee8894 100644 --- a/openbsc/src/libbsc/bsc_api.c +++ b/openbsc/src/libbsc/bsc_api.c @@ -371,7 +371,8 @@ 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); - api->assign_compl(conn, gh->data[0], + if (api->assign_compl) + api->assign_compl(conn, gh->data[0], lchan_to_chosen_channel(conn->lchan), conn->lchan->encr.alg_id, chan_mode_to_speech(conn->lchan)); |