summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorCorey Farrell <git@cfware.com>2017-12-29 03:57:17 -0500
committerCorey Farrell <git@cfware.com>2018-01-24 13:37:29 -0500
commit527cf5a57033820313356414b971fdf0f4382b21 (patch)
tree44810fb922062b5c2879cad1e9cb49b6d8772a80 /apps
parent7ce34f4e6a8a2bbfc3cfac9a4465eb0f71372205 (diff)
Remove redundant module checks and references.
This removes references that are no longer needed due to automatic references created by module dependencies. In addition this removes most calls to ast_module_check as they were checking modules which are listed as dependencies. Change-Id: I332a6e8383d4c72c8e89d988a184ab8320c4872e
Diffstat (limited to 'apps')
-rw-r--r--apps/app_confbridge.c5
-rw-r--r--apps/app_meetme.c3
-rw-r--r--apps/app_stack.c2
-rw-r--r--apps/app_stasis.c11
4 files changed, 8 insertions, 13 deletions
diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c
index f972e38b9..7e6f94c34 100644
--- a/apps/app_confbridge.c
+++ b/apps/app_confbridge.c
@@ -2386,11 +2386,11 @@ static int confbridge_exec(struct ast_channel *chan, const char *data)
user.tech_args.drop_silence = 1;
}
- if (ast_test_flag(&user.u_profile, USER_OPT_JITTERBUFFER) && ast_module_check("func_jitterbuffer.so")) {
+ if (ast_test_flag(&user.u_profile, USER_OPT_JITTERBUFFER)) {
ast_func_write(chan, "JITTERBUFFER(adaptive)", "default");
}
- if (ast_test_flag(&user.u_profile, USER_OPT_DENOISE) && ast_module_check("codec_speex.so")) {
+ if (ast_test_flag(&user.u_profile, USER_OPT_DENOISE)) {
ast_func_write(chan, "DENOISE(rx)", "on");
}
@@ -4088,4 +4088,5 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Conference Bridge App
.unload = unload_module,
.reload = reload,
.load_pri = AST_MODPRI_DEVSTATE_PROVIDER,
+ .optional_modules = "codec_speex,func_jitterbuffer",
);
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index 634eac820..657aaa7b7 100644
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -3588,7 +3588,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc
}
/* Reduce background noise from each participant */
- if (!ast_test_flag64(confflags, CONFFLAG_DONT_DENOISE) && ast_module_check("func_speex.so")) {
+ if (!ast_test_flag64(confflags, CONFFLAG_DONT_DENOISE)) {
ast_func_write(chan, "DENOISE(rx)", "on");
}
@@ -8085,4 +8085,5 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "MeetMe conference bri
.unload = unload_module,
.reload = reload,
.load_pri = AST_MODPRI_DEVSTATE_PROVIDER,
+ .optional_modules = "func_speex",
);
diff --git a/apps/app_stack.c b/apps/app_stack.c
index 1f98378c9..4560865ab 100644
--- a/apps/app_stack.c
+++ b/apps/app_stack.c
@@ -1278,7 +1278,7 @@ static int unload_module(void)
{
ast_install_stack_functions(NULL);
- ast_agi_unregister(ast_module_info->self, &gosub_agi_command);
+ ast_agi_unregister(&gosub_agi_command);
ast_unregister_application(app_return);
ast_unregister_application(app_pop);
diff --git a/apps/app_stasis.c b/apps/app_stasis.c
index 8d09349b9..b98c2b446 100644
--- a/apps/app_stasis.c
+++ b/apps/app_stasis.c
@@ -125,19 +125,12 @@ static int app_exec(struct ast_channel *chan, const char *data)
static int load_module(void)
{
- int r = 0;
-
- stasis_app_ref();
- r |= ast_register_application_xml(stasis, app_exec);
- return r;
+ return ast_register_application_xml(stasis, app_exec);
}
static int unload_module(void)
{
- int r = 0;
- r |= ast_unregister_application(stasis);
- stasis_app_unref();
- return r;
+ return ast_unregister_application(stasis);
}
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Stasis dialplan application",