Commit 92ab9157 authored by Kristof Szabados's avatar Kristof Szabados
Browse files

fix for bug 563289


Signed-off-by: Kristof Szabados's avatarKristof Szabados <Kristof.Szabados@ericsson.com>
parent 594a6bee
...@@ -1235,7 +1235,10 @@ boolean TTCN_Communication::send_log(time_t timestamp_sec, long timestamp_usec, ...@@ -1235,7 +1235,10 @@ boolean TTCN_Communication::send_log(time_t timestamp_sec, long timestamp_usec,
if (is_connected) { if (is_connected) {
Text_Buf text_buf; Text_Buf text_buf;
text_buf.push_int(MSG_LOG); text_buf.push_int(MSG_LOG);
text_buf.push_int(timestamp_sec); int upper_int = timestamp_sec / 0xffffffff;
int lower_int = timestamp_sec % 0xffffffff;
text_buf.push_int(upper_int);
text_buf.push_int(lower_int);
text_buf.push_int(timestamp_usec); text_buf.push_int(timestamp_usec);
text_buf.push_int(event_severity); text_buf.push_int(event_severity);
text_buf.push_int(message_text_len); text_buf.push_int(message_text_len);
......
...@@ -3717,7 +3717,9 @@ void MainController::process_log(unknown_connection *conn) ...@@ -3717,7 +3717,9 @@ void MainController::process_log(unknown_connection *conn)
{ {
Text_Buf& text_buf = *conn->text_buf; Text_Buf& text_buf = *conn->text_buf;
struct timeval tv; struct timeval tv;
tv.tv_sec = text_buf.pull_int().get_val(); int upper_int = text_buf.pull_int().get_val();
int lower_int = text_buf.pull_int().get_val();
tv.tv_sec = upper_int * 0xffffffff + lower_int;
tv.tv_usec = text_buf.pull_int().get_val(); tv.tv_usec = text_buf.pull_int().get_val();
char *source = mprintf("<unknown>@%s", conn->ip_addr->get_host_str()); char *source = mprintf("<unknown>@%s", conn->ip_addr->get_host_str());
int severity = text_buf.pull_int().get_val(); int severity = text_buf.pull_int().get_val();
...@@ -3912,7 +3914,9 @@ void MainController::process_log(host_struct *hc) ...@@ -3912,7 +3914,9 @@ void MainController::process_log(host_struct *hc)
{ {
Text_Buf& text_buf = *hc->text_buf; Text_Buf& text_buf = *hc->text_buf;
struct timeval tv; struct timeval tv;
tv.tv_sec = text_buf.pull_int().get_val(); int upper_int = text_buf.pull_int().get_val();
int lower_int = text_buf.pull_int().get_val();
tv.tv_sec = upper_int * 0xffffffff + lower_int;
tv.tv_usec = text_buf.pull_int().get_val(); tv.tv_usec = text_buf.pull_int().get_val();
int severity = text_buf.pull_int().get_val(); int severity = text_buf.pull_int().get_val();
char *message = text_buf.pull_string(); char *message = text_buf.pull_string();
...@@ -4133,7 +4137,9 @@ void MainController::process_log(component_struct *tc) ...@@ -4133,7 +4137,9 @@ void MainController::process_log(component_struct *tc)
{ {
Text_Buf& text_buf = *tc->text_buf; Text_Buf& text_buf = *tc->text_buf;
struct timeval tv; struct timeval tv;
tv.tv_sec = text_buf.pull_int().get_val(); int upper_int = text_buf.pull_int().get_val();
int lower_int = text_buf.pull_int().get_val();
tv.tv_sec = upper_int * 0xffffffff + lower_int;
tv.tv_usec = text_buf.pull_int().get_val(); tv.tv_usec = text_buf.pull_int().get_val();
int severity = text_buf.pull_int().get_val(); int severity = text_buf.pull_int().get_val();
char *message = text_buf.pull_string(); char *message = text_buf.pull_string();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment