[asterisk-commits] rmudgett: branch 11 r377244 - in /branches/11: ./ main/format.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Dec 4 20:19:47 CST 2012


Author: rmudgett
Date: Tue Dec  4 20:19:43 2012
New Revision: 377244

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=377244
Log:
Fix registering core show codecs/codec CLI commands twice.
........

Merged revisions 377241 from http://svn.asterisk.org/svn/asterisk/branches/10

Modified:
    branches/11/   (props changed)
    branches/11/main/format.c

Propchange: branches/11/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.

Modified: branches/11/main/format.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/main/format.c?view=diff&rev=377244&r1=377243&r2=377244
==============================================================================
--- branches/11/main/format.c (original)
+++ branches/11/main/format.c Tue Dec  4 20:19:43 2012
@@ -911,7 +911,6 @@
 };
 int init_framer(void)
 {
-	ast_cli_register_multiple(my_clis, ARRAY_LEN(my_clis));
 	return 0;
 }
 
@@ -1113,6 +1112,7 @@
 /*! \internal \brief Clean up resources on Asterisk shutdown */
 static void format_attr_shutdown(void)
 {
+	ast_cli_unregister_multiple(my_clis, ARRAY_LEN(my_clis));
 	if (interfaces) {
 		ao2_ref(interfaces, -1);
 		interfaces = NULL;
@@ -1121,13 +1121,13 @@
 
 int ast_format_attr_init(void)
 {
-	ast_cli_register_multiple(my_clis, ARRAY_LEN(my_clis));
-
 	interfaces = ao2_container_alloc_options(AO2_ALLOC_OPT_LOCK_RWLOCK,
 		283, interface_hash_cb, interface_cmp_cb);
 	if (!interfaces) {
 		return -1;
 	}
+
+	ast_cli_register_multiple(my_clis, ARRAY_LEN(my_clis));
 	ast_register_atexit(format_attr_shutdown);
 	return 0;
 }




More information about the asterisk-commits mailing list