MT Calls: Copy bearer capabilities from NNCC primitive to trans

When we receive a MNCC_SETUP_REQ primitive from the external MNCC
handler, we must not only encode it into the TS 04.08 CC SETUP, but
also keep it around in the "trans" structure representing this voice
call, as it is needed e.g. at BSSMAP ASSIGNMENT time.

Change-Id: Ib6919d148ff6687112e8166dbde947be19e70a76
Related: OS#2322
Closes: OS#2929
This commit is contained in:
Harald Welte 2018-02-12 11:56:51 +01:00
parent 474e5a768a
commit 329588721f
1 changed files with 5 additions and 1 deletions

View File

@ -1767,8 +1767,12 @@ static int gsm48_cc_tx_setup(struct gsm_trans *trans, void *arg)
gsm48_start_cc_timer(trans, 0x303, GSM48_T303);
/* bearer capability */
if (setup->fields & MNCC_F_BEARER_CAP)
if (setup->fields & MNCC_F_BEARER_CAP) {
/* Create a copy of the bearer capability in the transaction struct, so we
* can use this information later */
memcpy(&trans->bearer_cap, &setup->bearer_cap, sizeof(trans->bearer_cap));
gsm48_encode_bearer_cap(msg, 0, &setup->bearer_cap);
}
/* facility */
if (setup->fields & MNCC_F_FACILITY)
gsm48_encode_facility(msg, 0, &setup->facility);