no HO call forwarding if no RTP stream

Fixes: coverity CID 198447
Related: OS#3992 (does not fix, just related)
Change-Id: Ia223c2e20e625879ab71fc5c8afd0305fd224c58
This commit is contained in:
Neels Hofmeyr 2019-05-09 14:16:26 +02:00 committed by Harald Welte
parent 911e5979ed
commit da3ce717b8
1 changed files with 5 additions and 0 deletions

View File

@ -552,6 +552,11 @@ static int msc_ho_start_inter_msc_call_forwarding(struct msc_a *msc_a, struct ms
return -EINVAL;
}
if (!rtp_to_ran) {
msc_ho_failed(msc_a, GSM0808_CAUSE_EQUIPMENT_FAILURE, "Unexpected: no RTP stream is set up\n");
return -EINVAL;
}
/* Backup old cell's RTP IP:port and codec data */
msc_a->ho.old_cell.ran_remote_rtp = rtp_to_ran->remote;
msc_a->ho.old_cell.codec = rtp_to_ran->codec;