summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2014-01-22 08:57:18 +0100
committerIvan Kluchnikov <kluchnikovi@gmail.com>2014-05-06 17:22:55 +0400
commit55bb369a1dd701a17e29c5f0a5ccea76cc67eda1 (patch)
treee3f103224bf12bf798d3e5142790b042e1d9c2cd
parent73e306667079804d55f3712bc35f7a73f8355300 (diff)
Add check to tch_map(), if RTP sockets exist
-rw-r--r--openbsc/src/libmsc/gsm_04_08.c11
1 files changed, 11 insertions, 0 deletions
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)