Skip to content

Commit 0f5714f

Browse files
committed
LivestatusQuery#ExecuteCommandHelper(): take CheckResultProducer::Ptr
1 parent bdd3e38 commit 0f5714f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/livestatus/livestatusquery.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ void LivestatusQuery::ExecuteGetHelper(const Stream::Ptr& stream)
570570
SendResponse(stream, LivestatusErrorOK, result.str());
571571
}
572572

573-
void LivestatusQuery::ExecuteCommandHelper(const Stream::Ptr& stream)
573+
void LivestatusQuery::ExecuteCommandHelper(const CheckResultProducer::Ptr& producer, const Stream::Ptr& stream)
574574
{
575575
{
576576
std::unique_lock<std::mutex> lock(l_QueryMutex);
@@ -580,7 +580,7 @@ void LivestatusQuery::ExecuteCommandHelper(const Stream::Ptr& stream)
580580

581581
Log(LogNotice, "LivestatusQuery")
582582
<< "Executing command: " << m_Command;
583-
ExternalCommandProcessor::Execute(m_Command);
583+
ExternalCommandProcessor::Execute(producer, m_Command);
584584
SendResponse(stream, LivestatusErrorOK, "");
585585
}
586586

lib/livestatus/livestatusquery.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#include "livestatus/filter.hpp"
77
#include "livestatus/aggregator.hpp"
8+
#include "remote/crproducer.hpp"
89
#include "base/object.hpp"
910
#include "base/array.hpp"
1011
#include "base/stream.hpp"
@@ -76,7 +77,7 @@ class LivestatusQuery final : public Object
7677
static String QuoteStringPython(const String& str);
7778

7879
void ExecuteGetHelper(const Stream::Ptr& stream);
79-
void ExecuteCommandHelper(const Stream::Ptr& stream);
80+
void ExecuteCommandHelper(const CheckResultProducer::Ptr& producer, const Stream::Ptr& stream);
8081
void ExecuteErrorHelper(const Stream::Ptr& stream);
8182

8283
void SendResponse(const Stream::Ptr& stream, int code, const String& data);

0 commit comments

Comments
 (0)