[asterisk-commits] juggie: branch group/NoLossCDR-Redux2 r105408 - /team/group/NoLossCDR-Redux2/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Feb 29 14:08:01 CST 2008


Author: juggie
Date: Fri Feb 29 14:08:00 2008
New Revision: 105408

URL: http://svn.digium.com/view/asterisk?view=rev&rev=105408
Log:
this way is cleaner

Modified:
    team/group/NoLossCDR-Redux2/main/cdr.c

Modified: team/group/NoLossCDR-Redux2/main/cdr.c
URL: http://svn.digium.com/view/asterisk/team/group/NoLossCDR-Redux2/main/cdr.c?view=diff&rev=105408&r1=105407&r2=105408
==============================================================================
--- team/group/NoLossCDR-Redux2/main/cdr.c (original)
+++ team/group/NoLossCDR-Redux2/main/cdr.c Fri Feb 29 14:08:00 2008
@@ -1248,7 +1248,6 @@
 
 static int do_reload(int reload)
 {
-	static int firstload = 1;
 	struct ast_config *config;
 	const char *enabled_value;
 	const char *safeshutdown_value;
@@ -1317,21 +1316,15 @@
 		ast_register_atexit(ast_cdr_engine_term);
 	}
 
-	/* not sure if this is the best way to do this */
-	if (firstload)
-		ast_cli_register(&cli_status);	  
-
-
 	ast_config_destroy(config);
 	manager_event(EVENT_FLAG_SYSTEM, "Reload", "Module: CDR\r\nMessage: CDR subsystem reload requested\r\n");
 
-	firstload = 0;
-
 	return res;
 }
 
 int ast_cdr_engine_init(void)
 {
+	ast_cli_register(&cli_status);
 	return do_reload(0);
 }
 




More information about the asterisk-commits mailing list