mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Return a warning and fail if creating a store at global scope
This commit is contained in:
parent
33eaa5ccda
commit
6b5d0491aa
3 changed files with 16 additions and 0 deletions
|
@ -1582,6 +1582,13 @@ void Manager::ProcessStoreResponse(detail::StoreHandleVal* s, broker::store::res
|
|||
}
|
||||
|
||||
detail::StoreHandleVal* Manager::MakeMaster(const string& name, broker::backend type, broker::backend_options opts) {
|
||||
if ( ! bstate ) {
|
||||
if ( zeek::detail::current_scope() == zeek::detail::global_scope() )
|
||||
reporter->Error("Broker stores cannot be created at the global scope");
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if ( bstate->endpoint.is_shutdown() )
|
||||
return nullptr;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue