mod_xml_cdr: use switch_true instead of atoi

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14342 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Mathieu Rene 2009-07-24 14:03:42 +00:00
parent 39dab176b2
commit e8e06f0ca6

View File

@ -499,7 +499,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_xml_cdr_load)
} else if (!strcasecmp(var, "retries") && !switch_strlen_zero(val)) { } else if (!strcasecmp(var, "retries") && !switch_strlen_zero(val)) {
globals.retries = (uint32_t) atoi(val); globals.retries = (uint32_t) atoi(val);
} else if (!strcasecmp(var, "rotate") && !switch_strlen_zero(val)) { } else if (!strcasecmp(var, "rotate") && !switch_strlen_zero(val)) {
globals.rotate = atoi(val); globals.rotate = switch_true(val);
} else if (!strcasecmp(var, "log-dir")) { } else if (!strcasecmp(var, "log-dir")) {
if (switch_strlen_zero(val)) { if (switch_strlen_zero(val)) {
globals.base_log_dir = switch_mprintf("%s%sxml_cdr", SWITCH_GLOBAL_dirs.log_dir, SWITCH_PATH_SEPARATOR); globals.base_log_dir = switch_mprintf("%s%sxml_cdr", SWITCH_GLOBAL_dirs.log_dir, SWITCH_PATH_SEPARATOR);