mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-17 23:38:23 +00:00
Cleanup CLI commands on exit for several files.
(issue ASTERISK-20649)
Reported by: Corey Farrell
Patches:
unregister-cli-multiple-all.patch (license #5909) patch uploaded by Corey Farrell
........
Merged revisions 377881 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 377882 from http://svn.asterisk.org/svn/asterisk/branches/10
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -206,8 +206,14 @@ static struct ast_cli_entry cli_image[] = {
|
||||
AST_CLI_DEFINE(handle_core_show_image_formats, "Displays image formats")
|
||||
};
|
||||
|
||||
static void image_shutdown(void)
|
||||
{
|
||||
ast_cli_unregister_multiple(cli_image, ARRAY_LEN(cli_image));
|
||||
}
|
||||
|
||||
int ast_image_init(void)
|
||||
{
|
||||
ast_cli_register_multiple(cli_image, ARRAY_LEN(cli_image));
|
||||
ast_register_atexit(image_shutdown);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user