[asterisk-commits] russell: branch 1.6.0 r202259 - in /branches/1.6.0: ./ cdr/cdr_manager.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Jun 21 11:03:00 CDT 2009


Author: russell
Date: Sun Jun 21 11:02:50 2009
New Revision: 202259

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=202259
Log:
Merged revisions 202258 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r202258 | russell | 2009-06-21 11:00:23 -0500 (Sun, 21 Jun 2009) | 2 lines
  
  Standardize return values of load_config() so reload() doesn't report an error on success.
........

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/cdr/cdr_manager.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/cdr/cdr_manager.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.0/cdr/cdr_manager.c?view=diff&rev=202259&r1=202258&r2=202259
==============================================================================
--- branches/1.6.0/cdr/cdr_manager.c (original)
+++ branches/1.6.0/cdr/cdr_manager.c Sun Jun 21 11:02:50 2009
@@ -59,8 +59,9 @@
 	int newenablecdr = 0;
 
 	cfg = ast_config_load(CONF_FILE, config_flags);
-	if (cfg == CONFIG_STATUS_FILEUNCHANGED)
+	if (cfg == CONFIG_STATUS_FILEUNCHANGED) {
 		return 0;
+	}
 
 	if (reload && customfields) {
 		ast_free(customfields);
@@ -73,7 +74,7 @@
 		if (enablecdr)
 			ast_cdr_unregister(name);
 		enablecdr = 0;
-		return 0;
+		return -1;
 	}
 	
 	while ( (cat = ast_category_browse(cfg, cat)) ) {
@@ -112,7 +113,7 @@
 		ast_cdr_register(name, "Asterisk Manager Interface CDR Backend", manager_log);
 	enablecdr = newenablecdr;
 
-	return 1;
+	return 0;
 }
 
 static int manager_log(struct ast_cdr *cdr)
@@ -185,9 +186,9 @@
 
 static int load_module(void)
 {
-	/* Configuration file */
-	if (!load_config(0))
+	if (load_config(0)) {
 		return AST_MODULE_LOAD_DECLINE;
+	}
 
 	return AST_MODULE_LOAD_SUCCESS;
 }




More information about the asterisk-commits mailing list