<p>Joshua Colp <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/10653">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, 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_pjsip_caller_id: Use static pj_str_t for fromto header names.<br><br>PJSIP assumes that these header names are not allocated, does not clone<br>the name strings when reusing headers.<br><br>Block unload of res_pjsip_caller_id until shutdown to ensure static<br>memory stays valid. It was previously unsafe to unload while any<br>sessions are active.<br><br>Change-Id: I190854dea943d6e441cf03733f8a0da661aea27f<br>---<br>M res/res_pjsip_caller_id.c<br>1 file changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_caller_id.c b/res/res_pjsip_caller_id.c</span><br><span>index 1a5fa3c..20c73da 100644</span><br><span>--- a/res/res_pjsip_caller_id.c</span><br><span>+++ b/res/res_pjsip_caller_id.c</span><br><span>@@ -430,8 +430,7 @@</span><br><span> </span><br><span> id_hdr = pjsip_from_hdr_create(tdata->pool);</span><br><span> id_hdr->type = PJSIP_H_OTHER;</span><br><span style="color: hsl(0, 100%, 40%);">- pj_strdup(tdata->pool, &id_hdr->name, hdr_name);</span><br><span style="color: hsl(0, 100%, 40%);">- id_hdr->sname = id_hdr->name;</span><br><span style="color: hsl(120, 100%, 40%);">+ id_hdr->sname = id_hdr->name = *hdr_name;</span><br><span> </span><br><span> id_name_addr = pjsip_uri_clone(tdata->pool, base->uri);</span><br><span> id_uri = pjsip_uri_get_uri(id_name_addr->uri);</span><br><span>@@ -779,6 +778,7 @@</span><br><span> </span><br><span> static int load_module(void)</span><br><span> {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_module_shutdown_ref(AST_MODULE_SELF);</span><br><span> ast_sip_session_register_supplement(&caller_id_supplement);</span><br><span> return AST_MODULE_LOAD_SUCCESS;</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/10653">change 10653</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/10653"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I190854dea943d6e441cf03733f8a0da661aea27f </div>
<div style="display:none"> Gerrit-Change-Number: 10653 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 (1000185) </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>