<p>Corey Farrell <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/7770">View Change</a></p><p>Patch set 1:</p><p style="white-space: pre-wrap; word-wrap: break-word;">I'm adding comments to the places which support NULL module (registration from main/*.c).</p><p>(4 comments)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/7770/1/main/bridge.c">File main/bridge.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/7770/1/main/bridge.c@528">Patch Set #1, Line 528:</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 bridge module is not actually running. */<br>                      /* BUGBUG: improve handling of this situation. */<br>                     best = NULL;<br>          }<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Just a thought, but you could search again for the next best?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">No but we can do the reference from within the loop.  I modified the registration function to keep bridge_technologies sorted by preference so if we have multiple compatible tech's we should find the best first.</p></li></ul></li><li><p><a href="https://gerrit.asterisk.org/#/c/7770/1/main/cli.c">File main/cli.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/7770/1/main/cli.c@2683">Patch Set #1, Line 2683:</a> <code style="font-family:monospace,monospace">                            if (!e->module || ast_module_running_ref(e->module)) {</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Can skip the null check here as it's checked for in ast_module_running</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">The NULL check is needed as ast_module_running_ref will return NULL for CLI from main/*.c (e->module == NULL), but those commands can still be run.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/7770/1/main/cli.c@2765">Patch Set #1, Line 2765:</a> <code style="font-family:monospace,monospace">    if (!e->module || ast_module_running_ref(e->module)) {</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Can skip the null check here as it's checked for in ast_module_running</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Same.</p></li></ul></li><li><p><a href="https://gerrit.asterisk.org/#/c/7770/1/main/manager.c">File main/manager.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/7770/1/main/manager.c@2950">Patch Set #1, Line 2950:</a> <code style="font-family:monospace,monospace">                      if (mod_ref || !act_found->module) {</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">This took me a second to parse (don't enter if module ref was rejected due </blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I'm going to swap the order so !act_found->module is checked first like in CLI.c.  This is don't enter if we have a module and it is not running.  Like CLI it's valid for act_found->module to be NULL.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/7770">change 7770</a>. To unsubscribe, 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/7770"/><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: Ia16fd28e188b2fc0b9d18b8a5d9cacc31df73fcc </div>
<div style="display:none"> Gerrit-Change-Number: 7770 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 03 Jan 2018 22:21:20 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>