Sort server relationships

As server relationships are unordered, sorting them guarantees a certain
order. This fixes the MaxCtrl cluster diff test failure.

Also formatted monitor.cc sources: the indentation seems to be off.
This commit is contained in:
Markus Mäkelä
2019-05-24 11:02:43 +03:00
parent bed28db3fd
commit 47ebcdcc02
2 changed files with 51 additions and 45 deletions

View File

@ -1801,6 +1801,8 @@ json_t* service_relations_to_server(const SERVER* server, const char* host)
}
}
std::sort(names.begin(), names.end());
json_t* rel = NULL;
if (!names.empty())