diff --git a/CHANGES b/CHANGES index 2b0d27fc50..1df5362817 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,33 @@ +7.1.0-dev.230 | 2024-08-30 15:38:52 +0200 + + * RunState: Drop broker_mgr->Active() usage (Arne Welzel, Corelight) + + ...and deprecate it. The communication_enabled flag doesn't really + make a difference in how the IO loop works. + + * logging/WriterFrontend: No need for explicit CleanupWriteBuffer() (Arne Welzel, Corelight) + + Any pending records will be cleaned in the destructor of WriterFrontend + and WriteBuffer, no need to do this explicitly. + + * logging: Switch index-assignment of raw pointers to emplace_back() (Arne Welzel, Corelight) + + * broker/logging: Change threading::Value** usage std::vector instead (Arne Welzel, Corelight) + + This allows to leverage automatic memory management, less allocations + and using move semantics for expressing ownership. + + This breaks the existing logging and broker API, but keeps the plugin + DoWrite() and HookLogWrite() methods functioning. + + It further changes ValToLogVal to return a threading::Value rather than + a threading::Value*. The vector_val and set_val fields unfortunately + use the same pointer-to-array-of-pointers approach. this can'tbe changed + as it'd break backwards compatibility for plugin provided input readers + and log writers. + + * threading/Value: Support move and copy constructors (Arne Welzel, Corelight) + 7.1.0-dev.222 | 2024-08-27 13:29:12 +0100 * Fix parsing of version field in SSLv2 client hello (Johanna Amann, Corelight) diff --git a/VERSION b/VERSION index 74017c93a6..9cca9a4177 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -7.1.0-dev.222 +7.1.0-dev.230 diff --git a/src/RunState.cc b/src/RunState.cc index 1585831d08..6add4134aa 100644 --- a/src/RunState.cc +++ b/src/RunState.cc @@ -31,7 +31,6 @@ extern "C" { #include "zeek/Reporter.h" #include "zeek/Scope.h" #include "zeek/Timer.h" -#include "zeek/broker/Manager.h" #include "zeek/iosource/Manager.h" #include "zeek/iosource/PktDumper.h" #include "zeek/iosource/PktSrc.h" @@ -275,8 +274,6 @@ void run_loop() { } #endif current_iosrc = nullptr; - auto communication_enabled = broker_mgr->Active(); - if ( ! ready.empty() ) { for ( const auto& src : ready ) { auto* iosrc = src.src; @@ -289,8 +286,7 @@ void run_loop() { iosrc->Process(); } } - else if ( (have_pending_timers || communication_enabled || BifConst::exit_only_after_terminate) && - ! pseudo_realtime ) { + else if ( (have_pending_timers || BifConst::exit_only_after_terminate) && pseudo_realtime == 0.0 ) { // Take advantage of the lull to get up to // date on timers and events. Because we only // have timers as sources, going to sleep here @@ -330,7 +326,7 @@ void run_loop() { // Terminate if we're running pseudo_realtime and // the interface has been closed. - if ( pseudo_realtime && communication_enabled ) { + if ( pseudo_realtime != 0.0 ) { iosource::PktSrc* ps = iosource_mgr->GetPktSrc(); if ( ps && ! ps->IsOpen() ) iosource_mgr->Terminate(); diff --git a/src/broker/Manager.h b/src/broker/Manager.h index 979d51f20a..412fa764ae 100644 --- a/src/broker/Manager.h +++ b/src/broker/Manager.h @@ -109,7 +109,7 @@ public: /** * Returns true if any Broker communication is currently active. */ - bool Active(); + [[deprecated("Remove with v8.1 - unused")]] bool Active(); /** * Advances time. Broker data store expiration is driven by this