[asterisk-commits] file: branch 12 r400442 - /branches/12/main/cdr.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Oct 3 14:31:45 CDT 2013


Author: file
Date: Thu Oct  3 14:31:43 2013
New Revision: 400442

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=400442
Log:
When serializing CDR variables (like for "core show channels") don't output an error if CDRs aren't enabled.

Modified:
    branches/12/main/cdr.c

Modified: branches/12/main/cdr.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/main/cdr.c?view=diff&rev=400442&r1=400441&r2=400442
==============================================================================
--- branches/12/main/cdr.c (original)
+++ branches/12/main/cdr.c Thu Oct  3 14:31:43 2013
@@ -3002,7 +3002,13 @@
 	}
 
 	if (!cdr) {
-		ast_log(AST_LOG_ERROR, "Unable to find CDR for channel %s\n", channel_name);
+		RAII_VAR(struct module_config *, mod_cfg,
+			 ao2_global_obj_ref(module_configs), ao2_cleanup);
+
+		if (ast_test_flag(&mod_cfg->general->settings, CDR_ENABLED)) {
+			ast_log(AST_LOG_ERROR, "Unable to find CDR for channel %s\n", channel_name);
+		}
+
 		return 0;
 	}
 




More information about the asterisk-commits mailing list