<p>Joshua Colp <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6539">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Sean Bright: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved; Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_pubsub: Check for Content-Type header in rx_notify_request<br><br>pubsub_on_rx_notify_request wasn't checking for a null<br>Content-Type header before checking that it was<br>application/simple-message-summary.<br><br>ASTERISK-27279<br>Reported by: Ross Beer<br><br>Change-Id: Iec2a6c4d2e74af37ff779ecc9fd35644c5c4ea52<br>---<br>M res/res_pjsip_pubsub.c<br>1 file changed, 6 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c<br>index 81b25ac..b0365d9 100644<br>--- a/res/res_pjsip_pubsub.c<br>+++ b/res/res_pjsip_pubsub.c<br>@@ -3524,10 +3524,12 @@<br> return PJ_TRUE;<br> }<br> <br>+static pjsip_media_type simple_message_summary;<br>+<br> static pj_bool_t pubsub_on_rx_notify_request(pjsip_rx_data *rdata)<br> {<br>- if (pj_stricmp2(&rdata->msg_info.msg->body->content_type.type, "application") == 0 &&<br>- pj_stricmp2(&rdata->msg_info.msg->body->content_type.subtype, "simple-message-summary") == 0) {<br>+ if (rdata->msg_info.msg->body &&<br>+ pjsip_media_type_cmp(&rdata->msg_info.msg->body->content_type, &simple_message_summary, 0) == 0) {<br> return pubsub_on_rx_mwi_notify_request(rdata);<br> }<br> return PJ_FALSE;<br>@@ -5363,6 +5365,8 @@<br> return AST_MODULE_LOAD_DECLINE;<br> }<br> <br>+ pjsip_media_type_init2(&simple_message_summary, "application", "simple-message-summary");<br>+<br> if (ast_sched_start_thread(sched)) {<br> ast_log(LOG_ERROR, "Could not start scheduler thread for publication expiration\n");<br> ast_sched_context_destroy(sched);<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6539">change 6539</a>. To unsubscribe, 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/6539"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 14 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Iec2a6c4d2e74af37ff779ecc9fd35644c5c4ea52 </div>
<div style="display:none"> Gerrit-Change-Number: 6539 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean.bright@gmail.com> </div>