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

........

Merged revisions 400442 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400443 65c4cc65-6c06-0410-ace0-fbb531ad65f3
changes/97/197/1
Joshua Colp 12 years ago
parent fe4cd68444
commit 9826923805

@ -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;
}

Loading…
Cancel
Save