mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-26 23:24:09 +02:00
Fix elephant oversight
This commit is contained in:
parent
315e9ffad8
commit
ed3db5b491
@ -31,16 +31,16 @@ Dictionary::Ptr RedisWriter::GetStats()
|
|||||||
Dictionary::Ptr stats = new Dictionary();
|
Dictionary::Ptr stats = new Dictionary();
|
||||||
|
|
||||||
//TODO: Figure out if more stats can be useful here.
|
//TODO: Figure out if more stats can be useful here.
|
||||||
Dictionary::Ptr statsFunctions = ScriptGlobal::Get("StatsFunctions", &Empty);
|
Namespace::Ptr statsFunctions = ScriptGlobal::Get("StatsFunctions", &Empty);
|
||||||
|
|
||||||
if (!statsFunctions)
|
if (!statsFunctions)
|
||||||
Dictionary::Ptr();
|
Dictionary::Ptr();
|
||||||
|
|
||||||
ObjectLock olock(statsFunctions);
|
ObjectLock olock(statsFunctions);
|
||||||
|
|
||||||
for (const Dictionary::Pair& kv : statsFunctions)
|
for (auto& kv : statsFunctions)
|
||||||
{
|
{
|
||||||
Function::Ptr func = kv.second;
|
Function::Ptr func = kv.second->Get();
|
||||||
|
|
||||||
if (!func)
|
if (!func)
|
||||||
BOOST_THROW_EXCEPTION(std::invalid_argument("Invalid status function name."));
|
BOOST_THROW_EXCEPTION(std::invalid_argument("Invalid status function name."));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user