mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 11:58:40 +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
........
Merged revisions 377883 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377884 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1583,8 +1583,14 @@ static struct ast_cli_entry cli_file[] = {
|
||||
AST_CLI_DEFINE(handle_cli_core_show_file_formats, "Displays file formats")
|
||||
};
|
||||
|
||||
static void file_shutdown(void)
|
||||
{
|
||||
ast_cli_unregister_multiple(cli_file, ARRAY_LEN(cli_file));
|
||||
}
|
||||
|
||||
int ast_file_init(void)
|
||||
{
|
||||
ast_cli_register_multiple(cli_file, ARRAY_LEN(cli_file));
|
||||
ast_register_atexit(file_shutdown);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user