From 55bb369a1dd701a17e29c5f0a5ccea76cc67eda1 Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Wed, 22 Jan 2014 08:57:18 +0100 Subject: Add check to tch_map(), if RTP sockets exist --- openbsc/src/libmsc/gsm_04_08.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index 3ca37cf50..3553660cc 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -1583,6 +1583,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) -- cgit v1.2.3