<p><a href="https://gerrit.asterisk.org/c/asterisk/+/15494">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15494/3/res/res_pjsip_refer.c">File res/res_pjsip_refer.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/15494/3/res/res_pjsip_refer.c@346">Patch Set #3, Line 346:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">     progress->sub = NULL;<br><br>            ast_debug(3, "Subscription '%p' removed from progress monitor '%p'\n", sub, progress);<br><br>            if (pjsip_evsub_get_mod_data(sub, refer_progress_module.id)) {<br>                        pjsip_evsub_set_mod_data(sub, refer_progress_module.id, NULL);<br>                        ao2_cleanup(progress);<br>                }<br></pre></blockquote></p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">My previous comment about no longer needing to test if the pjsip_evsub_get_mod_data() is still valid.  There is no need to test, just do because we are holding the dialog lock just like in refer_progress_notify().</p><p style="white-space: pre-wrap; word-wrap: break-word;">It appears that the indicated code could be put into a helper routine that is called by refere_progress_notify() too.</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">helper_routine(progress)<br>{<br>  progress->sub = NULL<br>  pjsip_evsub_set_mod_data(progress->sub, refer_progress_module.id, NULL)</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">  /* Remove the ref held by the evsub mod data pointer */<br>  ao2_cleanup(progress)<br>}</pre></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">Well, actually, pjproject always calls refer_progress_on_evsub_state() when the subscription actually terminates so i'm not sure why we were also doing it in res_progress_notify().</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/15494">change 15494</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/+/15494"/><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: I97a8bb01771a3c85345649b8124507f7622a8480 </div>
<div style="display:none"> Gerrit-Change-Number: 15494 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.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: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 24 Feb 2021 18:03:49 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>