Skip to content

Commit

Permalink
fix(libsinsp): address review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Scolaro <roberto.scolaro21@gmail.com>
  • Loading branch information
therealbobo authored and poiana committed Aug 7, 2024
1 parent 27669e0 commit ae812ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions userspace/libsinsp/sinsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1661,7 +1661,7 @@ void sinsp::start_dropping_mode(uint32_t sampling_ratio)
}
#endif // _WIN32

void sinsp::set_filter(std::unique_ptr<sinsp_filter> filter, const std::optional<std::string>& filterstring)
void sinsp::set_filter(std::unique_ptr<sinsp_filter> filter, const std::string& filterstring)
{
if(m_filter != NULL)
{
Expand All @@ -1670,7 +1670,7 @@ void sinsp::set_filter(std::unique_ptr<sinsp_filter> filter, const std::optional
}

m_filter = std::move(filter);
m_filterstring = filterstring.value_or("");
m_filterstring = filterstring;
}

void sinsp::set_filter(const std::string& filter)
Expand Down
2 changes: 1 addition & 1 deletion userspace/libsinsp/sinsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ class SINSP_PUBLIC sinsp : public capture_stats_source
\param filter the runtime filter object
*/
void set_filter(std::unique_ptr<sinsp_filter> filter, const std::optional<std::string>& filterstring);
void set_filter(std::unique_ptr<sinsp_filter> filter, const std::string& filterstring = "");

/*!
\brief Return the filter set for this capture.
Expand Down

0 comments on commit ae812ee

Please sign in to comment.