<p>Friendly Automation <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/19723">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span></span><br></pre><div style="white-space:pre-wrap">Approvals:
George Joseph: Looks good to me, approved
Friendly Automation: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_aoc: Don't assume a body exists on responses.<br><br>When adding AOC to an outgoing response the code<br>assumed that a body would exist for comparing the<br>Content-Type. This isn't always true.<br><br>The code now checks to make sure the response has<br>a body before checking the Content-Type.<br><br>ASTERISK-21502<br><br>Change-Id: Iaead371434fc3bc693dad487228106a7d7a5ac76<br>---<br>M res/res_pjsip_aoc.c<br>1 file changed, 19 insertions(+), 1 deletion(-)<br><br></pre>
<pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_aoc.c b/res/res_pjsip_aoc.c</span><br><span>index dba4e26..6e3d81d 100644</span><br><span>--- a/res/res_pjsip_aoc.c</span><br><span>+++ b/res/res_pjsip_aoc.c</span><br><span>@@ -628,7 +628,7 @@</span><br><span> return;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- if (pjsip_media_type_cmp(&tdata->msg->body->content_type,</span><br><span style="color: hsl(120, 100%, 40%);">+ if (tdata->msg->body && pjsip_media_type_cmp(&tdata->msg->body->content_type,</span><br><span> &pjsip_media_type_multipart_mixed, 0) == 0) {</span><br><span> multipart_body = tdata->msg->body;</span><br><span> } else {</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/19723">change 19723</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/+/19723"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 20 </div>
<div style="display:none"> Gerrit-Change-Id: Iaead371434fc3bc693dad487228106a7d7a5ac76 </div>
<div style="display:none"> Gerrit-Change-Number: 19723 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@sangoma.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-MessageType: merged </div>