When serializing CDR variables (like for "core show channels") don't output an error if CDRs aren't enabled.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@400442 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp
2013-10-03 19:31:43 +00:00
parent 1f9ac47811
commit 7cfd95ac44

View File

@@ -3002,7 +3002,13 @@ int ast_cdr_serialize_variables(const char *channel_name, struct ast_str **buf,
}
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;
}