Skip to content
Snippets Groups Projects
Commit 84d3434a authored by Friendly Automation's avatar Friendly Automation Committed by Gerrit Code Review
Browse files

Merge "cdr_mysql: Don't clean up on unload unless we can unregister from CDRs"

parents 728a0ebb 51850a79
No related branches found
No related tags found
No related merge requests found
......@@ -382,6 +382,13 @@ static int my_unload_module(int reload)
{
struct column *entry;
if (!reload) {
if (ast_cdr_unregister(name)) {
/* If we can't unregister the backend, we can't unload the module */
return -1;
}
}
ast_cli_unregister_multiple(cdr_mysql_status_cli, sizeof(cdr_mysql_status_cli) / sizeof(struct ast_cli_entry));
if (connected) {
......@@ -406,7 +413,8 @@ static int my_unload_module(int reload)
if (reload) {
return ast_cdr_backend_suspend(name);
} else {
return ast_cdr_unregister(name);
/* We unregistered earlier */
return 0;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment