mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-31 01:24:19 +02:00
LivestatusQuery#Execute(): take CheckResultProducer::Ptr
This commit is contained in:
parent
0f5714fda6
commit
657850c74b
@ -193,7 +193,7 @@ void LivestatusListener::ClientHandler(const Socket::Ptr& client)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
LivestatusQuery::Ptr query = new LivestatusQuery(lines, GetCompatLogPath());
|
LivestatusQuery::Ptr query = new LivestatusQuery(lines, GetCompatLogPath());
|
||||||
if (!query->Execute(stream))
|
if (!query->Execute(this, stream))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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 {
|
try {
|
||||||
Log(LogNotice, "LivestatusQuery")
|
Log(LogNotice, "LivestatusQuery")
|
||||||
@ -630,7 +630,7 @@ bool LivestatusQuery::Execute(const Stream::Ptr& stream)
|
|||||||
if (m_Verb == "GET")
|
if (m_Verb == "GET")
|
||||||
ExecuteGetHelper(stream);
|
ExecuteGetHelper(stream);
|
||||||
else if (m_Verb == "COMMAND")
|
else if (m_Verb == "COMMAND")
|
||||||
ExecuteCommandHelper(stream);
|
ExecuteCommandHelper(producer, stream);
|
||||||
else if (m_Verb == "ERROR")
|
else if (m_Verb == "ERROR")
|
||||||
ExecuteErrorHelper(stream);
|
ExecuteErrorHelper(stream);
|
||||||
else
|
else
|
||||||
|
@ -34,7 +34,7 @@ public:
|
|||||||
|
|
||||||
LivestatusQuery(const std::vector<String>& lines, const String& compat_log_path);
|
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();
|
static int GetExternalCommands();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user