<p>Joshua Colp <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15589">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
George Joseph: Looks good to me, approved
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_format_attr_*: Parameter Names are Case-Insensitive.<br><br>see RFC 4855:<br>parameter names are case-insensitive both in media type strings and<br>in the default mapping to the SDP a=fmtp attribute.<br><br>This change is required for H.263+ because some implementations are<br>known to use even mixed-case. This does not fix ASTERISK~29268 because<br>H.264 was not fixed. This approach here lowers/uppers both parameter<br>names and parameter values. H.264 needs a different approach because<br>one of its parameter values is not case-insensitive:<br>sprop-parameter-sets is Base64.<br><br>Change-Id: Idf2a73457be231647aed3c87b1da197afba86892<br>---<br>M res/res_format_attr_celt.c<br>M res/res_format_attr_h263.c<br>M res/res_format_attr_ilbc.c<br>M res/res_format_attr_opus.c<br>M res/res_format_attr_silk.c<br>M res/res_format_attr_siren14.c<br>M res/res_format_attr_siren7.c<br>M res/res_format_attr_vp8.c<br>8 files changed, 100 insertions(+), 21 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_format_attr_celt.c b/res/res_format_attr_celt.c</span><br><span>index 4b92376..24e6670 100644</span><br><span>--- a/res/res_format_attr_celt.c</span><br><span>+++ b/res/res_format_attr_celt.c</span><br><span>@@ -29,8 +29,14 @@</span><br><span> </span><br><span> #include "asterisk.h"</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+#include <ctype.h> /* for tolower */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> #include "asterisk/module.h"</span><br><span> #include "asterisk/format.h"</span><br><span style="color: hsl(120, 100%, 40%);">+#include "asterisk/astobj2.h" /* for ao2_ref */</span><br><span style="color: hsl(120, 100%, 40%);">+#include "asterisk/logger.h" /* for ast_log, LOG_WARNING */</span><br><span style="color: hsl(120, 100%, 40%);">+#include "asterisk/strings.h" /* for ast_str_append */</span><br><span style="color: hsl(120, 100%, 40%);">+#include "asterisk/utils.h" /* for MIN */</span><br><span> </span><br><span> /*!</span><br><span> * \brief CELT attribute structure.</span><br><span>@@ -70,6 +76,7 @@</span><br><span> </span><br><span> static struct ast_format *celt_parse_sdp_fmtp(const struct ast_format *format, const char *attributes)</span><br><span> {</span><br><span style="color: hsl(120, 100%, 40%);">+ char *attribs = ast_strdupa(attributes), *attrib;</span><br><span> struct ast_format *cloned;</span><br><span> struct celt_attr *attr;</span><br><span> unsigned int val;</span><br><span>@@ -80,7 +87,12 @@</span><br><span> }</span><br><span> attr = ast_format_get_attribute_data(cloned);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- if (sscanf(attributes, "framesize=%30u", &val) == 1) {</span><br><span style="color: hsl(120, 100%, 40%);">+ /* lower-case everything, so we are case-insensitive */</span><br><span style="color: hsl(120, 100%, 40%);">+ for (attrib = attribs; *attrib; ++attrib) {</span><br><span style="color: hsl(120, 100%, 40%);">+ *attrib = tolower(*attrib);</span><br><span style="color: hsl(120, 100%, 40%);">+ } /* based on channels/chan_sip.c:process_a_sdp_image() */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (sscanf(attribs, "framesize=%30u", &val) == 1) {</span><br><span> attr->framesize = val;</span><br><span> }</span><br><span> </span><br><span>diff --git a/res/res_format_attr_h263.c b/res/res_format_attr_h263.c</span><br><span>index 5246725..70d7591 100644</span><br><span>--- a/res/res_format_attr_h263.c</span><br><span>+++ b/res/res_format_attr_h263.c</span><br><span>@@ -33,8 +33,12 @@</span><br><span> </span><br><span> #include "asterisk.h"</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+#include <ctype.h> /* for toupper */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> #include "asterisk/module.h"</span><br><span> #include "asterisk/format.h"</span><br><span style="color: hsl(120, 100%, 40%);">+#include "asterisk/strings.h" /* for ast_str_append */</span><br><span style="color: hsl(120, 100%, 40%);">+#include "asterisk/utils.h" /* for ast_strip */</span><br><span> </span><br><span> /*! \brief Value that indicates an attribute is actually unset */</span><br><span> #define H263_ATTR_KEY_UNSET UINT8_MAX</span><br><span>@@ -174,6 +178,11 @@</span><br><span> }</span><br><span> attr = ast_format_get_attribute_data(cloned);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ /* upper-case everything, so we are case-insensitive */</span><br><span style="color: hsl(120, 100%, 40%);">+ for (attrib = attribs; *attrib; ++attrib) {</span><br><span style="color: hsl(120, 100%, 40%);">+ *attrib = toupper(*attrib);</span><br><span style="color: hsl(120, 100%, 40%);">+ } /* based on channels/chan_sip.c:process_a_sdp_image() */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> attr->BPP = H263_ATTR_KEY_UNSET;</span><br><span> attr->MaxBR = H263_ATTR_KEY_UNSET;</span><br><span> attr->PAR_WIDTH = H263_ATTR_KEY_UNSET;</span><br><span>diff --git a/res/res_format_attr_ilbc.c b/res/res_format_attr_ilbc.c</span><br><span>index 0fac55c..ec33599 100644</span><br><span>--- a/res/res_format_attr_ilbc.c</span><br><span>+++ b/res/res_format_attr_ilbc.c</span><br><span>@@ -31,10 +31,12 @@</span><br><span> </span><br><span> #include "asterisk.h"</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+#include <ctype.h> /* for tolower */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> #include "asterisk/module.h"</span><br><span> #include "asterisk/format.h"</span><br><span> #include "asterisk/strings.h" /* for ast_str_append */</span><br><span style="color: hsl(0, 100%, 40%);">-#include "asterisk/utils.h" /* for ast_calloc, ast_free */</span><br><span style="color: hsl(120, 100%, 40%);">+#include "asterisk/utils.h" /* for ast_free */</span><br><span> </span><br><span> #include "asterisk/ilbc.h"</span><br><span> </span><br><span>@@ -71,6 +73,7 @@</span><br><span> </span><br><span> static struct ast_format *ilbc_parse_sdp_fmtp(const struct ast_format *format, const char *attributes)</span><br><span> {</span><br><span style="color: hsl(120, 100%, 40%);">+ char *attribs = ast_strdupa(attributes), *attrib;</span><br><span> struct ast_format *cloned;</span><br><span> struct ilbc_attr *attr;</span><br><span> const char *kvp;</span><br><span>@@ -82,7 +85,12 @@</span><br><span> }</span><br><span> attr = ast_format_get_attribute_data(cloned);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- if ((kvp = strstr(attributes, "mode")) && sscanf(kvp, "mode=%30u", &val) == 1) {</span><br><span style="color: hsl(120, 100%, 40%);">+ /* lower-case everything, so we are case-insensitive */</span><br><span style="color: hsl(120, 100%, 40%);">+ for (attrib = attribs; *attrib; ++attrib) {</span><br><span style="color: hsl(120, 100%, 40%);">+ *attrib = tolower(*attrib);</span><br><span style="color: hsl(120, 100%, 40%);">+ } /* based on channels/chan_sip.c:process_a_sdp_image() */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if ((kvp = strstr(attribs, "mode")) && sscanf(kvp, "mode=%30u", &val) == 1) {</span><br><span> attr->mode = val;</span><br><span> } else {</span><br><span> attr->mode = 30; /* optional attribute; 30 is default value */</span><br><span>diff --git a/res/res_format_attr_opus.c b/res/res_format_attr_opus.c</span><br><span>index cf30cf5..be6b611 100644</span><br><span>--- a/res/res_format_attr_opus.c</span><br><span>+++ b/res/res_format_attr_opus.c</span><br><span>@@ -29,8 +29,11 @@</span><br><span> </span><br><span> #include "asterisk.h"</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+#include <ctype.h></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> #include "asterisk/module.h"</span><br><span> #include "asterisk/format.h"</span><br><span style="color: hsl(120, 100%, 40%);">+#include "asterisk/astobj2.h"</span><br><span> #include "asterisk/logger.h"</span><br><span> #include "asterisk/strings.h"</span><br><span> #include "asterisk/utils.h"</span><br><span>@@ -135,6 +138,7 @@</span><br><span> </span><br><span> static struct ast_format *opus_parse_sdp_fmtp(const struct ast_format *format, const char *attributes)</span><br><span> {</span><br><span style="color: hsl(120, 100%, 40%);">+ char *attribs = ast_strdupa(attributes), *attrib;</span><br><span> struct ast_format *cloned;</span><br><span> struct opus_attr *attr;</span><br><span> </span><br><span>@@ -145,22 +149,27 @@</span><br><span> </span><br><span> attr = ast_format_get_attribute_data(cloned);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- sdp_fmtp_get(attributes, CODEC_OPUS_ATTR_MAX_PLAYBACK_RATE, &attr->maxplayrate);</span><br><span style="color: hsl(0, 100%, 40%);">- sdp_fmtp_get(attributes, CODEC_OPUS_ATTR_MAX_CODED_AUDIO_BANDWIDTH,</span><br><span style="color: hsl(120, 100%, 40%);">+ /* lower-case everything, so we are case-insensitive */</span><br><span style="color: hsl(120, 100%, 40%);">+ for (attrib = attribs; *attrib; ++attrib) {</span><br><span style="color: hsl(120, 100%, 40%);">+ *attrib = tolower(*attrib);</span><br><span style="color: hsl(120, 100%, 40%);">+ } /* based on channels/chan_sip.c:process_a_sdp_image() */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ sdp_fmtp_get(attribs, CODEC_OPUS_ATTR_MAX_PLAYBACK_RATE, &attr->maxplayrate);</span><br><span style="color: hsl(120, 100%, 40%);">+ sdp_fmtp_get(attribs, CODEC_OPUS_ATTR_MAX_CODED_AUDIO_BANDWIDTH,</span><br><span> &attr->maxplayrate);</span><br><span style="color: hsl(0, 100%, 40%);">- sdp_fmtp_get(attributes, CODEC_OPUS_ATTR_SPROP_MAX_CAPTURE_RATE,</span><br><span style="color: hsl(120, 100%, 40%);">+ sdp_fmtp_get(attribs, CODEC_OPUS_ATTR_SPROP_MAX_CAPTURE_RATE,</span><br><span> &attr->spropmaxcapturerate);</span><br><span style="color: hsl(0, 100%, 40%);">- sdp_fmtp_get(attributes, CODEC_OPUS_ATTR_MAX_PTIME, &attr->maxptime);</span><br><span style="color: hsl(0, 100%, 40%);">- sdp_fmtp_get(attributes, CODEC_OPUS_ATTR_PTIME, &attr->ptime);</span><br><span style="color: hsl(0, 100%, 40%);">- sdp_fmtp_get(attributes, CODEC_OPUS_ATTR_MAX_AVERAGE_BITRATE, &attr->maxbitrate);</span><br><span style="color: hsl(0, 100%, 40%);">- sdp_fmtp_get(attributes, CODEC_OPUS_ATTR_STEREO, &attr->stereo);</span><br><span style="color: hsl(120, 100%, 40%);">+ sdp_fmtp_get(attribs, CODEC_OPUS_ATTR_MAX_PTIME, &attr->maxptime);</span><br><span style="color: hsl(120, 100%, 40%);">+ sdp_fmtp_get(attribs, CODEC_OPUS_ATTR_PTIME, &attr->ptime);</span><br><span style="color: hsl(120, 100%, 40%);">+ sdp_fmtp_get(attribs, CODEC_OPUS_ATTR_MAX_AVERAGE_BITRATE, &attr->maxbitrate);</span><br><span style="color: hsl(120, 100%, 40%);">+ sdp_fmtp_get(attribs, CODEC_OPUS_ATTR_STEREO, &attr->stereo);</span><br><span> if (attr->stereo) {</span><br><span> ast_format_set_channel_count(cloned, 2);</span><br><span> }</span><br><span style="color: hsl(0, 100%, 40%);">- sdp_fmtp_get(attributes, CODEC_OPUS_ATTR_SPROP_STEREO, &attr->spropstereo);</span><br><span style="color: hsl(0, 100%, 40%);">- sdp_fmtp_get(attributes, CODEC_OPUS_ATTR_CBR, &attr->cbr);</span><br><span style="color: hsl(0, 100%, 40%);">- sdp_fmtp_get(attributes, CODEC_OPUS_ATTR_FEC, &attr->fec);</span><br><span style="color: hsl(0, 100%, 40%);">- sdp_fmtp_get(attributes, CODEC_OPUS_ATTR_DTX, &attr->dtx);</span><br><span style="color: hsl(120, 100%, 40%);">+ sdp_fmtp_get(attribs, CODEC_OPUS_ATTR_SPROP_STEREO, &attr->spropstereo);</span><br><span style="color: hsl(120, 100%, 40%);">+ sdp_fmtp_get(attribs, CODEC_OPUS_ATTR_CBR, &attr->cbr);</span><br><span style="color: hsl(120, 100%, 40%);">+ sdp_fmtp_get(attribs, CODEC_OPUS_ATTR_FEC, &attr->fec);</span><br><span style="color: hsl(120, 100%, 40%);">+ sdp_fmtp_get(attribs, CODEC_OPUS_ATTR_DTX, &attr->dtx);</span><br><span> </span><br><span> return cloned;</span><br><span> }</span><br><span>diff --git a/res/res_format_attr_silk.c b/res/res_format_attr_silk.c</span><br><span>index e2c9ca1..c0a4885 100644</span><br><span>--- a/res/res_format_attr_silk.c</span><br><span>+++ b/res/res_format_attr_silk.c</span><br><span>@@ -29,8 +29,13 @@</span><br><span> </span><br><span> #include "asterisk.h"</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+#include <ctype.h> /* for tolower */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> #include "asterisk/module.h"</span><br><span> #include "asterisk/format.h"</span><br><span style="color: hsl(120, 100%, 40%);">+#include "asterisk/logger.h" /* for ast_log, LOG_WARNING */</span><br><span style="color: hsl(120, 100%, 40%);">+#include "asterisk/strings.h" /* for ast_str_append */</span><br><span style="color: hsl(120, 100%, 40%);">+#include "asterisk/utils.h" /* for MAX, MIN */</span><br><span> </span><br><span> /*!</span><br><span> * \brief SILK attribute structure.</span><br><span>@@ -78,6 +83,7 @@</span><br><span> </span><br><span> static struct ast_format *silk_parse_sdp_fmtp(const struct ast_format *format, const char *attributes)</span><br><span> {</span><br><span style="color: hsl(120, 100%, 40%);">+ char *attribs = ast_strdupa(attributes), *attrib;</span><br><span> struct ast_format *cloned;</span><br><span> struct silk_attr *attr;</span><br><span> unsigned int val;</span><br><span>@@ -88,13 +94,18 @@</span><br><span> }</span><br><span> attr = ast_format_get_attribute_data(cloned);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- if (sscanf(attributes, "maxaveragebitrate=%30u", &val) == 1) {</span><br><span style="color: hsl(120, 100%, 40%);">+ /* lower-case everything, so we are case-insensitive */</span><br><span style="color: hsl(120, 100%, 40%);">+ for (attrib = attribs; *attrib; ++attrib) {</span><br><span style="color: hsl(120, 100%, 40%);">+ *attrib = tolower(*attrib);</span><br><span style="color: hsl(120, 100%, 40%);">+ } /* based on channels/chan_sip.c:process_a_sdp_image() */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (sscanf(attribs, "maxaveragebitrate=%30u", &val) == 1) {</span><br><span> attr->maxbitrate = val;</span><br><span> }</span><br><span style="color: hsl(0, 100%, 40%);">- if (sscanf(attributes, "usedtx=%30u", &val) == 1) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (sscanf(attribs, "usedtx=%30u", &val) == 1) {</span><br><span> attr->dtx = val;</span><br><span> }</span><br><span style="color: hsl(0, 100%, 40%);">- if (sscanf(attributes, "useinbandfec=%30u", &val) == 1) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (sscanf(attribs, "useinbandfec=%30u", &val) == 1) {</span><br><span> attr->fec = val;</span><br><span> }</span><br><span> </span><br><span>diff --git a/res/res_format_attr_siren14.c b/res/res_format_attr_siren14.c</span><br><span>index 2cc2a2f..111ec47 100644</span><br><span>--- a/res/res_format_attr_siren14.c</span><br><span>+++ b/res/res_format_attr_siren14.c</span><br><span>@@ -29,8 +29,13 @@</span><br><span> </span><br><span> #include "asterisk.h"</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+#include <ctype.h> /* for tolower */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> #include "asterisk/module.h"</span><br><span> #include "asterisk/format.h"</span><br><span style="color: hsl(120, 100%, 40%);">+#include "asterisk/astobj2.h" /* for ao2_bump */</span><br><span style="color: hsl(120, 100%, 40%);">+#include "asterisk/logger.h" /* for ast_log, LOG_WARNING */</span><br><span style="color: hsl(120, 100%, 40%);">+#include "asterisk/strings.h" /* for ast_str_append */</span><br><span> </span><br><span> /* Destroy is a required callback and must exist */</span><br><span> static void siren14_destroy(struct ast_format *format)</span><br><span>@@ -45,9 +50,15 @@</span><br><span> </span><br><span> static struct ast_format *siren14_parse_sdp_fmtp(const struct ast_format *format, const char *attributes)</span><br><span> {</span><br><span style="color: hsl(120, 100%, 40%);">+ char *attribs = ast_strdupa(attributes), *attrib;</span><br><span> unsigned int val;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- if (sscanf(attributes, "bitrate=%30u", &val) == 1) {</span><br><span style="color: hsl(120, 100%, 40%);">+ /* lower-case everything, so we are case-insensitive */</span><br><span style="color: hsl(120, 100%, 40%);">+ for (attrib = attribs; *attrib; ++attrib) {</span><br><span style="color: hsl(120, 100%, 40%);">+ *attrib = tolower(*attrib);</span><br><span style="color: hsl(120, 100%, 40%);">+ } /* based on channels/chan_sip.c:process_a_sdp_image() */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (sscanf(attribs, "bitrate=%30u", &val) == 1) {</span><br><span> if (val != 48000) {</span><br><span> ast_log(LOG_WARNING, "Got siren14 offer at %u bps, but only 48000 bps supported; ignoring.\n", val);</span><br><span> return NULL;</span><br><span>diff --git a/res/res_format_attr_siren7.c b/res/res_format_attr_siren7.c</span><br><span>index 7f4f165..72b0ff2 100644</span><br><span>--- a/res/res_format_attr_siren7.c</span><br><span>+++ b/res/res_format_attr_siren7.c</span><br><span>@@ -29,8 +29,13 @@</span><br><span> </span><br><span> #include "asterisk.h"</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+#include <ctype.h> /* for tolower */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> #include "asterisk/module.h"</span><br><span> #include "asterisk/format.h"</span><br><span style="color: hsl(120, 100%, 40%);">+#include "asterisk/astobj2.h" /* for ao2_bump */</span><br><span style="color: hsl(120, 100%, 40%);">+#include "asterisk/logger.h" /* for ast_log, LOG_WARNING */</span><br><span style="color: hsl(120, 100%, 40%);">+#include "asterisk/strings.h" /* for ast_str_append */</span><br><span> </span><br><span> /* Destroy is a required callback and must exist */</span><br><span> static void siren7_destroy(struct ast_format *format)</span><br><span>@@ -45,9 +50,15 @@</span><br><span> </span><br><span> static struct ast_format *siren7_parse_sdp_fmtp(const struct ast_format *format, const char *attributes)</span><br><span> {</span><br><span style="color: hsl(120, 100%, 40%);">+ char *attribs = ast_strdupa(attributes), *attrib;</span><br><span> unsigned int val;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- if (sscanf(attributes, "bitrate=%30u", &val) == 1) {</span><br><span style="color: hsl(120, 100%, 40%);">+ /* lower-case everything, so we are case-insensitive */</span><br><span style="color: hsl(120, 100%, 40%);">+ for (attrib = attribs; *attrib; ++attrib) {</span><br><span style="color: hsl(120, 100%, 40%);">+ *attrib = tolower(*attrib);</span><br><span style="color: hsl(120, 100%, 40%);">+ } /* based on channels/chan_sip.c:process_a_sdp_image() */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (sscanf(attribs, "bitrate=%30u", &val) == 1) {</span><br><span> if (val != 32000) {</span><br><span> ast_log(LOG_WARNING, "Got Siren7 offer at %u bps, but only 32000 bps supported; ignoring.\n", val);</span><br><span> return NULL;</span><br><span>diff --git a/res/res_format_attr_vp8.c b/res/res_format_attr_vp8.c</span><br><span>index f9babd8..c54e4ac 100644</span><br><span>--- a/res/res_format_attr_vp8.c</span><br><span>+++ b/res/res_format_attr_vp8.c</span><br><span>@@ -31,6 +31,8 @@</span><br><span> </span><br><span> #include "asterisk.h"</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+#include <ctype.h> /* for tolower */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> #include "asterisk/module.h"</span><br><span> #include "asterisk/format.h"</span><br><span> #include "asterisk/logger.h" /* for ast_log, LOG_WARNING */</span><br><span>@@ -76,6 +78,7 @@</span><br><span> </span><br><span> static struct ast_format *vp8_parse_sdp_fmtp(const struct ast_format *format, const char *attributes)</span><br><span> {</span><br><span style="color: hsl(120, 100%, 40%);">+ char *attribs = ast_strdupa(attributes), *attrib;</span><br><span> struct ast_format *cloned;</span><br><span> struct vp8_attr *attr;</span><br><span> const char *kvp;</span><br><span>@@ -87,13 +90,18 @@</span><br><span> }</span><br><span> attr = ast_format_get_attribute_data(cloned);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- if ((kvp = strstr(attributes, "max-fr")) && sscanf(kvp, "max-fr=%30u", &val) == 1) {</span><br><span style="color: hsl(120, 100%, 40%);">+ /* lower-case everything, so we are case-insensitive */</span><br><span style="color: hsl(120, 100%, 40%);">+ for (attrib = attribs; *attrib; ++attrib) {</span><br><span style="color: hsl(120, 100%, 40%);">+ *attrib = tolower(*attrib);</span><br><span style="color: hsl(120, 100%, 40%);">+ } /* based on channels/chan_sip.c:process_a_sdp_image() */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if ((kvp = strstr(attribs, "max-fr")) && sscanf(kvp, "max-fr=%30u", &val) == 1) {</span><br><span> attr->maximum_frame_rate = val;</span><br><span> } else {</span><br><span> attr->maximum_frame_rate = UINT_MAX;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- if ((kvp = strstr(attributes, "max-fs")) && sscanf(kvp, "max-fs=%30u", &val) == 1) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if ((kvp = strstr(attribs, "max-fs")) && sscanf(kvp, "max-fs=%30u", &val) == 1) {</span><br><span> attr->maximum_frame_size = val;</span><br><span> } else {</span><br><span> attr->maximum_frame_size = UINT_MAX;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/15589">change 15589</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/15589"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Idf2a73457be231647aed3c87b1da197afba86892 </div>
<div style="display:none"> Gerrit-Change-Number: 15589 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Alexander Traud <pabstraud@compuserve.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>