<p>Joshua Colp has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/9318">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_pubsub: Hold module reference for publications.<br><br>Incoming publications need to ensure that the module remains<br>loaded for the lifetime of them. This is now done by holding<br>a reference to the module while the publication exists. This<br>mirrors that of inbound subscriptions.<br><br>ASTERISK-27783<br><br>Change-Id: Ia98c95a15e11af25728d5fb3e56e12cda0cfc7c0<br>---<br>M res/res_pjsip_pubsub.c<br>1 file changed, 4 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/18/9318/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c</span><br><span>index 4526e02..fd83a39 100644</span><br><span>--- a/res/res_pjsip_pubsub.c</span><br><span>+++ b/res/res_pjsip_pubsub.c</span><br><span>@@ -3161,6 +3161,8 @@</span><br><span> </span><br><span>   ao2_cleanup(publication->datastores);</span><br><span>     ao2_cleanup(publication->endpoint);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      ast_module_unref(ast_module_info->self);</span><br><span> }</span><br><span> </span><br><span> static struct ast_sip_publication *sip_create_publication(struct ast_sip_endpoint *endpoint, pjsip_rx_data *rdata,</span><br><span>@@ -3192,6 +3194,8 @@</span><br><span>   dst += resource_len;</span><br><span>         publication->event_configuration_name = strcpy(dst, event_configuration_name);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ ast_module_ref(ast_module_info->self);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>  return publication;</span><br><span> }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/9318">change 9318</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/9318"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ia98c95a15e11af25728d5fb3e56e12cda0cfc7c0 </div>
<div style="display:none"> Gerrit-Change-Number: 9318 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@digium.com> </div>