MXS-1539: Assign capability bits for all module types

All modules now have an 8-bit range for capability flags. Currently only
the client side authenticator and protocol capability bits are loaded due
to the fact that backend versions of these modules don't relate to a
particular service.
This commit is contained in:
Markus Mäkelä
2018-01-02 13:44:16 +02:00
parent 9689271a34
commit 6036c1cdca
8 changed files with 61 additions and 8 deletions

View File

@ -292,6 +292,12 @@ serviceStartPort(SERVICE *service, SERV_LISTENER *port)
return 0;
}
// Add protocol and authenticator capabilities from the listener
const MXS_MODULE* proto_mod = get_module(port->protocol, MODULE_PROTOCOL);
const MXS_MODULE* auth_mod = get_module(authenticator_name, MODULE_AUTHENTICATOR);
ss_dassert(proto_mod && auth_mod);
service->capabilities |= proto_mod->module_capabilities | auth_mod->module_capabilities;
memcpy(&port->listener->authfunc, authfuncs, sizeof(MXS_AUTHENTICATOR));
/**