MXS-1220: Make the parameters of the diagnostic entry points const
The diagnostic entry points should not modify the state of the object being diagnosed.
This commit is contained in:

committed by
Markus Mäkelä

parent
c17c451fb5
commit
076599ee5e
@ -572,7 +572,7 @@ static MXS_ROUTER_SESSION* newSession(MXS_ROUTER* instance, MXS_SESSION* session
|
||||
static void closeSession(MXS_ROUTER* instance, MXS_ROUTER_SESSION* session);
|
||||
static void freeSession(MXS_ROUTER* instance, MXS_ROUTER_SESSION* session);
|
||||
static int routeQuery(MXS_ROUTER* instance, MXS_ROUTER_SESSION* session, GWBUF* querybuf);
|
||||
static json_t* diagnostics(MXS_ROUTER* instance);
|
||||
static json_t* diagnostics(const MXS_ROUTER* instance);
|
||||
static void clientReply(MXS_ROUTER* instance, MXS_ROUTER_SESSION* router_session,
|
||||
GWBUF* resultbuf, DCB* backend_dcb);
|
||||
static void handleError(MXS_ROUTER* instance, MXS_ROUTER_SESSION* router_session,
|
||||
@ -759,9 +759,9 @@ static int routeQuery(MXS_ROUTER* instance, MXS_ROUTER_SESSION* session, GWBUF*
|
||||
* @param instance The router instance
|
||||
* @param dcb The DCB for diagnostic output
|
||||
*/
|
||||
static json_t* diagnostics(MXS_ROUTER* instance)
|
||||
static json_t* diagnostics(const MXS_ROUTER* instance)
|
||||
{
|
||||
RRRouter* router = static_cast<RRRouter*>(instance);
|
||||
const RRRouter* router = static_cast<const RRRouter*>(instance);
|
||||
json_t* rval = json_object();
|
||||
|
||||
json_object_set_new(rval, "queries_ok", json_integer(router->m_routing_s));
|
||||
|
@ -35,7 +35,7 @@ static void closeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session);
|
||||
static void freeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session);
|
||||
static void setDownstream(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, MXS_DOWNSTREAM *downstream);
|
||||
static int routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, GWBUF *queue);
|
||||
static json_t* diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession);
|
||||
static json_t* diagnostic(const MXS_FILTER *instance, const MXS_FILTER_SESSION *fsession);
|
||||
static uint64_t getCapabilities(MXS_FILTER* instance);
|
||||
static void destroyInstance(MXS_FILTER *instance);
|
||||
|
||||
@ -221,7 +221,7 @@ routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *session, GWBUF *queue)
|
||||
* @param fsession Filter session, may be NULL
|
||||
* @param dcb The DCB for diagnostic output
|
||||
*/
|
||||
static json_t* diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession)
|
||||
static json_t* diagnostic(const MXS_FILTER *instance, const MXS_FILTER_SESSION *fsession)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ static void closeSession(MXS_ROUTER *instance, MXS_ROUTER_SESSION *session);
|
||||
static void freeSession(MXS_ROUTER *instance, MXS_ROUTER_SESSION *session);
|
||||
static int routeQuery(MXS_ROUTER *instance, MXS_ROUTER_SESSION *session, GWBUF *queue);
|
||||
static void clientReply(MXS_ROUTER *instance, MXS_ROUTER_SESSION *session, GWBUF *queue, DCB*);
|
||||
static json_t* diagnostic(MXS_ROUTER *instance);
|
||||
static json_t* diagnostic(const MXS_ROUTER *instance);
|
||||
static uint64_t getCapabilities(MXS_ROUTER* instance);
|
||||
static void handleError(MXS_ROUTER *instance,
|
||||
MXS_ROUTER_SESSION *router_session,
|
||||
@ -145,7 +145,7 @@ void clientReply(MXS_ROUTER* instance, MXS_ROUTER_SESSION* session, GWBUF* queue
|
||||
* @param instance The router instance
|
||||
* @param dcb The DCB for diagnostic output
|
||||
*/
|
||||
static json_t* diagnostic(MXS_ROUTER *instance)
|
||||
static json_t* diagnostic(const MXS_ROUTER *instance)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user