MXS-2196: Pass client DCB to MXS_PROTOCOL::accept

By doing the actual accepting of the new DCB in the core, the protocol
modules can only do the actual protocol level work. This removes some of
the redundant code that was in the protocol modules.
This commit is contained in:
Markus Mäkelä
2018-12-01 20:31:48 +02:00
parent 192562d930
commit 3791fdded7
7 changed files with 122 additions and 156 deletions

View File

@ -2999,8 +2999,12 @@ static uint32_t dcb_process_poll_events(DCB* dcb, uint32_t events)
if (dcb_session_check(dcb, "accept"))
{
DCB_EH_NOTICE("Calling dcb->func.accept(%p)", dcb);
dcb->func.accept(dcb->listener);
DCB* client_dcb;
while ((client_dcb = dcb_accept(dcb->listener)))
{
dcb->func.accept(client_dcb);
}
}
}
else