Skip to content
Snippets Groups Projects
Commit dc2c000f authored by Corey Farrell's avatar Corey Farrell
Browse files

res_crypto: Perform cleanup at shutdown.

This change causes res_crypto to unregister CLI at shutdown while still
preventing the module from being unloaded.

ASTERISK-25673 #close

Change-Id: Ie5d57338dc2752abfc0dd05d0eec86413f2304fc
parent e6f77da6
No related branches found
No related tags found
No related merge requests found
...@@ -652,13 +652,17 @@ static int load_module(void) ...@@ -652,13 +652,17 @@ static int load_module(void)
} else { } else {
crypto_load(-1, -1); crypto_load(-1, -1);
} }
/* This prevents dlclose from ever running, but allows CLI cleanup at shutdown. */
ast_module_shutdown_ref(ast_module_info->self);
return AST_MODULE_LOAD_SUCCESS; return AST_MODULE_LOAD_SUCCESS;
} }
static int unload_module(void) static int unload_module(void)
{ {
/* Can't unload this once we're loaded */ ast_cli_unregister_multiple(cli_crypto, ARRAY_LEN(cli_crypto));
return -1;
return 0;
} }
/* needs usecount semantics defined */ /* needs usecount semantics defined */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment