<p>Friendly Automation <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/16478">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Friendly Automation: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">pjproject: Add patch to fix trailing whitespace issue in rtpmap<br><br>An issue was found where a particular manufacturer's phones add a<br>trailing space to the end of the rtpmap attribute when specifying<br>a payload type that has a "param" after the format name and clock<br>rate. For example:<br><br>a=rtpmap:120 opus/48000/2 \r\n<br><br>Because pjmedia_sdp_attr_get_rtpmap currently takes everything after<br>the second '/' up to the line end as the param, the space is<br>included in future comparisons, which then fail if the param being<br>compared to doesn't also have the space.<br><br>We now use pj_scan_get() to parse the param part of rtpmap so<br>trailing whitespace is automatically stripped.<br><br>ASTERISK-29654<br><br>Change-Id: Ibd0a4e243a69cde7ba9312275b13ab62ab86bc1b<br>---<br>A third-party/pjproject/patches/0120-pjmedia_sdp_attr_get_rtpmap-Strip-param-trailing-whi.patch<br>1 file changed, 32 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/third-party/pjproject/patches/0120-pjmedia_sdp_attr_get_rtpmap-Strip-param-trailing-whi.patch b/third-party/pjproject/patches/0120-pjmedia_sdp_attr_get_rtpmap-Strip-param-trailing-whi.patch</span><br><span>new file mode 100644</span><br><span>index 0000000..1b1fcad</span><br><span>--- /dev/null</span><br><span>+++ b/third-party/pjproject/patches/0120-pjmedia_sdp_attr_get_rtpmap-Strip-param-trailing-whi.patch</span><br><span>@@ -0,0 +1,32 @@</span><br><span style="color: hsl(120, 100%, 40%);">+From 2ae784030b0d9cf217c3d562af20e4967f19a3dc Mon Sep 17 00:00:00 2001</span><br><span style="color: hsl(120, 100%, 40%);">+From: George Joseph <gjoseph@sangoma.com></span><br><span style="color: hsl(120, 100%, 40%);">+Date: Tue, 14 Sep 2021 10:47:29 -0600</span><br><span style="color: hsl(120, 100%, 40%);">+Subject: [PATCH] pjmedia_sdp_attr_get_rtpmap: Strip param trailing whitespace</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Use pj_scan_get() to parse the param part of rtpmap so</span><br><span style="color: hsl(120, 100%, 40%);">+trailing whitespace is automatically stripped.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Fixes #2827</span><br><span style="color: hsl(120, 100%, 40%);">+---</span><br><span style="color: hsl(120, 100%, 40%);">+ pjmedia/src/pjmedia/sdp.c | 4 ++--</span><br><span style="color: hsl(120, 100%, 40%);">+ 1 file changed, 2 insertions(+), 2 deletions(-)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+diff --git a/pjmedia/src/pjmedia/sdp.c b/pjmedia/src/pjmedia/sdp.c</span><br><span style="color: hsl(120, 100%, 40%);">+index 5d05a0d9c..3448749c9 100644</span><br><span style="color: hsl(120, 100%, 40%);">+--- a/pjmedia/src/pjmedia/sdp.c</span><br><span>++++ b/pjmedia/src/pjmedia/sdp.c</span><br><span style="color: hsl(120, 100%, 40%);">+@@ -313,9 +313,9 @@ PJ_DEF(pj_status_t) pjmedia_sdp_attr_get_rtpmap( const pjmedia_sdp_attr *attr,</span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+ /* Expecting either '/' or EOF */</span><br><span style="color: hsl(120, 100%, 40%);">+ if (*scanner.curptr == '/') {</span><br><span style="color: hsl(120, 100%, 40%);">++ /* Skip the '/' */</span><br><span style="color: hsl(120, 100%, 40%);">+ pj_scan_get_char(&scanner);</span><br><span style="color: hsl(120, 100%, 40%);">+- rtpmap->param.ptr = scanner.curptr;</span><br><span style="color: hsl(120, 100%, 40%);">+- rtpmap->param.slen = scanner.end - scanner.curptr;</span><br><span style="color: hsl(120, 100%, 40%);">++ pj_scan_get(&scanner, &cs_token, &rtpmap->param);</span><br><span style="color: hsl(120, 100%, 40%);">+ } else {</span><br><span style="color: hsl(120, 100%, 40%);">+ rtpmap->param.slen = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+-- </span><br><span style="color: hsl(120, 100%, 40%);">+2.31.1</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span></span><br></pre><div style="white-space:pre-wrap"></div><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/16478">change 16478</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/+/16478"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 18 </div>
<div style="display:none"> Gerrit-Change-Id: Ibd0a4e243a69cde7ba9312275b13ab62ab86bc1b </div>
<div style="display:none"> Gerrit-Change-Number: 16478 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.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-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>