Commit 2900d17e authored by aligungr's avatar aligungr

CLI improvements

parent e347ef30
......@@ -64,6 +64,8 @@ static uint16_t DiscoverNode(const std::string &node)
entries[file.path()] = app::ProcTableEntry::Decode(content);
}
uint16_t found = 0;
for (auto &e : entries)
{
// If no such process, it means that this ProcTable file is outdated
......@@ -78,12 +80,11 @@ static uint16_t DiscoverNode(const std::string &node)
for (auto &n : e.second.nodes)
{
if (n == node) // TODO: version checking
return e.second.port;
found = e.second.port;
}
}
// No process found for this node name
return 0;
return found;
}
static std::vector<std::string> DumpNames()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment