mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 01:49:05 +00:00
use switch_snprintf instead of snprintf becuase in insures null termination of strings.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6707 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -1456,25 +1456,25 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_generate_xml_cdr(switch_core_session_
|
||||
if (!(time_tag = switch_xml_add_child_d(x_times, "created_time", t_off++))) {
|
||||
goto error;
|
||||
}
|
||||
snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->created);
|
||||
switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->created);
|
||||
switch_xml_set_txt_d(time_tag, tmp);
|
||||
|
||||
if (!(time_tag = switch_xml_add_child_d(x_times, "answered_time", t_off++))) {
|
||||
goto error;
|
||||
}
|
||||
snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->answered);
|
||||
switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->answered);
|
||||
switch_xml_set_txt_d(time_tag, tmp);
|
||||
|
||||
if (!(time_tag = switch_xml_add_child_d(x_times, "hangup_time", t_off++))) {
|
||||
goto error;
|
||||
}
|
||||
snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->hungup);
|
||||
switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->hungup);
|
||||
switch_xml_set_txt_d(time_tag, tmp);
|
||||
|
||||
if (!(time_tag = switch_xml_add_child_d(x_times, "transfer_time", t_off++))) {
|
||||
goto error;
|
||||
}
|
||||
snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->transferred);
|
||||
switch_snprintf(tmp, sizeof(tmp), "%" SWITCH_TIME_T_FMT, caller_profile->times->transferred);
|
||||
switch_xml_set_txt_d(time_tag, tmp);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user