MCPcopy Create free account
hub / github.com/Icinga/icinga2 / CustomVariablesAccessor

Method CustomVariablesAccessor

lib/livestatus/commandstable.cpp:121–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121Value CommandsTable::CustomVariablesAccessor(const Value& row)
122{
123 Command::Ptr command = static_cast<Command::Ptr>(row);
124
125 if (!command)
126 return Empty;
127
128 Dictionary::Ptr vars = command->GetVars();
129
130 ArrayData result;
131
132 if (vars) {
133 ObjectLock xlock(vars);
134 for (const auto& kv : vars) {
135 result.push_back(new Array({
136 kv.first,
137 kv.second
138 }));
139 }
140 }
141
142 return new Array(std::move(result));
143}

Callers

nothing calls this directly

Calls 1

push_backMethod · 0.80

Tested by

no test coverage detected