<p>Corey Farrell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/6934">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Modules: Fix issues with CLI completion.<br><br>* Stop using ast_module_helper to check if a module is loaded, use<br> ast_module_check instead (app_confbridge and app_meetme).<br>* Stop ast_module_helper from listing reload classes when needsreload<br> was not requested.<br><br>ASTERISK-27378<br><br>Change-Id: Iaed8c1e4fcbeb242921dbac7929a0fe75ff4b239<br>---<br>M apps/app_confbridge.c<br>M apps/app_meetme.c<br>M main/loader.c<br>3 files changed, 11 insertions(+), 20 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/34/6934/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c<br>index d218d0f..73dff86 100644<br>--- a/apps/app_confbridge.c<br>+++ b/apps/app_confbridge.c<br>@@ -2386,21 +2386,12 @@<br> user.tech_args.drop_silence = 1;<br> }<br> <br>- if (ast_test_flag(&user.u_profile, USER_OPT_JITTERBUFFER)) {<br>- char *func_jb;<br>- if ((func_jb = ast_module_helper("", "func_jitterbuffer", 0, 0, 0, 0))) {<br>- ast_free(func_jb);<br>- ast_func_write(chan, "JITTERBUFFER(adaptive)", "default");<br>- }<br>+ if (ast_test_flag(&user.u_profile, USER_OPT_JITTERBUFFER) && ast_module_check("func_jitterbuffer.so")) {<br>+ ast_func_write(chan, "JITTERBUFFER(adaptive)", "default");<br> }<br> <br>- if (ast_test_flag(&user.u_profile, USER_OPT_DENOISE)) {<br>- char *mod_speex;<br>- /* Reduce background noise from each participant */<br>- if ((mod_speex = ast_module_helper("", "codec_speex", 0, 0, 0, 0))) {<br>- ast_free(mod_speex);<br>- ast_func_write(chan, "DENOISE(rx)", "on");<br>- }<br>+ if (ast_test_flag(&user.u_profile, USER_OPT_DENOISE) && ast_module_check("codec_speex.so")) {<br>+ ast_func_write(chan, "DENOISE(rx)", "on");<br> }<br> <br> /* if this user has a intro, play it before entering */<br>diff --git a/apps/app_meetme.c b/apps/app_meetme.c<br>index 7ca9ba3..5567fe0 100644<br>--- a/apps/app_meetme.c<br>+++ b/apps/app_meetme.c<br>@@ -3198,7 +3198,7 @@<br> struct timeval now;<br> struct ast_dsp *dsp = NULL;<br> struct ast_app *agi_app;<br>- char *agifile, *mod_speex;<br>+ char *agifile;<br> const char *agifiledefault = "conf-background.agi", *tmpvar;<br> char meetmesecs[30] = "";<br> char exitcontext[AST_MAX_CONTEXT] = "";<br>@@ -3588,9 +3588,7 @@<br> }<br> <br> /* Reduce background noise from each participant */<br>- if (!ast_test_flag64(confflags, CONFFLAG_DONT_DENOISE) &&<br>- (mod_speex = ast_module_helper("", "func_speex", 0, 0, 0, 0))) {<br>- ast_free(mod_speex);<br>+ if (!ast_test_flag64(confflags, CONFFLAG_DONT_DENOISE) && ast_module_check("func_speex.so")) {<br> ast_func_write(chan, "DENOISE(rx)", "on");<br> }<br> <br>diff --git a/main/loader.c b/main/loader.c<br>index d550007..8250f1f 100644<br>--- a/main/loader.c<br>+++ b/main/loader.c<br>@@ -708,8 +708,9 @@<br> int i, which=0, l = strlen(word);<br> char *ret = NULL;<br> <br>- if (pos != rpos)<br>+ if (pos != rpos) {<br> return NULL;<br>+ }<br> <br> AST_DLLIST_LOCK(&module_list);<br> AST_DLLIST_TRAVERSE(&module_list, cur, entry) {<br>@@ -722,10 +723,11 @@<br> }<br> AST_DLLIST_UNLOCK(&module_list);<br> <br>- if (!ret) {<br>+ if (!ret && needsreload) {<br> for (i=0; !ret && reload_classes[i].name; i++) {<br>- if (!strncasecmp(word, reload_classes[i].name, l) && ++which > state)<br>+ if (!strncasecmp(word, reload_classes[i].name, l) && ++which > state) {<br> ret = ast_strdup(reload_classes[i].name);<br>+ }<br> }<br> }<br> <br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6934">change 6934</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/6934"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Iaed8c1e4fcbeb242921dbac7929a0fe75ff4b239 </div>
<div style="display:none"> Gerrit-Change-Number: 6934 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>