MXS-2220 server_alloc returns internal type

Also adds default initializers to SERVER fields.
This commit is contained in:
Esa Korhonen
2018-12-11 15:27:52 +02:00
parent 3f81a37e70
commit 6209d737e9
16 changed files with 135 additions and 154 deletions

View File

@ -74,9 +74,8 @@ json_t* SlaveStatus::to_json() const
"slave_io_running",
json_string(slave_io_to_string(slave_io_running).c_str()));
json_object_set_new(result, "slave_sql_running", json_string(slave_sql_running ? "Yes" : "No"));
json_object_set_new(result,
"seconds_behing_master",
seconds_behind_master == MXS_RLAG_UNDEFINED ? json_null() :
json_object_set_new(result, "seconds_behing_master",
seconds_behind_master == SERVER::RLAG_UNDEFINED ? json_null() :
json_integer(seconds_behind_master));
json_object_set_new(result, "master_server_id", json_integer(master_server_id));
json_object_set_new(result, "last_io_or_sql_error", json_string(last_error.c_str()));