mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 19:18:19 +00:00
cluster/serializer/broker: Fix handler lookup
Handler overwrites operator bool, so need to explicitly test for nullptr rather than not having any handlers defined.
This commit is contained in:
parent
24ee115bbc
commit
6d1259423e
6 changed files with 76 additions and 1 deletions
|
@ -76,7 +76,7 @@ std::optional<detail::Event> to_zeek_event(const broker::zeek::Event& ev) {
|
|||
|
||||
zeek::Args vl;
|
||||
zeek::EventHandlerPtr handler = zeek::event_registry->Lookup(name);
|
||||
if ( ! handler ) {
|
||||
if ( handler == nullptr ) {
|
||||
zeek::reporter->Error("Failed to lookup handler for '%s'", std::string(name).c_str());
|
||||
return std::nullopt;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue