MXS-1220: Add missing JSON fields to servers
Added missing `monitoruser` and `monitorpw` parameters to the JSON output of a server.
This commit is contained in:
parent
c1a1f18d1a
commit
a3ae9d5401
@ -1404,6 +1404,16 @@ json_t* server_to_json(const SERVER* server, const char* host)
|
||||
json_object_set_new(params, CN_PORT, json_integer(server->port));
|
||||
json_object_set_new(params, CN_PROTOCOL, json_string(server->protocol));
|
||||
|
||||
if (*server->monuser)
|
||||
{
|
||||
json_object_set_new(params, CN_MONITORUSER, json_string(server->monuser));
|
||||
}
|
||||
|
||||
if (*server->monpw)
|
||||
{
|
||||
json_object_set_new(params, CN_MONITORPW, json_string(server->monpw));
|
||||
}
|
||||
|
||||
for (SERVER_PARAM* p = server->parameters; p; p = p->next)
|
||||
{
|
||||
json_object_set_new(params, p->name, json_string(p->value));
|
||||
|
Loading…
x
Reference in New Issue
Block a user