diff options
author | Corey Farrell <git@cfware.com> | 2017-12-29 03:57:17 -0500 |
---|---|---|
committer | Corey Farrell <git@cfware.com> | 2018-01-24 13:37:29 -0500 |
commit | 527cf5a57033820313356414b971fdf0f4382b21 (patch) | |
tree | 44810fb922062b5c2879cad1e9cb49b6d8772a80 /res/res_stasis.c | |
parent | 7ce34f4e6a8a2bbfc3cfac9a4465eb0f71372205 (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 'res/res_stasis.c')
-rw-r--r-- | res/res_stasis.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/res/res_stasis.c b/res/res_stasis.c index a60ec5fde..dcd74141f 100644 --- a/res/res_stasis.c +++ b/res/res_stasis.c @@ -1302,8 +1302,6 @@ static void remove_stasis_end_published(struct ast_channel *chan) int stasis_app_exec(struct ast_channel *chan, const char *app_name, int argc, char *argv[]) { - SCOPED_MODULE_USE(ast_module_info->self); - RAII_VAR(struct stasis_app *, app, NULL, ao2_cleanup); RAII_VAR(struct stasis_app_control *, control, NULL, control_unlink); struct ast_bridge *bridge = NULL; @@ -1654,11 +1652,6 @@ void stasis_app_register_event_source(struct stasis_app_event_source *obj) { AST_RWLIST_WRLOCK(&event_sources); AST_LIST_INSERT_TAIL(&event_sources, obj, next); - /* only need to bump the module ref on non-core sources because the - core ones are [un]registered by this module. */ - if (!stasis_app_is_core_event_source(obj)) { - ast_module_ref(ast_module_info->self); - } AST_RWLIST_UNLOCK(&event_sources); } @@ -1670,9 +1663,6 @@ void stasis_app_unregister_event_source(struct stasis_app_event_source *obj) AST_RWLIST_TRAVERSE_SAFE_BEGIN(&event_sources, source, next) { if (source == obj) { AST_RWLIST_REMOVE_CURRENT(next); - if (!stasis_app_is_core_event_source(obj)) { - ast_module_unref(ast_module_info->self); - } break; } } @@ -2036,16 +2026,6 @@ enum stasis_app_user_event_res stasis_app_user_event(const char *app_name, return STASIS_APP_USER_OK; } -void stasis_app_ref(void) -{ - ast_module_ref(ast_module_info->self); -} - -void stasis_app_unref(void) -{ - ast_module_unref(ast_module_info->self); -} - static int unload_module(void) { stasis_app_unregister_event_sources(); |