fix for FSCORE-37

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5565 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2007-08-03 16:56:54 +00:00
parent 2b3b300e4b
commit d3aa5b433b
1 changed files with 4 additions and 2 deletions

View File

@ -809,6 +809,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_fire_detailed(char *file, char *fun
switch_time_exp_t tm;
char date[80] = "";
switch_size_t retsize;
switch_time_t ts = switch_time_now();
assert(BLOCK != NULL);
assert(RUNTIME_POOL != NULL);
@ -825,11 +826,12 @@ SWITCH_DECLARE(switch_status_t) switch_event_fire_detailed(char *file, char *fun
switch_event_add_header(*event, SWITCH_STACK_BOTTOM, "Event-Name", "%s", switch_event_name((*event)->event_id));
switch_event_add_header(*event, SWITCH_STACK_BOTTOM, "Core-UUID", "%s", switch_core_get_uuid());
switch_time_exp_lt(&tm, switch_time_now());
switch_time_exp_lt(&tm, ts);
switch_strftime(date, &retsize, sizeof(date), "%Y-%m-%d %T", &tm);
switch_event_add_header(*event, SWITCH_STACK_BOTTOM, "Event-Date-Local", "%s", date);
switch_rfc822_date(date, switch_time_now());
switch_rfc822_date(date, ts);
switch_event_add_header(*event, SWITCH_STACK_BOTTOM, "Event-Date-GMT", "%s", date);
switch_event_add_header(*event, SWITCH_STACK_BOTTOM, "Event-Date-timestamp", "%"SWITCH_UINT64_T_FMT, (uint64_t)ts);
switch_event_add_header(*event, SWITCH_STACK_BOTTOM, "Event-Calling-File", "%s", switch_cut_path(file));
switch_event_add_header(*event, SWITCH_STACK_BOTTOM, "Event-Calling-Function", "%s", func);
switch_event_add_header(*event, SWITCH_STACK_BOTTOM, "Event-Calling-Line-Number", "%d", line);