<p><a href="https://gerrit.asterisk.org/10382">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/10382/2/res/res_smdi.c">File res/res_smdi.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/10382/2/res/res_smdi.c@249">Patch Set #2, Line 249:</a> <code style="font-family:monospace,monospace"> ast_module_unref(ast_module_info->self);</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">I think the interface/thread should not hold a reference to the module, we should just use ast_modul […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I had originally removed these module ref/unref's because I thought the iface objects were entirely contained within this module. Then I found ast_smdi_interface_find() returning refs to external modules.</p><p style="white-space: pre-wrap; word-wrap: break-word;">The only way to be sure that module refs are kept for externally held iface objects would be to pass a wrapper object back from ast_smdi_interface_find() and make the API use the wrapper objects instead. The wrapper object would track these externally held iface refs to control the module refs.</p><p style="white-space: pre-wrap; word-wrap: break-word;">It looks like chan_dahdi.c makes an attempt to cleanup these iface refs. However, app_voicemail.c never releases the iface ref it gets. It would never be safe to use ast_module_shutdown_ref() in this case because the iface thread is never shutdown.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I feel the same way about this module. The module is old, poorly written, and supports old technology that appears to no longer be used with Asterisk.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/10382">change 10382</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/10382"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: Ic288db51b58e395d6a2fc3847f77176c16988784 </div>
<div style="display:none"> Gerrit-Change-Number: 10382 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 (1000185) </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 03 Oct 2018 16:08:03 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>