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

@ -186,7 +186,7 @@ static void exec_show_modules(DCB* dcb, MAXINFO_TREE* tree)
*/
static void exec_show_monitors(DCB* dcb, MAXINFO_TREE* tree)
{
monitor_get_list()->write(dcb);
MonitorManager::monitor_get_list()->write(dcb);
}
/**
@ -503,10 +503,10 @@ void exec_shutdown_monitor(DCB* dcb, MAXINFO_TREE* tree)
char errmsg[120];
if (tree && tree->value)
{
Monitor* monitor = monitor_find(tree->value);
Monitor* monitor = MonitorManager::find_monitor(tree->value);
if (monitor)
{
MonitorManager::monitor_stop(monitor);
MonitorManager::stop_monitor(monitor);
maxinfo_send_ok(dcb);
}
else
@ -612,10 +612,10 @@ void exec_restart_monitor(DCB* dcb, MAXINFO_TREE* tree)
char errmsg[120];
if (tree && tree->value)
{
Monitor* monitor = monitor_find(tree->value);
Monitor* monitor = MonitorManager::find_monitor(tree->value);
if (monitor)
{
MonitorManager::monitor_start(monitor);
MonitorManager::start_monitor(monitor);
maxinfo_send_ok(dcb);
}
else