diff --git a/CHANGES b/CHANGES index 016f58634c..2e1a09e78b 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,12 @@ +2.2-338 | 2014-04-17 17:48:17 -0500 + + * Disable input/logging threads setting their names on every + heartbeat. (Jon Siwek) + + * Fix bug when clearing Bloom filter contents. Reported by + @colonelxc. (Matthias Vallentin) + 2.2-335 | 2014-04-10 15:04:57 -0700 * Small logic fix for main SSL script. (Bernhard Amann) diff --git a/VERSION b/VERSION index 52b0b56f1a..5a0e87dbb5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.2-335 +2.2-338 diff --git a/src/input/ReaderBackend.cc b/src/input/ReaderBackend.cc index abf369dd54..4c7540609c 100644 --- a/src/input/ReaderBackend.cc +++ b/src/input/ReaderBackend.cc @@ -215,6 +215,8 @@ bool ReaderBackend::Init(const int arg_num_fields, if ( Failed() ) return true; + SetOSName(Fmt("bro: %s", Name())); + num_fields = arg_num_fields; fields = arg_fields; diff --git a/src/logging/WriterBackend.cc b/src/logging/WriterBackend.cc index 5e4230c8e3..35d3137c76 100644 --- a/src/logging/WriterBackend.cc +++ b/src/logging/WriterBackend.cc @@ -180,6 +180,7 @@ void WriterBackend::DisableFrontend() bool WriterBackend::Init(int arg_num_fields, const Field* const* arg_fields) { + SetOSName(Fmt("bro: %s", Name())); num_fields = arg_num_fields; fields = arg_fields; diff --git a/src/probabilistic/BloomFilter.cc b/src/probabilistic/BloomFilter.cc index f6e4017626..ef671268b9 100644 --- a/src/probabilistic/BloomFilter.cc +++ b/src/probabilistic/BloomFilter.cc @@ -72,7 +72,7 @@ bool BasicBloomFilter::Empty() const void BasicBloomFilter::Clear() { - bits->Clear(); + bits->Reset(); } bool BasicBloomFilter::Merge(const BloomFilter* other) @@ -190,7 +190,7 @@ bool CountingBloomFilter::Empty() const void CountingBloomFilter::Clear() { - cells->Clear(); + cells->Reset(); } bool CountingBloomFilter::Merge(const BloomFilter* other) diff --git a/src/probabilistic/CounterVector.cc b/src/probabilistic/CounterVector.cc index 317a28d851..8608015422 100644 --- a/src/probabilistic/CounterVector.cc +++ b/src/probabilistic/CounterVector.cc @@ -75,9 +75,9 @@ bool CounterVector::AllZero() const return bits->AllZero(); } -void CounterVector::Clear() +void CounterVector::Reset() { - bits->Clear(); + bits->Reset(); } CounterVector::count_type CounterVector::Count(size_type cell) const diff --git a/src/probabilistic/CounterVector.h b/src/probabilistic/CounterVector.h index d3efd1aa31..247a646eb1 100644 --- a/src/probabilistic/CounterVector.h +++ b/src/probabilistic/CounterVector.h @@ -86,7 +86,7 @@ public: /** * Sets all counters to 0. */ - void Clear(); + void Reset(); /** * Retrieves the number of cells in the storage. diff --git a/src/threading/MsgThread.cc b/src/threading/MsgThread.cc index c713f65986..c603f20625 100644 --- a/src/threading/MsgThread.cc +++ b/src/threading/MsgThread.cc @@ -53,7 +53,6 @@ public: { network_time = arg_network_time; current_time = arg_current_time; } virtual bool Process() { - Object()->HeartbeatInChild(); return Object()->OnHeartbeat(network_time, current_time); } @@ -254,15 +253,6 @@ void MsgThread::Heartbeat() SendIn(new HeartbeatMessage(this, network_time, current_time())); } -void MsgThread::HeartbeatInChild() - { - string n = Fmt("bro: %s (%" PRIu64 "/%" PRIu64 ")", Name(), - cnt_sent_in - queue_in.Size(), - cnt_sent_out - queue_out.Size()); - - SetOSName(n.c_str()); - } - void MsgThread::Finished() { child_finished = true; diff --git a/src/threading/MsgThread.h b/src/threading/MsgThread.h index c5ba5b676f..8b63d91c60 100644 --- a/src/threading/MsgThread.h +++ b/src/threading/MsgThread.h @@ -197,10 +197,6 @@ protected: */ virtual void Heartbeat(); - /** Internal heartbeat processing. Called from child. - */ - void HeartbeatInChild(); - /** Returns true if a child command has reported a failure. In that case, we'll * be in the process of killing this thread and no further activity * should carried out. To be called only from this child thread.