Skip to content

Commit 5b1c4b5

Browse files
committed
TODO
1 parent a8d011f commit 5b1c4b5

17 files changed

+24
-22
lines changed

lib/db_ido/idochecktask.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ static void ReportIdoCheck(
3636
} else {
3737
cr->SetState(state);
3838
cr->SetOutput(output);
39-
checkable->ProcessCheckResult(cr);
39+
checkable->ProcessCheckResult(cr, new TodoCRP());
4040
}
4141
}
4242

lib/icinga/apiactions.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ Dictionary::Ptr ApiActions::ProcessCheckResult(const ConfigObject::Ptr& object,
126126
if (params->Contains("ttl"))
127127
cr->SetTtl(HttpUtility::GetLastParameter(params, "ttl"));
128128

129-
Result result = checkable->ProcessCheckResult(cr);
129+
Result result = checkable->ProcessCheckResult(cr, new TodoCRP());
130130
switch (result) {
131131
case Result::Ok:
132132
return ApiActions::CreateResult(200, "Successfully processed check result for object '" + checkable->GetName() + "'.");

lib/icinga/checkable-check.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ void Checkable::ExecuteCheck()
667667

668668
cr->SetOutput(output);
669669

670-
ProcessCheckResult(cr);
670+
ProcessCheckResult(cr, new TodoCRP());
671671
}
672672

673673
{

lib/icinga/checkable-script.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ static void CheckableProcessCheckResult(const CheckResult::Ptr& cr)
1414
ScriptFrame *vframe = ScriptFrame::GetCurrentFrame();
1515
Checkable::Ptr self = vframe->Self;
1616
REQUIRE_NOT_NULL(self);
17-
self->ProcessCheckResult(cr);
17+
self->ProcessCheckResult(cr, new TodoCRP());
1818
}
1919

2020
Object::Ptr Checkable::GetPrototype()

lib/icinga/checkresult.hpp

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ class UnitTestCRP : public CheckResultProducer
4444
void unlock_shared() noexcept override;
4545
};
4646

