From 28ecba4022ba2a07700125da05be60f369000732 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Fri, 21 Oct 2016 21:24:53 +0300 Subject: [PATCH] Use service capabilities Now the capabilities of routers and filters alike will be honoured. --- server/modules/protocol/MySQL/MySQLBackend/mysql_backend.c | 2 +- server/modules/protocol/MySQL/MySQLClient/mysql_client.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/modules/protocol/MySQL/MySQLBackend/mysql_backend.c b/server/modules/protocol/MySQL/MySQLBackend/mysql_backend.c index 5cdf7e7eb..17f52cb37 100644 --- a/server/modules/protocol/MySQL/MySQLBackend/mysql_backend.c +++ b/server/modules/protocol/MySQL/MySQLBackend/mysql_backend.c @@ -794,7 +794,7 @@ gw_read_and_write(DCB *dcb) dcb->session->client_dcb != NULL && dcb->session->client_dcb->state == DCB_STATE_POLLING && (session->router_session || - session->service->router->getCapabilities() & (int)RCAP_TYPE_NO_RSESSION)) + service_get_capabilities(session->service) & RCAP_TYPE_NO_RSESSION)) { MySQLProtocol *client_protocol = (MySQLProtocol *)dcb->session->client_dcb->protocol; if (client_protocol != NULL) diff --git a/server/modules/protocol/MySQL/MySQLClient/mysql_client.c b/server/modules/protocol/MySQL/MySQLClient/mysql_client.c index 21591c91c..bad382043 100644 --- a/server/modules/protocol/MySQL/MySQLClient/mysql_client.c +++ b/server/modules/protocol/MySQL/MySQLClient/mysql_client.c @@ -837,8 +837,8 @@ gw_read_normal_data(DCB *dcb, GWBUF *read_buffer, int nbytes_read) return 1; } - /** Ask what type of input the router expects */ - capabilities = session->service->router->getCapabilities(); + /** Ask what type of input the router/filter chain expects */ + capabilities = service_get_capabilities(session->service); /** Update the current protocol command being executed */ if (!process_client_commands(dcb, nbytes_read, &read_buffer))