mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
cluster/Backend: Do not use const std::string_view&
This commit is contained in:
parent
6d1259423e
commit
9b2fff9640
2 changed files with 4 additions and 5 deletions
|
@ -96,7 +96,7 @@ bool Backend::DoPublishLogWrites(const zeek::logging::detail::LogWriteHeader& he
|
||||||
return DoPublishLogWrites(header, log_serializer->Name(), buf);
|
return DoPublishLogWrites(header, log_serializer->Name(), buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Backend::ProcessEventMessage(const std::string_view& topic, const std::string_view& format,
|
bool Backend::ProcessEventMessage(std::string_view topic, std::string_view format,
|
||||||
const detail::byte_buffer_span payload) {
|
const detail::byte_buffer_span payload) {
|
||||||
if ( format != event_serializer->Name() ) {
|
if ( format != event_serializer->Name() ) {
|
||||||
zeek::reporter->Error("ProcessEventMessage: Wrong format: %s vs %s", std::string{format}.c_str(),
|
zeek::reporter->Error("ProcessEventMessage: Wrong format: %s vs %s", std::string{format}.c_str(),
|
||||||
|
@ -120,7 +120,7 @@ bool Backend::ProcessEventMessage(const std::string_view& topic, const std::stri
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Backend::ProcessLogMessage(const std::string_view& format, detail::byte_buffer_span payload) {
|
bool Backend::ProcessLogMessage(std::string_view format, detail::byte_buffer_span payload) {
|
||||||
// We could also dynamically lookup the right de-serializer, but
|
// We could also dynamically lookup the right de-serializer, but
|
||||||
// for now assume we just receive what is configured.
|
// for now assume we just receive what is configured.
|
||||||
if ( format != log_serializer->Name() ) {
|
if ( format != log_serializer->Name() ) {
|
||||||
|
|
|
@ -150,13 +150,12 @@ protected:
|
||||||
/**
|
/**
|
||||||
* Process an incoming event message.
|
* Process an incoming event message.
|
||||||
*/
|
*/
|
||||||
bool ProcessEventMessage(const std::string_view& topic, const std::string_view& format,
|
bool ProcessEventMessage(std::string_view topic, std::string_view format, detail::byte_buffer_span payload);
|
||||||
detail::byte_buffer_span payload);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process an incoming log message.
|
* Process an incoming log message.
|
||||||
*/
|
*/
|
||||||
bool ProcessLogMessage(const std::string_view& format, detail::byte_buffer_span payload);
|
bool ProcessLogMessage(std::string_view format, detail::byte_buffer_span payload);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue