msc: add trans_cc_set_remote_from_bc
Prepare to set remote CSD bearer services in a future patch. Related: OS#4394 Change-Id: I71a8ff6167e2adf3ee609883730e5f67b7539185
This commit is contained in:
parent
c63c3a0cc5
commit
8a8ce714ff
|
@ -35,3 +35,4 @@ void trans_cc_filter_set_ran(struct gsm_trans *trans, enum osmo_rat_type ran_typ
|
|||
void trans_cc_filter_set_bss(struct gsm_trans *trans, struct msc_a *msc_a);
|
||||
void trans_cc_filter_run(struct gsm_trans *trans);
|
||||
void trans_cc_filter_set_ms_from_bc(struct gsm_trans *trans, const struct gsm_mncc_bearer_cap *bcap);
|
||||
void trans_cc_set_remote_from_bc(struct gsm_trans *trans, const struct gsm_mncc_bearer_cap *bcap);
|
||||
|
|
|
@ -812,8 +812,7 @@ static int gsm48_cc_tx_setup(struct gsm_trans *trans, void *arg)
|
|||
* MNCC, if any. */
|
||||
if (!trans->cc.remote.audio_codecs.count && (setup->fields & MNCC_F_BEARER_CAP)) {
|
||||
trans->cc.remote = (struct sdp_msg){};
|
||||
sdp_audio_codecs_from_bearer_cap(&trans->cc.remote.audio_codecs,
|
||||
&setup->bearer_cap);
|
||||
trans_cc_set_remote_from_bc(trans, &setup->bearer_cap);
|
||||
LOG_TRANS_CAT(trans, DMNCC, LOGL_DEBUG, "rx %s Bearer Cap: remote=%s\n",
|
||||
get_mncc_name(setup->msg_type), sdp_msg_to_str(&trans->cc.remote));
|
||||
}
|
||||
|
|
|
@ -64,3 +64,21 @@ void trans_cc_filter_set_ms_from_bc(struct gsm_trans *trans, const struct gsm_mn
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void trans_cc_set_remote_from_bc(struct gsm_trans *trans, const struct gsm_mncc_bearer_cap *bcap)
|
||||
{
|
||||
trans->cc.remote.audio_codecs = (struct sdp_audio_codecs){0};
|
||||
|
||||
if (!bcap)
|
||||
return;
|
||||
|
||||
switch (bcap->transfer) {
|
||||
case GSM48_BCAP_ITCAP_SPEECH:
|
||||
sdp_audio_codecs_from_bearer_cap(&trans->cc.remote.audio_codecs, bcap);
|
||||
break;
|
||||
default:
|
||||
LOG_TRANS(trans, LOGL_ERROR, "Handling of information transfer capability %d not implemented\n",
|
||||
bcap->transfer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue