mirror of
https://github.com/falcosecurity/falco.git
synced 2025-08-31 22:28:22 +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
|
||||
{
|
||||
auto *chk = filter_factory->new_filtercheck(field.c_str());
|
||||
if (chk)
|
||||
if (filter_factory->new_filtercheck(field.c_str()) != nullptr)
|
||||
{
|
||||
delete(chk);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@@ -439,7 +439,7 @@ bool rule_loader::compiler::compile_condition(
|
||||
sinsp_filter_compiler compiler(filter_factory, ast_out.get());
|
||||
try
|
||||
{
|
||||
filter_out.reset(compiler.compile());
|
||||
filter_out = std::move(compiler.compile());
|
||||
}
|
||||
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)
|
||||
{
|
||||
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());
|
||||
}
|
||||
|
@@ -362,7 +362,7 @@ void stats_writer::collector::get_metrics_output_fields_additional(
|
||||
|
||||
auto buffer = inspector->get_sinsp_stats_v2_buffer();
|
||||
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);
|
||||
|
||||
uint32_t base_stat = 0;
|
||||
|
Reference in New Issue
Block a user