<p>Friendly Automation <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18608">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, approved
Friendly Automation: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_pubsub: delete scheduled notification on RLS update<br><br>If there is scheduled notification, we must delete it<br>to avoid using destroyed subscriptions.<br><br>ASTERISK-29906<br><br>Change-Id: I1c644e5e15a8fe43eed8e4f9112f113cbf87a40f<br>---<br>M res/res_pjsip_pubsub.c<br>1 file changed, 6 insertions(+), 0 deletions(-)<br><br></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 a0fe273..d0f3717 100644</span><br><span>--- a/res/res_pjsip_pubsub.c</span><br><span>+++ b/res/res_pjsip_pubsub.c</span><br><span>@@ -4061,6 +4061,12 @@</span><br><span> new_root->version = old_root->version;</span><br><span> sub_tree->root = new_root;</span><br><span> sub_tree->generate_initial_notify = 1;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ /* If there is scheduled notification need to delete it to avoid use old subscriptions */</span><br><span style="color: hsl(120, 100%, 40%);">+ if (sub_tree->notify_sched_id > -1) {</span><br><span style="color: hsl(120, 100%, 40%);">+ AST_SCHED_DEL_UNREF(sched, sub_tree->notify_sched_id, ao2_ref(sub_tree, -1));</span><br><span style="color: hsl(120, 100%, 40%);">+ sub_tree->send_scheduled_notify = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span> shutdown_subscriptions(old_root);</span><br><span> destroy_subscriptions(old_root);</span><br><span> } else {</span><br><span></span><br></pre><div style="white-space:pre-wrap"></div><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18608">change 18608</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/+/18608"/><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-Change-Id: I1c644e5e15a8fe43eed8e4f9112f113cbf87a40f </div>
<div style="display:none"> Gerrit-Change-Number: 18608 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Alexei Gradinari <alex2grad@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>