MXS-2196: Use Listener in MXS_PROTOCOL::accept

This commit is contained in:
Markus Mäkelä
2018-11-30 18:08:55 +02:00
parent 45827dd433
commit e46104c32a
7 changed files with 27 additions and 21 deletions

View File

@ -58,7 +58,7 @@ static void process_finish(void);
static int thread_init(void);
static void thread_finish(void);
static int gw_MySQLAccept(DCB* listener);
static int gw_MySQLAccept(const SListener& listener);
static int gw_read_client_event(DCB* dcb);
static int gw_write_client_event(DCB* dcb);
static int gw_MySQLWrite_client(DCB* dcb, GWBUF* queue);
@ -1390,11 +1390,11 @@ return_1:
* @return 0 in success, 1 in failure
*
*/
int gw_MySQLAccept(DCB* listener)
int gw_MySQLAccept(const SListener& listener)
{
DCB* client_dcb;
while ((client_dcb = dcb_accept(listener->listener)) != NULL)
while ((client_dcb = dcb_accept(listener)) != NULL)
{
gw_process_one_new_client(client_dcb);
} /**< while client_dcb != NULL */