MXS-2196: Always allocate a session

Whenever a client DCB is accepted, a session for it is allocated. This
simplifies the handling of shared data between DCBs by allowing it to be
placed inside the session object. Currently, the data is stashed away in
the client DCB.
This commit is contained in:
Markus Mäkelä
2018-12-03 09:10:57 +02:00
parent 180e150ba1
commit da9816b7e7
9 changed files with 27 additions and 69 deletions

View File

@ -144,10 +144,7 @@ static int cdc_read_event(DCB* dcb)
if (auth_val == CDC_STATE_AUTH_OK)
{
/* start a real session */
session = session_alloc(dcb->service, dcb);
if (session != NULL)
if (session_start(dcb->session))
{
protocol->state = CDC_STATE_HANDLE_REQUEST;