From aeadf261e54d4e3987797b5818a8356441512568 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 14 Aug 2015 15:43:06 +0200 Subject: mgcp: Allow to enforce that the codecs need to match We have a lot of legacy that I am afraid to break. We have everything in place to make a good codec selection (e.g. if we can avoid transcoding, pick the one with best quality or the lowest speed). Right now I have a specific case where from all options I want to pick GSM. Guard the codec compat check behind the disallow transcoding option to make sure to not break legacy application. --- openbsc/src/libmgcp/mgcp_protocol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'openbsc/src/libmgcp/mgcp_protocol.c') diff --git a/openbsc/src/libmgcp/mgcp_protocol.c b/openbsc/src/libmgcp/mgcp_protocol.c index 5f3eb3a6b..40ea7916a 100644 --- a/openbsc/src/libmgcp/mgcp_protocol.c +++ b/openbsc/src/libmgcp/mgcp_protocol.c @@ -828,7 +828,7 @@ mgcp_header_done: endp->bts_end.fmtp_extra = talloc_strdup(tcfg->endpoints, tcfg->audio_fmtp_extra); if (have_sdp) - mgcp_parse_sdp_data(&endp->net_end, p); + mgcp_parse_sdp_data(endp, &endp->net_end, p); else if (endp->local_options.codec) mgcp_set_audio_info(p->cfg, &endp->net_end.codec, PTYPE_UNDEFINED, endp->local_options.codec); @@ -931,7 +931,7 @@ static struct msgb *handle_modify_con(struct mgcp_parse_data *p) case '\0': /* SDP file begins */ have_sdp = 1; - mgcp_parse_sdp_data(&endp->net_end, p); + mgcp_parse_sdp_data(endp, &endp->net_end, p); /* This will exhaust p->save, so the loop will * terminate next time. */ -- cgit v1.2.3