<p>Alexei Gradinari has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18642">View Change</a></p><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;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/42/18642/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 5cccdcc..13968d3 100644</span><br><span>--- a/res/res_pjsip_pubsub.c</span><br><span>+++ b/res/res_pjsip_pubsub.c</span><br><span>@@ -4059,6 +4059,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><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18642">change 18642</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/+/18642"/><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: I1c644e5e15a8fe43eed8e4f9112f113cbf87a40f </div>
<div style="display:none"> Gerrit-Change-Number: 18642 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexei Gradinari <alex2grad@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>