diff options
Diffstat (limited to 'apps/app_cdr.c')
-rw-r--r-- | apps/app_cdr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/app_cdr.c b/apps/app_cdr.c index 17dea431d..1500c89f6 100644 --- a/apps/app_cdr.c +++ b/apps/app_cdr.c @@ -249,7 +249,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(appcdr_message_type); @@ -259,7 +259,8 @@ static int load_module(void) appcdr_callback, NULL); if (res) { - return AST_MODULE_LOAD_FAILURE; + unload_module(); + return AST_MODULE_LOAD_DECLINE; } return AST_MODULE_LOAD_SUCCESS; } |