[svn-commits] jrose: trunk r401785 - in /trunk: ./ main/astobj2.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Oct 24 14:31:24 CDT 2013


Author: jrose
Date: Thu Oct 24 14:31:23 2013
New Revision: 401785

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=401785
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)
........

Merged revisions 401781 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 401783 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 401784 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    trunk/   (props changed)
    trunk/main/astobj2.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: trunk/main/astobj2.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/astobj2.c?view=diff&rev=401785&r1=401784&r2=401785
==============================================================================
--- trunk/main/astobj2.c (original)
+++ trunk/main/astobj2.c Thu Oct 24 14:31:23 2013
@@ -5576,11 +5576,14 @@
 };
 #endif	/* defined(AO2_DEBUG) || defined(AST_DEVMODE) */
 
+#if defined(AO2_DEBUG) || defined(AST_DEVMODE)
+static void astobj2_cleanup(void)
+{
 #if defined(AST_DEVMODE)
-static void astobj2_cleanup(void)
-{
 	ao2_t_ref(reg_containers, -1, "Releasing container registration container");
 	reg_containers = NULL;
+#endif
+	ast_cli_unregister_multiple(cli_astobj2, ARRAY_LEN(cli_astobj2));
 }
 #endif
 
@@ -5593,10 +5596,10 @@
 	if (!reg_containers) {
 		return -1;
 	}
-	ast_register_atexit(astobj2_cleanup);
 #endif	/* defined(AST_DEVMODE) */
 #if defined(AO2_DEBUG) || defined(AST_DEVMODE)
 	ast_cli_register_multiple(cli_astobj2, ARRAY_LEN(cli_astobj2));
+	ast_register_atexit(astobj2_cleanup);
 #endif	/* defined(AO2_DEBUG) || defined(AST_DEVMODE) */
 
 	return 0;




More information about the svn-commits mailing list