Merge in SNORT/snort3 from ~OSHUMEIK/snort3:extr_flush to master
Squashed commit of the following:
commit
f454e0e1f24ebffafc4a62b00d906c7bc4511f98
Author: Oleksii Shumeiko <oshumeik@cisco.com>
Date: Tue Sep 24 11:58:19 2024 +0300
extractor: flush data on unlocking a writer
TextLog_Print(extr_std_log, STDu64, n);
}
+void StdExtractorWriter::lock()
+{
+ write_mutex.lock();
+}
+
+void StdExtractorWriter::unlock()
+{
+ TextLog_Flush(extr_std_log); // FIXIT-L: should be a part of API and have a well-defined point in the pipeline
+ write_mutex.unlock();
+}
+
#ifdef UNIT_TEST
#include "catch/snort_catch.h"
void write(const char* ss) override;
void write(const char* ss, size_t len) override;
void write(uint64_t n) override;
-
- void lock() override
- { write_mutex.lock(); }
-
- void unlock() override
- { write_mutex.unlock(); }
+ void lock() override;
+ void unlock() override;
private:
std::mutex write_mutex;