LivestatusQuery#Execute(): take CheckResultProducer::Ptr

This commit is contained in:
Alexander A. Klimov 2025-04-03 11:05:24 +02:00
parent 0f5714fda6
commit 657850c74b
3 changed files with 4 additions and 4 deletions

View File

@ -193,7 +193,7 @@ void LivestatusListener::ClientHandler(const Socket::Ptr& client)
break;
LivestatusQuery::Ptr query = new LivestatusQuery(lines, GetCompatLogPath());
if (!query->Execute(stream))
if (!query->Execute(this, stream))
break;
}

View File

@ -621,7 +621,7 @@ void LivestatusQuery::PrintFixed16(const Stream::Ptr& stream, int code, const St
}
}
bool LivestatusQuery::Execute(const Stream::Ptr& stream)
bool LivestatusQuery::Execute(const CheckResultProducer::Ptr& producer, const Stream::Ptr& stream)
{
try {
Log(LogNotice, "LivestatusQuery")
@ -630,7 +630,7 @@ bool LivestatusQuery::Execute(const Stream::Ptr& stream)
if (m_Verb == "GET")
ExecuteGetHelper(stream);
else if (m_Verb == "COMMAND")
ExecuteCommandHelper(stream);
ExecuteCommandHelper(producer, stream);
else if (m_Verb == "ERROR")
ExecuteErrorHelper(stream);
else

View File

@ -34,7 +34,7 @@ public:
LivestatusQuery(const std::vector<String>& lines, const String& compat_log_path);
bool Execute(const Stream::Ptr& stream);
bool Execute(const CheckResultProducer::Ptr& producer, const Stream::Ptr& stream);
static int GetExternalCommands();