Skip to content

Commit

Permalink
update(userspace/falco): handle the case there haven't been any proce…
Browse files Browse the repository at this point in the history
…ssed event

Signed-off-by: Leonardo Di Donato <[email protected]>
  • Loading branch information
leodido committed Apr 16, 2021
1 parent a33b71b commit 71b2ba0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions userspace/falco/falco.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,11 @@ uint64_t do_inspect(falco_engine *engine,
{
std::string rule = "Falco internal: timeouts notification";
std::string msg = rule + ". " + std::to_string(config.m_syscall_evt_timeout_max_consecutives) + " consecutive timeouts without event.";
std::string last_event_time_str;
sinsp_utils::ts_to_string(duration_start, &last_event_time_str, false, true);
std::string last_event_time_str = "none";
if(duration_start > 0)
{
sinsp_utils::ts_to_string(duration_start, &last_event_time_str, false, true);
}
std::map<std::string, std::string> o = {
{"last_event_time", last_event_time_str},
};
Expand Down

0 comments on commit 71b2ba0

Please sign in to comment.