<p>Joshua Colp has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/19710">View Change</a></p><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;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/10/19710/1</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/+/19710">change 19710</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/+/19710"/><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: Iaead371434fc3bc693dad487228106a7d7a5ac76 </div>
<div style="display:none"> Gerrit-Change-Number: 19710 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>