summaryrefslogtreecommitdiff
path: root/funcs
diff options
context:
space:
mode:
Diffstat (limited to 'funcs')
-rw-r--r--funcs/func_cdr.c5
-rw-r--r--funcs/func_holdintercept.c2
-rw-r--r--funcs/func_talkdetect.c2
3 files changed, 5 insertions, 4 deletions
diff --git a/funcs/func_cdr.c b/funcs/func_cdr.c
index e67bca318..12e6f3bfc 100644
--- a/funcs/func_cdr.c
+++ b/funcs/func_cdr.c
@@ -651,7 +651,7 @@ static int load_module(void)
int res = 0;
if (!router) {
- return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_DECLINE;
}
res |= STASIS_MESSAGE_TYPE_INIT(cdr_read_message_type);
@@ -667,7 +667,8 @@ static int load_module(void)
cdr_read_callback, NULL);
if (res) {
- return AST_MODULE_LOAD_FAILURE;
+ unload_module();
+ return AST_MODULE_LOAD_DECLINE;
}
return AST_MODULE_LOAD_SUCCESS;
}
diff --git a/funcs/func_holdintercept.c b/funcs/func_holdintercept.c
index 56d9a9e83..f4907d102 100644
--- a/funcs/func_holdintercept.c
+++ b/funcs/func_holdintercept.c
@@ -230,7 +230,7 @@ static int unload_module(void)
/*! \internal \brief Load the module */
static int load_module(void)
{
- return ast_custom_function_register(&hold_intercept_function) ? AST_MODULE_LOAD_FAILURE : AST_MODULE_LOAD_SUCCESS;
+ return ast_custom_function_register(&hold_intercept_function) ? AST_MODULE_LOAD_DECLINE : AST_MODULE_LOAD_SUCCESS;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Hold interception dialplan function");
diff --git a/funcs/func_talkdetect.c b/funcs/func_talkdetect.c
index ccc74fd7f..9700a2451 100644
--- a/funcs/func_talkdetect.c
+++ b/funcs/func_talkdetect.c
@@ -399,7 +399,7 @@ static int load_module(void)
res |= ast_custom_function_register(&talk_detect_function);
- return res ? AST_MODULE_LOAD_FAILURE : AST_MODULE_LOAD_SUCCESS;
+ return res ? AST_MODULE_LOAD_DECLINE : AST_MODULE_LOAD_SUCCESS;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Talk detection dialplan function");