Skip to content

Commit

Permalink
chore(userspace/falco): make source matching error more expressive
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
  • Loading branch information
jasondellaluce authored and poiana committed Jun 21, 2023
1 parent 2b90822 commit 7c38706
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions userspace/falco/app/actions/process_events.cpp
Expand Up @@ -265,10 +265,13 @@ static falco::app::run_result do_inspect(
if (source_engine_idx == sinsp_no_event_source_idx)
{
std::string msg = "Unknown event source for inspector's event";
if (ev->get_type() == PPME_PLUGINEVENT_E)
if (ev->get_type() == PPME_PLUGINEVENT_E || ev->get_type() == PPME_ASYNCEVENT_E)
{
auto pluginID = *(int32_t *)ev->get_param(0)->m_val;
msg += " (plugin ID: " + std::to_string(pluginID) + ")";
auto pluginID = *(uint32_t *)ev->get_param(0)->m_val;
if (pluginID != 0)
{
msg += " (plugin ID: " + std::to_string(pluginID) + ")";
}
}
return run_result::fatal(msg);
}
Expand Down

0 comments on commit 7c38706

Please sign in to comment.