Skip to content

Commit 7f50e14

Browse files
lobisccaffy
authored andcommitted
MGM: Fix eos space status json invalid conversion. Closes https://its.cern.ch/jira/browse/EOS-6585.
1 parent fc00de7 commit 7f50e14

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

mgm/proc/IProcCommand.cc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ IProcCommand::ConvertOutputToJsonFormat(const std::string& stdOut)
297297
break;
298298
}
299299

300-
if (!line.length()) {
300+
if (line.empty()) {
301301
continue;
302302
}
303303

@@ -333,8 +333,10 @@ IProcCommand::ConvertOutputToJsonFormat(const std::string& stdOut)
333333
StringConversion::ReplaceMapKey(map, "lru", "lru.status");
334334
StringConversion::ReplaceMapKey(map, "balancer", "balancer.status");
335335
StringConversion::ReplaceMapKey(map, "converter", "converter.status");
336+
StringConversion::ReplaceMapKey(map, "inspector", "inspector.status");
337+
StringConversion::ReplaceMapKey(map, "groupdrainer", "groupdrainer.status");
336338

337-
for (auto& it : map) {
339+
for (const auto& it : map) {
338340
std::vector<std::string> token;
339341
char* conv;
340342
errno = 0;
@@ -346,7 +348,7 @@ IProcCommand::ConvertOutputToJsonFormat(const std::string& stdOut)
346348
continue;
347349
}
348350

349-
if (it.second.length()) {
351+
if (!it.second.empty()) {
350352
value = it.second;
351353
} else {
352354
value = "NULL";

0 commit comments

Comments
 (0)