[Freeswitch-svn] [commit] r5565 - freeswitch/trunk/src

Freeswitch SVN mikej at freeswitch.org
Fri Aug 3 12:56:54 EDT 2007


Author: mikej
Date: Fri Aug  3 12:56:54 2007
New Revision: 5565

Modified:
   freeswitch/trunk/src/switch_event.c

Log:
fix for FSCORE-37

Modified: freeswitch/trunk/src/switch_event.c
==============================================================================
--- freeswitch/trunk/src/switch_event.c	(original)
+++ freeswitch/trunk/src/switch_event.c	Fri Aug  3 12:56:54 2007
@@ -809,6 +809,7 @@
 	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_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);



More information about the Freeswitch-svn mailing list