From f1821b41fdbaf79c33764bd824686f575f8770f0 Mon Sep 17 00:00:00 2001 From: Richard Mudgett Date: Tue, 11 Dec 2012 01:11:05 +0000 Subject: [PATCH] Cleanup frame on exit. * Cleanup CLI commands on exit. (issue ASTERISK-20649) Reported by: Corey Farrell Patches: frame-cleanup-1_8-only.patch (license #5909) patch uploaded by Corey Farrell git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@377712 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/frame.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main/frame.c b/main/frame.c index 1d56904776..eff553dd66 100644 --- a/main/frame.c +++ b/main/frame.c @@ -987,9 +987,15 @@ static struct ast_cli_entry my_clis[] = { AST_CLI_DEFINE(show_codec_n, "Shows a specific codec"), }; +static void framer_shutdown(void) +{ + ast_cli_unregister_multiple(my_clis, ARRAY_LEN(my_clis)); +} + int init_framer(void) { ast_cli_register_multiple(my_clis, ARRAY_LEN(my_clis)); + ast_register_atexit(framer_shutdown); return 0; }