mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-04 08:04:49 +00:00
refactor(usersapace): adapt to changes libs
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
This commit is contained in:
@@ -58,10 +58,8 @@ struct falco_source
|
|||||||
|
|
||||||
inline bool is_field_defined(const std::string& field) const
|
inline bool is_field_defined(const std::string& field) const
|
||||||
{
|
{
|
||||||
auto *chk = filter_factory->new_filtercheck(field.c_str());
|
if (filter_factory->new_filtercheck(field.c_str()) != nullptr)
|
||||||
if (chk)
|
|
||||||
{
|
{
|
||||||
delete(chk);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@@ -439,7 +439,7 @@ bool rule_loader::compiler::compile_condition(
|
|||||||
sinsp_filter_compiler compiler(filter_factory, ast_out.get());
|
sinsp_filter_compiler compiler(filter_factory, ast_out.get());
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
filter_out.reset(compiler.compile());
|
filter_out = std::move(compiler.compile());
|
||||||
}
|
}
|
||||||
catch(const sinsp_exception& e)
|
catch(const sinsp_exception& e)
|
||||||
{
|
{
|
||||||
|
@@ -172,7 +172,7 @@ falco::app::run_result falco::app::actions::init_inspectors(falco::app::state& s
|
|||||||
if (is_input)
|
if (is_input)
|
||||||
{
|
{
|
||||||
auto gen_check = src_info->inspector->new_generic_filtercheck();
|
auto gen_check = src_info->inspector->new_generic_filtercheck();
|
||||||
src_info->filterchecks->add_filter_check(gen_check);
|
src_info->filterchecks->add_filter_check(std::move(gen_check));
|
||||||
}
|
}
|
||||||
used_plugins.insert(plugin->name());
|
used_plugins.insert(plugin->name());
|
||||||
}
|
}
|
||||||
|
@@ -362,7 +362,7 @@ void stats_writer::collector::get_metrics_output_fields_additional(
|
|||||||
|
|
||||||
auto buffer = inspector->get_sinsp_stats_v2_buffer();
|
auto buffer = inspector->get_sinsp_stats_v2_buffer();
|
||||||
auto sinsp_stats_v2 = inspector->get_sinsp_stats_v2();
|
auto sinsp_stats_v2 = inspector->get_sinsp_stats_v2();
|
||||||
sinsp_thread_manager* thread_manager = inspector->m_thread_manager;
|
sinsp_thread_manager* thread_manager = inspector->m_thread_manager.get();
|
||||||
const scap_stats_v2* sinsp_stats_v2_snapshot = libsinsp::stats::get_sinsp_stats_v2(flags, agent_info, thread_manager, sinsp_stats_v2, buffer, &nstats, &rc);
|
const scap_stats_v2* sinsp_stats_v2_snapshot = libsinsp::stats::get_sinsp_stats_v2(flags, agent_info, thread_manager, sinsp_stats_v2, buffer, &nstats, &rc);
|
||||||
|
|
||||||
uint32_t base_stat = 0;
|
uint32_t base_stat = 0;
|
||||||
|
Reference in New Issue
Block a user