Merge "Remove redundant module checks and references."

This commit is contained in:
Jenkins2
2018-01-29 12:39:34 -06:00
committed by Gerrit Code Review
103 changed files with 143 additions and 760 deletions

View File

@@ -2848,7 +2848,6 @@ static struct stasis_rest_handlers channels = {
static int unload_module(void)
{
ast_ari_remove_handler(&channels);
stasis_app_unref();
return 0;
}
@@ -2856,10 +2855,7 @@ static int load_module(void)
{
int res = 0;
CHECK_ARI_MODULE_LOADED();
stasis_app_ref();
res |= ast_ari_add_handler(&channels);
if (res) {
unload_module();