Add check to tch_map(), if RTP sockets exist

This commit is contained in:
Andreas Eversberg 2014-01-22 08:57:18 +01:00 committed by Harald Welte
parent 20f6e946e1
commit a4d0e3cc6b
1 changed files with 11 additions and 0 deletions

View File

@ -1575,6 +1575,17 @@ static int tch_map(struct gsm_lchan *lchan, struct gsm_lchan *remote_lchan)
case GSM_BTS_TYPE_NANOBTS:
case GSM_BTS_TYPE_OSMO_SYSMO:
if (!ipacc_rtp_direct) {
if (!lchan->abis_ip.rtp_socket) {
LOGP(DHO, LOGL_ERROR, "no RTP socket for "
"lchan\n");
return -EIO;
}
if (!remote_lchan->abis_ip.rtp_socket) {
LOGP(DHO, LOGL_ERROR, "no RTP socket for "
"remote_lchan\n");
return -EIO;
}
/* connect the TCH's to our RTP proxy */
rc = rsl_ipacc_mdcx_to_rtpsock(lchan);
if (rc < 0)