Move state checks inside the Backend class

The class now has methods to query its internal state.
This commit is contained in:
Markus Mäkelä
2017-04-03 18:51:13 +03:00
parent 0fde5f22df
commit 0d7f987598
4 changed files with 147 additions and 22 deletions

View File

@ -231,7 +231,7 @@ bool connect_backend_servers(BackendList& backends, MXS_SESSION* session)
servers_found += 1;
/** Server is already connected */
if (BREF_IS_IN_USE((*it)))
if ((*it)->in_use())
{
slaves_connected += 1;
}
@ -266,7 +266,7 @@ bool connect_backend_servers(BackendList& backends, MXS_SESSION* session)
{
SERVER_REF* b = (*it)->backend();
if (BREF_IS_IN_USE((*it)))
if ((*it)->in_use())
{
MXS_INFO("Connected %s in \t%s:%d",
STRSRVSTATUS(b->server),