MXS-2196: Remove listeners from services

All access to the listeners of a service are done via the listener
functions.
This commit is contained in:
Markus Mäkelä
2018-11-29 16:02:33 +02:00
parent 1c7d5f07c3
commit bb295b5cbe
10 changed files with 67 additions and 169 deletions

View File

@ -1131,11 +1131,6 @@ static MXS_ROUTER* createInstance(SERVICE* service, MXS_CONFIG_PARAMETER* params
*/
static void free_instance(ROUTER_INSTANCE* instance)
{
for (SERV_LISTENER* port = instance->service->ports; port; port = port->next)
{
users_free(port->users);
}
MXS_FREE(instance->uuid);
MXS_FREE(instance->user);
MXS_FREE(instance->password);

View File

@ -689,10 +689,6 @@ static GWBUF* blr_make_registration(ROUTER_INSTANCE* router)
// Set empty password
*data++ = 0; // Slave password length
// Add port
if (router->service->ports)
{
port = router->service->ports->port;
}
encode_value(&data[0], port, 16); // Slave master port, 2 bytes
encode_value(&data[2], 0, 32); // Replication rank, 4 bytes
encode_value(&data[6], router->masterid, 32); // Master server-id, 4 bytes