Merge branch '2.1' into develop

This commit is contained in:
Markus Mäkelä
2017-03-22 15:20:21 +02:00
107 changed files with 3365 additions and 3638 deletions

View File

@ -1379,3 +1379,22 @@ void server_clear_status(SERVER *server, int bit)
}
spinlock_release(&server->lock);
}
bool server_is_mxs_service(const SERVER *server)
{
bool rval = false;
/** Do a coarse check for local server pointing to a MaxScale service */
if (strcmp(server->name, "127.0.0.1") == 0 ||
strcmp(server->name, "::1") == 0 ||
strcmp(server->name, "localhost") == 0 ||
strcmp(server->name, "localhost.localdomain") == 0)
{
if (service_port_is_used(server->port))
{
rval = true;
}
}
return rval;
}