[asterisk-commits] jrose: branch 1.8 r401781 - /branches/1.8/main/astobj2.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Oct 24 14:26:49 CDT 2013
Author: jrose
Date: Thu Oct 24 14:26:47 2013
New Revision: 401781
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=401781
Log:
astobj2: Unregister debug CLI commands at exit
(issue ASTERISK-22467)
Reported by: Corey Farrell
Patches:
astobj2-clean-debug-cli-1.8-11.patch uploaded by coreyfarrell (license 5909)
astobj2-clean-debug-cli-12up.patch uploaded by coreyfarrell (license 5909)
Modified:
branches/1.8/main/astobj2.c
Modified: branches/1.8/main/astobj2.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/astobj2.c?view=diff&rev=401781&r1=401780&r2=401781
==============================================================================
--- branches/1.8/main/astobj2.c (original)
+++ branches/1.8/main/astobj2.c Thu Oct 24 14:26:47 2013
@@ -1127,12 +1127,18 @@
AST_CLI_DEFINE(handle_astobj2_stats, "Print astobj2 statistics"),
AST_CLI_DEFINE(handle_astobj2_test, "Test astobj2"),
};
+
+static void astobj2_cleanup(void)
+{
+ ast_cli_unregister_multiple(cli_astobj2, ARRAY_LEN(cli_astobj2));
+}
#endif /* AO2_DEBUG */
int astobj2_init(void)
{
#ifdef AO2_DEBUG
ast_cli_register_multiple(cli_astobj2, ARRAY_LEN(cli_astobj2));
+ ast_register_atexit(astobj2_cleanup);
#endif
return 0;
More information about the asterisk-commits
mailing list