aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmgcp
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-04-24 15:07:20 -0400
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-04-24 15:07:20 -0400
commitc57b5507b21d12f656ec1667a8a875485344fe8d (patch)
tree52c74fc7481dcd3d4a20a7ce52bad0c00c8775b8 /openbsc/src/libmgcp
parent7f100c9712de5c684462e809bf31a58c0c326337 (diff)
mgcp: Ignore the case for finding a codec
It is unlikely that GSM, gsm and GsM refer to different codecs. The mera mvts does send the audio codecs in lower case even if RFC 3551 has them in upper case (but copy and paste is sometimes too hard).
Diffstat (limited to 'openbsc/src/libmgcp')
-rw-r--r--openbsc/src/libmgcp/mgcp_transcode.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/openbsc/src/libmgcp/mgcp_transcode.c b/openbsc/src/libmgcp/mgcp_transcode.c
index eecbf421..04fb2dca 100644
--- a/openbsc/src/libmgcp/mgcp_transcode.c
+++ b/openbsc/src/libmgcp/mgcp_transcode.c
@@ -48,15 +48,15 @@ int mgcp_transcoding_get_frame_size(void *state_, int nsamples, int dst)
static enum audio_format get_audio_format(const struct mgcp_rtp_codec *codec)
{
if (codec->subtype_name) {
- if (!strcmp("GSM", codec->subtype_name))
+ if (!strcasecmp("GSM", codec->subtype_name))
return AF_GSM;
- if (!strcmp("PCMA", codec->subtype_name))
+ if (!strcasecmp("PCMA", codec->subtype_name))
return AF_PCMA;
#ifdef HAVE_BCG729
- if (!strcmp("G729", codec->subtype_name))
+ if (!strcasecmp("G729", codec->subtype_name))
return AF_G729;
#endif
- if (!strcmp("L16", codec->subtype_name))
+ if (!strcasecmp("L16", codec->subtype_name))
return AF_L16;
}
@@ -166,7 +166,7 @@ int mgcp_transcoding_setup(struct mgcp_endpoint *endp,
/* Not enough info, do nothing */
return 0;
- if (strcmp(src_codec->subtype_name, dst_codec->subtype_name) == 0)
+ if (strcasecmp(src_codec->subtype_name, dst_codec->subtype_name) == 0)
/* Nothing to do */
return 0;