47+
typedef UnitTestCRP TodoCRP;
48+
4749
/**
4850
* A check result.
4951
*

lib/icinga/clusterevents.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ Value ClusterEvents::CheckResultAPIHandler(const MessageOrigin::Ptr& origin, con
176176
}
177177

178178
if (!checkable->IsPaused() && Zone::GetLocalZone() == checkable->GetZone() && endpoint == checkable->GetCommandEndpoint())
179-
checkable->ProcessCheckResult(cr);
179+
checkable->ProcessCheckResult(cr, new TodoCRP());
180180
else
181-
checkable->ProcessCheckResult(cr, origin);
181+
checkable->ProcessCheckResult(cr, new TodoCRP(), origin);
182182

183183
return Empty;
184184
}

lib/icinga/externalcommandprocessor.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ void ExternalCommandProcessor::ProcessHostCheckResult(double time, const std::ve
318318
Log(LogNotice, "ExternalCommandProcessor")
319319
<< "Processing passive check result for host '" << arguments[0] << "'";
320320

321-
host->ProcessCheckResult(result);
321+
host->ProcessCheckResult(result, new TodoCRP());
322322
}
323323

324324
void ExternalCommandProcessor::ProcessServiceCheckResult(double time, const std::vector<String>& arguments)
@@ -356,7 +356,7 @@ void ExternalCommandProcessor::ProcessServiceCheckResult(double time, const std:
356356
Log(LogNotice, "ExternalCommandProcessor")
357357
<< "Processing passive check result for service '" << arguments[1] << "'";
358358

359-
service->ProcessCheckResult(result);
359+
service->ProcessCheckResult(result, new TodoCRP());
360360
}
361361

362362
void ExternalCommandProcessor::ScheduleHostCheck(double, const std::vector<String>& arguments)

lib/icingadb/icingadbchecktask.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ static void ReportIcingadbCheck(
3232
} else {
3333
cr->SetState(state);
3434
cr->SetOutput(output);
35-
checkable->ProcessCheckResult(cr);
35+
checkable->ProcessCheckResult(cr, new TodoCRP());
3636
}
3737
}
3838

lib/methods/clusterchecktask.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void ClusterCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckRe
4747
} else {
4848
cr->SetOutput(output);
4949
cr->SetState(ServiceUnknown);
50-
checkable->ProcessCheckResult(cr);
50+
checkable->ProcessCheckResult(cr, new TodoCRP());
5151
}
5252

5353
return;
@@ -92,7 +92,7 @@ void ClusterCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckRe
9292
cr->SetState(state);
9393
cr->SetOutput(output);
9494

95-
checkable->ProcessCheckResult(cr);
95+
checkable->ProcessCheckResult(cr, new TodoCRP());
9696
}
9797
}
9898

lib/methods/clusterzonechecktask.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void ClusterZoneCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const Che
4242
cr->SetCommand(commandName);
4343
cr->SetOutput(output);
4444
cr->SetState(state);
45-
checkable->ProcessCheckResult(cr);
45+
checkable->ProcessCheckResult(cr, new TodoCRP());
4646
}
4747

4848
return;
@@ -97,7 +97,7 @@ void ClusterZoneCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const Che
9797
cr->SetCommand(commandName);
9898
cr->SetOutput(output);
9999
cr->SetState(state);
100-
checkable->ProcessCheckResult(cr);
100+
checkable->ProcessCheckResult(cr, new TodoCRP());
101101
}
102102

103103
return;
@@ -123,7 +123,7 @@ void ClusterZoneCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const Che
123123
cr->SetCommand(commandName);
124124
cr->SetOutput(output);
125125
cr->SetState(state);
126-
checkable->ProcessCheckResult(cr);
126+
checkable->ProcessCheckResult(cr, new TodoCRP());
127127
}
128128
return;
129129
}
@@ -213,6 +213,6 @@ void ClusterZoneCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const Che
213213
new PerfdataValue("sum_bytes_received_per_second", bytesReceivedPerSecond)
214214
}));
215215

216-
checkable->ProcessCheckResult(cr);
216+
checkable->ProcessCheckResult(cr, new TodoCRP());
217217
}
218218
}

lib/methods/dummychecktask.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,6 @@ void DummyCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckResu
7070
cr->SetExecutionEnd(now);
7171
cr->SetCommand(commandName);
7272

73-
checkable->ProcessCheckResult(cr);
73+
checkable->ProcessCheckResult(cr, new TodoCRP());
7474
}
7575
}

lib/methods/icingachecktask.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,6 @@ void IcingaCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckRes
204204
cr->SetOutput(output);
205205
cr->SetCommand(commandName);
206206

207-
checkable->ProcessCheckResult(cr);
207+
checkable->ProcessCheckResult(cr, new TodoCRP());
208208
}
209209
}

lib/methods/ifwapichecktask.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ void IfwApiCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckRes
275275
callback(cr->GetCommand(), pr);
276276
};
277277
} else {
278-
reportResult = [checkable, cr]() { checkable->ProcessCheckResult(cr); };
278+
reportResult = [checkable, cr]() { checkable->ProcessCheckResult(cr, new TodoCRP()); };
279279
}
280280

281281
// Set the default check result state and exit code to unknown for the moment!

lib/methods/nullchecktask.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ void NullCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckResul
4545
}));
4646
cr->SetState(state);
4747

48-
checkable->ProcessCheckResult(cr);
48+
checkable->ProcessCheckResult(cr, new TodoCRP());
4949
}
5050
}

lib/methods/pluginchecktask.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,5 @@ void PluginCheckTask::ProcessFinishedHandler(const Checkable::Ptr& checkable, co
9393
cr->SetExecutionStart(pr.ExecutionStart);
9494
cr->SetExecutionEnd(pr.ExecutionEnd);
9595

96-
checkable->ProcessCheckResult(cr);
96+
checkable->ProcessCheckResult(cr, new TodoCRP());
9797
}

lib/methods/randomchecktask.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@ void RandomCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckRes
6060
cr->SetState(state);
6161
cr->SetCommand(commandName);
6262

63-
checkable->ProcessCheckResult(cr);
63+
checkable->ProcessCheckResult(cr, new TodoCRP());
6464
}
6565
}

lib/methods/sleepchecktask.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@ void SleepCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckResu
6262
cr->SetExecutionEnd(now);
6363
cr->SetCommand(commandName);
6464

65-
checkable->ProcessCheckResult(cr);
65+
checkable->ProcessCheckResult(cr, new TodoCRP());
6666
}
6767
}

0 commit comments

Comments
 (0)