mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Integrate review feedback
This commit is contained in:
parent
7767c3d36c
commit
3f4b340abb
2 changed files with 3 additions and 2 deletions
|
@ -76,6 +76,7 @@ static inline void set_option(const char* option, const T& value)
|
||||||
auto ptr = make_intrusive<VectorVal>(zeek::id::string_vec);
|
auto ptr = make_intrusive<VectorVal>(zeek::id::string_vec);
|
||||||
for ( const auto& str : value )
|
for ( const auto& str : value )
|
||||||
ptr->Append(make_intrusive<StringVal>(str));
|
ptr->Append(make_intrusive<StringVal>(str));
|
||||||
|
id->SetVal(std::move(ptr));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -178,12 +178,12 @@ function Broker::__set_metrics_export_prefixes%(filter: string_vec%): bool
|
||||||
%{
|
%{
|
||||||
zeek::Broker::Manager::ScriptScopeGuard ssg;
|
zeek::Broker::Manager::ScriptScopeGuard ssg;
|
||||||
if ( broker_mgr )
|
if ( broker_mgr )
|
||||||
{
|
{
|
||||||
std::vector<std::string> slist;
|
std::vector<std::string> slist;
|
||||||
auto* vval = filter->AsVectorVal();
|
auto* vval = filter->AsVectorVal();
|
||||||
for ( unsigned index = 0; index < vval->Size(); ++index )
|
for ( unsigned index = 0; index < vval->Size(); ++index )
|
||||||
slist.emplace_back(vval->StringValAt(index)->ToStdString());
|
slist.emplace_back(vval->StringValAt(index)->ToStdString());
|
||||||
broker_mgr->SetMetricsExportPrefixes(std::move(slist));
|
broker_mgr->SetMetricsExportPrefixes(std::move(slist));
|
||||||
}
|
}
|
||||||
return zeek::val_mgr->True();
|
return zeek::val_mgr->True();
|
||||||
%}
|
%}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue