<p style="white-space: pre-wrap; word-wrap: break-word;">Patchset 2 is correct. I've replied inline to explain why.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Sorry for the noise, but I implemented the fix about one year ago (was January). In the meanwhile I've forgotten many details, but I can just say it's 11 months we are using it w/o any issue.</p><p><a href="https://gerrit.asterisk.org/10701">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/10701/2/main/pbx.c">File main/pbx.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/10701/2/main/pbx.c@3316">Patch Set #2, Line 3316:</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;">                /* The extension has already been destroyed,<br>           * notify extension deactivation<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;">AFAICT it may happen since the device_state_notify_callbacks<br>function is called from both handle_hint_change_message_type() (via<br>stasis) and device_state_cb().</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">I was wrong, it cannot happen.</p><p style="white-space: pre-wrap; word-wrap: break-word;">The handle_hint_change_message_type() is called from device_state_cb(). device_state_cb() checks for handle_hint_change_message_type() return value and if succeded it returns w/o calling device_state_notify_callbacks again...<br>Furthermore, once the ast_remove_hint is called no other functions can publish a hint_change stasis message for the same hint.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I'm going to revert patchset 3 and improve the comment to explain why.</p><p style="white-space: pre-wrap; word-wrap: break-word;">In addition I'll remove the check for not null hint->callbacks since it's removed within hint destructor (but here we still hold a ref to the hint).</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/10701">change 10701</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/10701"/><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: comment </div>
<div style="display:none"> Gerrit-Change-Id: I5b03c3455b3b12b6f83cea4cc34f4b4b20444f7e </div>
<div style="display:none"> Gerrit-Change-Number: 10701 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Giuseppe Sucameli <sucameli@netresults.it> </div>
<div style="display:none"> Gerrit-Reviewer: Giuseppe Sucameli <sucameli@netresults.it> </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-Comment-Date: Fri, 07 Dec 2018 10:33:11 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>