rtp_stream_commit: check missing MGW ep only when ready for RTP

Change-Id: I24a81a926b97c9f0fb31df782d1cf931eaff9db1
This commit is contained in:
Neels Hofmeyr 2022-10-31 18:15:32 +01:00
parent 1d19fe3c7a
commit 24dff915fa
1 changed files with 4 additions and 4 deletions

View File

@ -361,10 +361,6 @@ void rtp_stream_release(struct rtp_stream *rtps)
* least one of them has not yet been sent to the MGW in a previous CRCX or MDCX. */
int rtp_stream_commit(struct rtp_stream *rtps)
{
if (!rtps->ci) {
LOG_RTPS(rtps, LOGL_DEBUG, "Not committing: no MGW endpoint CI set up\n");
return -1;
}
if (!osmo_sockaddr_str_is_nonzero(&rtps->remote)) {
LOG_RTPS(rtps, LOGL_DEBUG, "Not committing: no remote RTP address known\n");
return -1;
@ -377,6 +373,10 @@ int rtp_stream_commit(struct rtp_stream *rtps)
LOG_RTPS(rtps, LOGL_DEBUG, "Not committing: both remote RTP address and codec already set up at MGW\n");
return 0;
}
if (!rtps->ci) {
LOG_RTPS(rtps, LOGL_DEBUG, "Not committing: no MGW endpoint CI set up\n");
return -1;
}
LOG_RTPS(rtps, LOGL_DEBUG, "Committing: Tx MDCX to update the MGW: updating%s%s%s\n",
rtps->remote_sent_to_mgw ? "" : " remote-RTP-IP-port",