MXS-2271 Cleanup internal monitor header and its functions

Some functions still accessed the servers-array. Most functions are now
inside class. Removed unused defines.
This commit is contained in:
Esa Korhonen
2019-03-07 18:51:54 +02:00
parent e7abc53b70
commit ac5ee1278c
11 changed files with 139 additions and 211 deletions

View File

@ -950,7 +950,7 @@ bool mxs::server_set_status(SERVER* srv, int bit, string* errmsg_out)
/* First check if the server is monitored. This isn't done under a lock
* but the race condition cannot cause significant harm. Monitors are never
* freed so the pointer stays valid. */
Monitor* mon = monitor_server_in_use(srv);
Monitor* mon = MonitorManager::server_is_monitored(srv);
if (mon)
{
written = mon->set_server_status(srv, bit, errmsg_out);
@ -969,7 +969,7 @@ bool mxs::server_clear_status(SERVER* srv, int bit, string* errmsg_out)
{
// See server_set_status().
bool written = false;
Monitor* mon = monitor_server_in_use(srv);
Monitor* mon = MonitorManager::server_is_monitored(srv);
if (mon)
{
written = mon->clear_server_status(srv, bit, errmsg_out);