MXS-2196: Allocate a session before allocating DCBs
Allocating the session before a DCB guarantees that at no point will a DCB have a null session. This further clarifies the concept of the session and also allows the listener reference to be moved there. Ideally, the session itself would allocate and assign the client DCB but since the Listener is the only one who does it, it's acceptable for now.
This commit is contained in:
@ -491,7 +491,7 @@ int gssapi_auth_authenticate(DCB* dcb)
|
||||
{
|
||||
int rval = MXS_AUTH_FAILED;
|
||||
gssapi_auth_t* auth = (gssapi_auth_t*)dcb->authenticator_data;
|
||||
GSSAPI_INSTANCE* instance = (GSSAPI_INSTANCE*)dcb->listener->auth_instance();
|
||||
GSSAPI_INSTANCE* instance = (GSSAPI_INSTANCE*)dcb->session->listener->auth_instance();
|
||||
|
||||
if (auth->state == GSSAPI_AUTH_INIT)
|
||||
{
|
||||
|
Reference in New Issue
Block a user