Move server_set_status and server_clear_status to monitor

The operation goes through monitor code so should be in the according file.
This commit is contained in:
Esa Korhonen
2019-04-26 15:08:31 +03:00
parent b0d8535ead
commit a3bb61486d
8 changed files with 71 additions and 72 deletions

View File

@ -2525,7 +2525,7 @@ static void set_server(DCB* dcb, Server* server, char* bit)
if ((bitvalue = SERVER::status_from_string(bit)) != 0)
{
std::string errmsg;
if (!mxs::server_set_status(server, bitvalue, &errmsg))
if (!MonitorManager::set_server_status(server, bitvalue, &errmsg))
{
dcb_printf(dcb, "%s\n", errmsg.c_str());
}
@ -2551,7 +2551,7 @@ static void clear_server(DCB* dcb, Server* server, char* bit)
if ((bitvalue = SERVER::status_from_string(bit)) != 0)
{
std::string errmsg;
if (!mxs::server_clear_status(server, bitvalue, &errmsg))
if (!MonitorManager::clear_server_status(server, bitvalue, &errmsg))
{
dcb_printf(dcb, "%s", errmsg.c_str());
}

View File

@ -325,7 +325,7 @@ void exec_set_server(DCB* dcb, MAXINFO_TREE* tree)
if (status != 0)
{
std::string errmsgs;
if (mxs::server_set_status(server, status, &errmsgs))
if (MonitorManager::set_server_status(server, status, &errmsgs))
{
maxinfo_send_ok(dcb);
}
@ -412,7 +412,7 @@ void exec_clear_server(DCB* dcb, MAXINFO_TREE* tree)
if (status != 0)
{
std::string errmsgs;
if (mxs::server_clear_status(server, status, &errmsgs))
if (MonitorManager::clear_server_status(server, status, &errmsgs))
{
maxinfo_send_ok(dcb);
}