MXS-2196: Store listener reference in DCB
By storing the reference in the DCB, the two-way dependency between the listeners and services is severed. Now the services have no direct link to listeners and after the destruction of a listener it will be freed once all connections through it have closed. Due to the fact that a listener itself has a DCB that must point to a valid listener, a self-reference is stored in the listener DCB. This is extremely confusing and is only here to keep the code functional until the DCB part of the listener can be factored out.
This commit is contained in:
@ -263,7 +263,7 @@ static int cdc_auth_authenticate(DCB* dcb)
|
||||
cdc_auth_check(dcb, protocol, client_data->user, client_data->auth_data, client_data->flags);
|
||||
|
||||
/* On failed authentication try to reload users and authenticate again */
|
||||
if (CDC_STATE_AUTH_OK != auth_ret && cdc_replace_users(dcb->listener) == MXS_AUTH_LOADUSERS_OK)
|
||||
if (CDC_STATE_AUTH_OK != auth_ret && cdc_replace_users(dcb->listener.get()) == MXS_AUTH_LOADUSERS_OK)
|
||||
{
|
||||
auth_ret = cdc_auth_check(dcb,
|
||||
protocol,
|
||||
|
Reference in New Issue
Block a user