MXS-2196: Take Listener into use

This commit is contained in:
Markus Mäkelä
2018-11-30 11:43:33 +02:00
parent 330719c8f9
commit a10b6c2e89
16 changed files with 93 additions and 137 deletions

View File

@ -269,10 +269,10 @@ LocalClient* LocalClient::create(MYSQL_session* session, MySQLProtocol* proto, S
for (const auto& listener : listener_find_by_service(service))
{
if (listener->port > 0)
if (listener->port() > 0)
{
/** Pick the first network listener */
rval = create(session, proto, "127.0.0.1", listener->port);
rval = create(session, proto, "127.0.0.1", listener->port());
break;
}
}

View File

@ -673,7 +673,7 @@ static void check_packet(DCB* dcb, GWBUF* buf, int bytes)
if (bytes == MYSQL_AUTH_PACKET_BASE_SIZE)
{
/** This is an SSL request packet */
mxb_assert(dcb->listener->ssl);
mxb_assert(dcb->listener->ssl());
mxb_assert(buflen == bytes && pktlen >= buflen);
}
else
@ -1436,11 +1436,11 @@ static void gw_process_one_new_client(DCB* client_dcb)
// Move the rest of the initialization process to the owning worker
mxs::RoutingWorker* worker = static_cast<mxs::RoutingWorker*>(client_dcb->poll.owner);
worker->execute([=](){
client_dcb->protocol = mysql_protocol_init(client_dcb, client_dcb->fd);
MXS_ABORT_IF_NULL(client_dcb->protocol);
MySQLSendHandshake(client_dcb);
}, mxs::RoutingWorker::EXECUTE_AUTO);
worker->execute([=]() {
client_dcb->protocol = mysql_protocol_init(client_dcb, client_dcb->fd);
MXS_ABORT_IF_NULL(client_dcb->protocol);
MySQLSendHandshake(client_dcb);
}, mxs::RoutingWorker::EXECUTE_AUTO);
MXS_DEBUG("Added dcb %p for fd %d to epoll set.",
client_dcb,