Change session registry to a template class

The template class wraps a HashMap such that only a few operations
are allowed. Usage requires specializing a RegistryTraits class
template for each entry type.
This commit is contained in:
Esa Korhonen
2017-05-16 13:24:00 +03:00
parent 322983a5f4
commit dbfd631fed
7 changed files with 148 additions and 63 deletions

View File

@ -109,7 +109,7 @@ public:
void execute(maxscale::Worker& worker)
{
MXS_SESSION* target = worker.find_session(m_target_id);
MXS_SESSION* target = worker.session_registry().lookup(m_target_id);
if (target && issuer_can_kill_target(m_issuer_user, m_issuer_host, target))
{
poll_fake_hangup_event(target->client_dcb);