9
0
Fork 0

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.
This commit is contained in:
Holger Hans Peter Freyther 2011-08-13 22:45:40 +02:00
parent fc462dd59e
commit 013ae46ef6
1 changed files with 2 additions and 1 deletions

View File

@ -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));