Introduce opaque type for filter session data
This commit is contained in:
@ -33,11 +33,24 @@
|
|||||||
MXS_BEGIN_DECLS
|
MXS_BEGIN_DECLS
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The FILTER handle points to module specific data, so the best we can do
|
* MXS_FILTER is an opaque type representing a particular filter instance.
|
||||||
* is to make it a void * externally.
|
*
|
||||||
|
* MaxScale itself does not do anything with it, except for receiving it
|
||||||
|
* from the @c createInstance function of a filter module and subsequently
|
||||||
|
* passing it back to the API functions of the filter.
|
||||||
*/
|
*/
|
||||||
typedef void *MXS_FILTER;
|
typedef void *MXS_FILTER;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MXS_FILTER_SESSION is an opaque type representing the session related
|
||||||
|
* data of a particular filter instance.
|
||||||
|
*
|
||||||
|
* MaxScale itself does not do anything with it, except for receiving it
|
||||||
|
* from the @c newSession function of a filter module and subsequently
|
||||||
|
* passing it back to the API functions of the filter.
|
||||||
|
*/
|
||||||
|
typedef void *MXS_FILTER_SESSION;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @verbatim
|
* @verbatim
|
||||||
* The "module object" structure for a query router module
|
* The "module object" structure for a query router module
|
||||||
@ -63,17 +76,15 @@ typedef void *MXS_FILTER;
|
|||||||
*/
|
*/
|
||||||
typedef struct mxs_filter_object
|
typedef struct mxs_filter_object
|
||||||
{
|
{
|
||||||
MXS_FILTER *(*createInstance)(const char *name,
|
MXS_FILTER *(*createInstance)(const char *name, char **options, CONFIG_PARAMETER *params);
|
||||||
char **options,
|
MXS_FILTER_SESSION *(*newSession)(MXS_FILTER *instance, SESSION *session);
|
||||||
CONFIG_PARAMETER *params);
|
void (*closeSession)(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession);
|
||||||
void *(*newSession)(MXS_FILTER *instance, SESSION *session);
|
void (*freeSession)(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession);
|
||||||
void (*closeSession)(MXS_FILTER *instance, void *fsession);
|
void (*setDownstream)(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DOWNSTREAM *downstream);
|
||||||
void (*freeSession)(MXS_FILTER *instance, void *fsession);
|
void (*setUpstream)(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, UPSTREAM *downstream);
|
||||||
void (*setDownstream)(MXS_FILTER *instance, void *fsession, DOWNSTREAM *downstream);
|
int32_t (*routeQuery)(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, GWBUF *queue);
|
||||||
void (*setUpstream)(MXS_FILTER *instance, void *fsession, UPSTREAM *downstream);
|
int32_t (*clientReply)(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, GWBUF *queue);
|
||||||
int32_t (*routeQuery)(MXS_FILTER *instance, void *fsession, GWBUF *queue);
|
void (*diagnostics)(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb);
|
||||||
int32_t (*clientReply)(MXS_FILTER *instance, void *fsession, GWBUF *queue);
|
|
||||||
void (*diagnostics)(MXS_FILTER *instance, void *fsession, DCB *dcb);
|
|
||||||
uint64_t (*getCapabilities)(void);
|
uint64_t (*getCapabilities)(void);
|
||||||
void (*destroyInstance)(MXS_FILTER *instance);
|
void (*destroyInstance)(MXS_FILTER *instance);
|
||||||
} MXS_FILTER_OBJECT;
|
} MXS_FILTER_OBJECT;
|
||||||
|
@ -212,51 +212,51 @@ public:
|
|||||||
return reinterpret_cast<MXS_FILTER*>(pFilter);
|
return reinterpret_cast<MXS_FILTER*>(pFilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void* newSession(MXS_FILTER* pInstance, SESSION* pSession)
|
static MXS_FILTER_SESSION* newSession(MXS_FILTER* pInstance, SESSION* pSession)
|
||||||
{
|
{
|
||||||
FilterType* pFilter = reinterpret_cast<FilterType*>(pInstance);
|
FilterType* pFilter = reinterpret_cast<FilterType*>(pInstance);
|
||||||
void* pFilterSession;
|
void* pFilterSession;
|
||||||
|
|
||||||
MXS_EXCEPTION_GUARD(pFilterSession = pFilter->newSession(pSession));
|
MXS_EXCEPTION_GUARD(pFilterSession = pFilter->newSession(pSession));
|
||||||
|
|
||||||
return pFilterSession;
|
return reinterpret_cast<MXS_FILTER_SESSION*>(pFilterSession);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void closeSession(MXS_FILTER*, void* pData)
|
static void closeSession(MXS_FILTER*, MXS_FILTER_SESSION* pData)
|
||||||
{
|
{
|
||||||
FilterSessionType* pFilterSession = static_cast<FilterSessionType*>(pData);
|
FilterSessionType* pFilterSession = reinterpret_cast<FilterSessionType*>(pData);
|
||||||
|
|
||||||
MXS_EXCEPTION_GUARD(pFilterSession->close());
|
MXS_EXCEPTION_GUARD(pFilterSession->close());
|
||||||
}
|
}
|
||||||
|
|
||||||
static void freeSession(MXS_FILTER*, void* pData)
|
static void freeSession(MXS_FILTER*, MXS_FILTER_SESSION* pData)
|
||||||
{
|
{
|
||||||
FilterSessionType* pFilterSession = static_cast<FilterSessionType*>(pData);
|
FilterSessionType* pFilterSession = reinterpret_cast<FilterSessionType*>(pData);
|
||||||
|
|
||||||
MXS_EXCEPTION_GUARD(delete pFilterSession);
|
MXS_EXCEPTION_GUARD(delete pFilterSession);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setDownstream(MXS_FILTER*, void* pData, DOWNSTREAM* pDownstream)
|
static void setDownstream(MXS_FILTER*, MXS_FILTER_SESSION* pData, DOWNSTREAM* pDownstream)
|
||||||
{
|
{
|
||||||
FilterSessionType* pFilterSession = static_cast<FilterSessionType*>(pData);
|
FilterSessionType* pFilterSession = reinterpret_cast<FilterSessionType*>(pData);
|
||||||
|
|
||||||
typename FilterSessionType::Downstream down(*pDownstream);
|
typename FilterSessionType::Downstream down(*pDownstream);
|
||||||
|
|
||||||
MXS_EXCEPTION_GUARD(pFilterSession->setDownstream(down));
|
MXS_EXCEPTION_GUARD(pFilterSession->setDownstream(down));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setUpstream(MXS_FILTER* pInstance, void* pData, UPSTREAM* pUpstream)
|
static void setUpstream(MXS_FILTER* pInstance, MXS_FILTER_SESSION* pData, UPSTREAM* pUpstream)
|
||||||
{
|
{
|
||||||
FilterSessionType* pFilterSession = static_cast<FilterSessionType*>(pData);
|
FilterSessionType* pFilterSession = reinterpret_cast<FilterSessionType*>(pData);
|
||||||
|
|
||||||
typename FilterSessionType::Upstream up(*pUpstream);
|
typename FilterSessionType::Upstream up(*pUpstream);
|
||||||
|
|
||||||
MXS_EXCEPTION_GUARD(pFilterSession->setUpstream(up));
|
MXS_EXCEPTION_GUARD(pFilterSession->setUpstream(up));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int routeQuery(MXS_FILTER* pInstance, void* pData, GWBUF* pPacket)
|
static int routeQuery(MXS_FILTER* pInstance, MXS_FILTER_SESSION* pData, GWBUF* pPacket)
|
||||||
{
|
{
|
||||||
FilterSessionType* pFilterSession = static_cast<FilterSessionType*>(pData);
|
FilterSessionType* pFilterSession = reinterpret_cast<FilterSessionType*>(pData);
|
||||||
|
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
MXS_EXCEPTION_GUARD(rv = pFilterSession->routeQuery(pPacket));
|
MXS_EXCEPTION_GUARD(rv = pFilterSession->routeQuery(pPacket));
|
||||||
@ -264,9 +264,9 @@ public:
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int clientReply(MXS_FILTER* pInstance, void* pData, GWBUF* pPacket)
|
static int clientReply(MXS_FILTER* pInstance, MXS_FILTER_SESSION* pData, GWBUF* pPacket)
|
||||||
{
|
{
|
||||||
FilterSessionType* pFilterSession = static_cast<FilterSessionType*>(pData);
|
FilterSessionType* pFilterSession = reinterpret_cast<FilterSessionType*>(pData);
|
||||||
|
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
MXS_EXCEPTION_GUARD(rv = pFilterSession->clientReply(pPacket));
|
MXS_EXCEPTION_GUARD(rv = pFilterSession->clientReply(pPacket));
|
||||||
@ -274,11 +274,11 @@ public:
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void diagnostics(MXS_FILTER* pInstance, void* pData, DCB* pDcb)
|
static void diagnostics(MXS_FILTER* pInstance, MXS_FILTER_SESSION* pData, DCB* pDcb)
|
||||||
{
|
{
|
||||||
if (pData)
|
if (pData)
|
||||||
{
|
{
|
||||||
FilterSessionType* pFilterSession = static_cast<FilterSessionType*>(pData);
|
FilterSessionType* pFilterSession = reinterpret_cast<FilterSessionType*>(pData);
|
||||||
|
|
||||||
MXS_EXCEPTION_GUARD(pFilterSession->diagnostics(pDcb));
|
MXS_EXCEPTION_GUARD(pFilterSession->diagnostics(pDcb));
|
||||||
}
|
}
|
||||||
|
@ -47,12 +47,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static MXS_FILTER *createInstance(const char *name, char **options, CONFIG_PARAMETER *params);
|
static MXS_FILTER *createInstance(const char *name, char **options, CONFIG_PARAMETER *params);
|
||||||
static void *newSession(MXS_FILTER *instance, SESSION *session);
|
static MXS_FILTER_SESSION *newSession(MXS_FILTER *instance, SESSION *session);
|
||||||
static void closeSession(MXS_FILTER *instance, void *session);
|
static void closeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session);
|
||||||
static void freeSession(MXS_FILTER *instance, void *session);
|
static void freeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session);
|
||||||
static void setDownstream(MXS_FILTER *instance, void *fsession, DOWNSTREAM *downstream);
|
static void setDownstream(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DOWNSTREAM *downstream);
|
||||||
static int routeQuery(MXS_FILTER *instance, void *fsession, GWBUF *queue);
|
static int routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, GWBUF *queue);
|
||||||
static void diagnostic(MXS_FILTER *instance, void *fsession, DCB *dcb);
|
static void diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb);
|
||||||
static uint64_t getCapabilities(void);
|
static uint64_t getCapabilities(void);
|
||||||
|
|
||||||
#define CCR_DEFAULT_TIME "60"
|
#define CCR_DEFAULT_TIME "60"
|
||||||
@ -222,7 +222,7 @@ createInstance(const char *name, char **options, CONFIG_PARAMETER *params)
|
|||||||
*
|
*
|
||||||
* @return Session specific data for this session
|
* @return Session specific data for this session
|
||||||
*/
|
*/
|
||||||
static void *
|
static MXS_FILTER_SESSION *
|
||||||
newSession(MXS_FILTER *instance, SESSION *session)
|
newSession(MXS_FILTER *instance, SESSION *session)
|
||||||
{
|
{
|
||||||
CCR_INSTANCE *my_instance = (CCR_INSTANCE *)instance;
|
CCR_INSTANCE *my_instance = (CCR_INSTANCE *)instance;
|
||||||
@ -234,7 +234,7 @@ newSession(MXS_FILTER *instance, SESSION *session)
|
|||||||
my_session->last_modification = 0;
|
my_session->last_modification = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return my_session;
|
return (MXS_FILTER_SESSION*)my_session;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -245,7 +245,7 @@ newSession(MXS_FILTER *instance, SESSION *session)
|
|||||||
* @param session The session being closed
|
* @param session The session being closed
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
closeSession(MXS_FILTER *instance, void *session)
|
closeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -256,7 +256,7 @@ closeSession(MXS_FILTER *instance, void *session)
|
|||||||
* @param session The session being closed
|
* @param session The session being closed
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
freeSession(MXS_FILTER *instance, void *session)
|
freeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session)
|
||||||
{
|
{
|
||||||
MXS_FREE(session);
|
MXS_FREE(session);
|
||||||
}
|
}
|
||||||
@ -269,7 +269,7 @@ freeSession(MXS_FILTER *instance, void *session)
|
|||||||
* @param downstream The downstream filter or router
|
* @param downstream The downstream filter or router
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
setDownstream(MXS_FILTER *instance, void *session, DOWNSTREAM *downstream)
|
setDownstream(MXS_FILTER *instance, MXS_FILTER_SESSION *session, DOWNSTREAM *downstream)
|
||||||
{
|
{
|
||||||
CCR_SESSION *my_session = (CCR_SESSION *)session;
|
CCR_SESSION *my_session = (CCR_SESSION *)session;
|
||||||
|
|
||||||
@ -291,7 +291,7 @@ setDownstream(MXS_FILTER *instance, void *session, DOWNSTREAM *downstream)
|
|||||||
* @param queue The query data
|
* @param queue The query data
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
routeQuery(MXS_FILTER *instance, void *session, GWBUF *queue)
|
routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *session, GWBUF *queue)
|
||||||
{
|
{
|
||||||
CCR_INSTANCE *my_instance = (CCR_INSTANCE *)instance;
|
CCR_INSTANCE *my_instance = (CCR_INSTANCE *)instance;
|
||||||
CCR_SESSION *my_session = (CCR_SESSION *)session;
|
CCR_SESSION *my_session = (CCR_SESSION *)session;
|
||||||
@ -353,7 +353,7 @@ routeQuery(MXS_FILTER *instance, void *session, GWBUF *queue)
|
|||||||
* @param dcb The DCB for diagnostic output
|
* @param dcb The DCB for diagnostic output
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
diagnostic(MXS_FILTER *instance, void *fsession, DCB *dcb)
|
diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb)
|
||||||
{
|
{
|
||||||
CCR_INSTANCE *my_instance = (CCR_INSTANCE *)instance;
|
CCR_INSTANCE *my_instance = (CCR_INSTANCE *)instance;
|
||||||
CCR_SESSION *my_session = (CCR_SESSION *)fsession;
|
CCR_SESSION *my_session = (CCR_SESSION *)fsession;
|
||||||
|
@ -95,12 +95,12 @@ int dbfw_yyparse(void*);
|
|||||||
* The filter entry points
|
* The filter entry points
|
||||||
*/
|
*/
|
||||||
static MXS_FILTER *createInstance(const char *name, char **options, CONFIG_PARAMETER *);
|
static MXS_FILTER *createInstance(const char *name, char **options, CONFIG_PARAMETER *);
|
||||||
static void *newSession(MXS_FILTER *instance, SESSION *session);
|
static MXS_FILTER_SESSION *newSession(MXS_FILTER *instance, SESSION *session);
|
||||||
static void closeSession(MXS_FILTER *instance, void *session);
|
static void closeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session);
|
||||||
static void freeSession(MXS_FILTER *instance, void *session);
|
static void freeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session);
|
||||||
static void setDownstream(MXS_FILTER *instance, void *fsession, DOWNSTREAM *downstream);
|
static void setDownstream(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DOWNSTREAM *downstream);
|
||||||
static int routeQuery(MXS_FILTER *instance, void *fsession, GWBUF *queue);
|
static int routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, GWBUF *queue);
|
||||||
static void diagnostic(MXS_FILTER *instance, void *fsession, DCB *dcb);
|
static void diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb);
|
||||||
static uint64_t getCapabilities(void);
|
static uint64_t getCapabilities(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1589,7 +1589,7 @@ createInstance(const char *name, char **options, CONFIG_PARAMETER *params)
|
|||||||
* @param session The session itself
|
* @param session The session itself
|
||||||
* @return Session specific data for this session
|
* @return Session specific data for this session
|
||||||
*/
|
*/
|
||||||
static void *
|
static MXS_FILTER_SESSION *
|
||||||
newSession(MXS_FILTER *instance, SESSION *session)
|
newSession(MXS_FILTER *instance, SESSION *session)
|
||||||
{
|
{
|
||||||
FW_SESSION *my_session;
|
FW_SESSION *my_session;
|
||||||
@ -1599,7 +1599,7 @@ newSession(MXS_FILTER *instance, SESSION *session)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
my_session->session = session;
|
my_session->session = session;
|
||||||
return my_session;
|
return (MXS_FILTER_SESSION*)my_session;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1610,7 +1610,7 @@ newSession(MXS_FILTER *instance, SESSION *session)
|
|||||||
* @param session The session being closed
|
* @param session The session being closed
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
closeSession(MXS_FILTER *instance, void *session)
|
closeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1621,7 +1621,7 @@ closeSession(MXS_FILTER *instance, void *session)
|
|||||||
* @param session The filter session
|
* @param session The filter session
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
freeSession(MXS_FILTER *instance, void *session)
|
freeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session)
|
||||||
{
|
{
|
||||||
FW_SESSION *my_session = (FW_SESSION *) session;
|
FW_SESSION *my_session = (FW_SESSION *) session;
|
||||||
MXS_FREE(my_session->errmsg);
|
MXS_FREE(my_session->errmsg);
|
||||||
@ -1638,7 +1638,7 @@ freeSession(MXS_FILTER *instance, void *session)
|
|||||||
* @param downstream The downstream filter or router.
|
* @param downstream The downstream filter or router.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
setDownstream(MXS_FILTER *instance, void *session, DOWNSTREAM *downstream)
|
setDownstream(MXS_FILTER *instance, MXS_FILTER_SESSION *session, DOWNSTREAM *downstream)
|
||||||
{
|
{
|
||||||
FW_SESSION *my_session = (FW_SESSION *) session;
|
FW_SESSION *my_session = (FW_SESSION *) session;
|
||||||
my_session->down = *downstream;
|
my_session->down = *downstream;
|
||||||
@ -2308,7 +2308,7 @@ DBFW_USER* find_user_data(HASHTABLE *hash, const char *name, const char *remote)
|
|||||||
* @param queue The query data
|
* @param queue The query data
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
routeQuery(MXS_FILTER *instance, void *session, GWBUF *queue)
|
routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *session, GWBUF *queue)
|
||||||
{
|
{
|
||||||
FW_SESSION *my_session = (FW_SESSION *) session;
|
FW_SESSION *my_session = (FW_SESSION *) session;
|
||||||
FW_INSTANCE *my_instance = (FW_INSTANCE *) instance;
|
FW_INSTANCE *my_instance = (FW_INSTANCE *) instance;
|
||||||
@ -2452,7 +2452,7 @@ routeQuery(MXS_FILTER *instance, void *session, GWBUF *queue)
|
|||||||
* @param dcb The DCB for diagnostic output
|
* @param dcb The DCB for diagnostic output
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
diagnostic(MXS_FILTER *instance, void *fsession, DCB *dcb)
|
diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb)
|
||||||
{
|
{
|
||||||
FW_INSTANCE *my_instance = (FW_INSTANCE *) instance;
|
FW_INSTANCE *my_instance = (FW_INSTANCE *) instance;
|
||||||
|
|
||||||
|
@ -24,12 +24,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static MXS_FILTER *createInstance(const char* name, char **options, CONFIG_PARAMETER *params);
|
static MXS_FILTER *createInstance(const char* name, char **options, CONFIG_PARAMETER *params);
|
||||||
static void *newSession(MXS_FILTER *instance, SESSION *session);
|
static MXS_FILTER_SESSION *newSession(MXS_FILTER *instance, SESSION *session);
|
||||||
static void closeSession(MXS_FILTER *instance, void *session);
|
static void closeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session);
|
||||||
static void freeSession(MXS_FILTER *instance, void *session);
|
static void freeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session);
|
||||||
static void setDownstream(MXS_FILTER *instance, void *fsession, DOWNSTREAM *downstream);
|
static void setDownstream(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DOWNSTREAM *downstream);
|
||||||
static int routeQuery(MXS_FILTER *instance, void *fsession, GWBUF *queue);
|
static int routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, GWBUF *queue);
|
||||||
static void diagnostic(MXS_FILTER *instance, void *fsession, DCB *dcb);
|
static void diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb);
|
||||||
static uint64_t getCapabilities(void);
|
static uint64_t getCapabilities(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -106,7 +106,7 @@ createInstance(const char *name, char **options, CONFIG_PARAMETER *params)
|
|||||||
* @param session The session itself
|
* @param session The session itself
|
||||||
* @return Session specific data for this session
|
* @return Session specific data for this session
|
||||||
*/
|
*/
|
||||||
static void *
|
static MXS_FILTER_SESSION *
|
||||||
newSession(MXS_FILTER *instance, SESSION *session)
|
newSession(MXS_FILTER *instance, SESSION *session)
|
||||||
{
|
{
|
||||||
HINT_INSTANCE *my_instance = (HINT_INSTANCE *)instance;
|
HINT_INSTANCE *my_instance = (HINT_INSTANCE *)instance;
|
||||||
@ -120,7 +120,7 @@ newSession(MXS_FILTER *instance, SESSION *session)
|
|||||||
my_session->named_hints = NULL;
|
my_session->named_hints = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return my_session;
|
return (MXS_FILTER_SESSION*)my_session;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -131,7 +131,7 @@ newSession(MXS_FILTER *instance, SESSION *session)
|
|||||||
* @param session The session being closed
|
* @param session The session being closed
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
closeSession(MXS_FILTER *instance, void *session)
|
closeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session)
|
||||||
{
|
{
|
||||||
HINT_SESSION *my_session = (HINT_SESSION *)session;
|
HINT_SESSION *my_session = (HINT_SESSION *)session;
|
||||||
NAMEDHINTS* named_hints;
|
NAMEDHINTS* named_hints;
|
||||||
@ -162,7 +162,7 @@ closeSession(MXS_FILTER *instance, void *session)
|
|||||||
* @param session The session being closed
|
* @param session The session being closed
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
freeSession(MXS_FILTER *instance, void *session)
|
freeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session)
|
||||||
{
|
{
|
||||||
MXS_FREE(session);
|
MXS_FREE(session);
|
||||||
return;
|
return;
|
||||||
@ -176,7 +176,7 @@ freeSession(MXS_FILTER *instance, void *session)
|
|||||||
* @param downstream The downstream filter or router
|
* @param downstream The downstream filter or router
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
setDownstream(MXS_FILTER *instance, void *session, DOWNSTREAM *downstream)
|
setDownstream(MXS_FILTER *instance, MXS_FILTER_SESSION *session, DOWNSTREAM *downstream)
|
||||||
{
|
{
|
||||||
HINT_SESSION *my_session = (HINT_SESSION *)session;
|
HINT_SESSION *my_session = (HINT_SESSION *)session;
|
||||||
|
|
||||||
@ -194,7 +194,7 @@ setDownstream(MXS_FILTER *instance, void *session, DOWNSTREAM *downstream)
|
|||||||
* @param queue The query data
|
* @param queue The query data
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
routeQuery(MXS_FILTER *instance, void *session, GWBUF *queue)
|
routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *session, GWBUF *queue)
|
||||||
{
|
{
|
||||||
HINT_SESSION *my_session = (HINT_SESSION *)session;
|
HINT_SESSION *my_session = (HINT_SESSION *)session;
|
||||||
|
|
||||||
@ -223,7 +223,7 @@ routeQuery(MXS_FILTER *instance, void *session, GWBUF *queue)
|
|||||||
* @param dcb The DCB for diagnostic output
|
* @param dcb The DCB for diagnostic output
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
diagnostic(MXS_FILTER *instance, void *fsession, DCB *dcb)
|
diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb)
|
||||||
{
|
{
|
||||||
HINT_INSTANCE *my_instance = (HINT_INSTANCE *)instance;
|
HINT_INSTANCE *my_instance = (HINT_INSTANCE *)instance;
|
||||||
HINT_SESSION *my_session = (HINT_SESSION *)fsession;
|
HINT_SESSION *my_session = (HINT_SESSION *)fsession;
|
||||||
|
@ -47,14 +47,14 @@
|
|||||||
#include "maxrows.h"
|
#include "maxrows.h"
|
||||||
|
|
||||||
static MXS_FILTER *createInstance(const char *name, char **options, CONFIG_PARAMETER *);
|
static MXS_FILTER *createInstance(const char *name, char **options, CONFIG_PARAMETER *);
|
||||||
static void *newSession(MXS_FILTER *instance, SESSION *session);
|
static MXS_FILTER_SESSION *newSession(MXS_FILTER *instance, SESSION *session);
|
||||||
static void closeSession(MXS_FILTER *instance, void *sdata);
|
static void closeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *sdata);
|
||||||
static void freeSession(MXS_FILTER *instance, void *sdata);
|
static void freeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *sdata);
|
||||||
static void setDownstream(MXS_FILTER *instance, void *sdata, DOWNSTREAM *downstream);
|
static void setDownstream(MXS_FILTER *instance, MXS_FILTER_SESSION *sdata, DOWNSTREAM *downstream);
|
||||||
static void setUpstream(MXS_FILTER *instance, void *sdata, UPSTREAM *upstream);
|
static void setUpstream(MXS_FILTER *instance, MXS_FILTER_SESSION *sdata, UPSTREAM *upstream);
|
||||||
static int routeQuery(MXS_FILTER *instance, void *sdata, GWBUF *queue);
|
static int routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *sdata, GWBUF *queue);
|
||||||
static int clientReply(MXS_FILTER *instance, void *sdata, GWBUF *queue);
|
static int clientReply(MXS_FILTER *instance, MXS_FILTER_SESSION *sdata, GWBUF *queue);
|
||||||
static void diagnostics(MXS_FILTER *instance, void *sdata, DCB *dcb);
|
static void diagnostics(MXS_FILTER *instance, MXS_FILTER_SESSION *sdata, DCB *dcb);
|
||||||
static uint64_t getCapabilities(void);
|
static uint64_t getCapabilities(void);
|
||||||
|
|
||||||
/* Global symbols of the Module */
|
/* Global symbols of the Module */
|
||||||
@ -211,12 +211,12 @@ static MXS_FILTER *createInstance(const char *name, char **options, CONFIG_PARAM
|
|||||||
*
|
*
|
||||||
* @return Session specific data for this session
|
* @return Session specific data for this session
|
||||||
*/
|
*/
|
||||||
static void *newSession(MXS_FILTER *instance, SESSION *session)
|
static MXS_FILTER_SESSION *newSession(MXS_FILTER *instance, SESSION *session)
|
||||||
{
|
{
|
||||||
MAXROWS_INSTANCE *cinstance = (MAXROWS_INSTANCE*)instance;
|
MAXROWS_INSTANCE *cinstance = (MAXROWS_INSTANCE*)instance;
|
||||||
MAXROWS_SESSION_DATA *csdata = maxrows_session_data_create(cinstance, session);
|
MAXROWS_SESSION_DATA *csdata = maxrows_session_data_create(cinstance, session);
|
||||||
|
|
||||||
return csdata;
|
return (MXS_FILTER_SESSION*)csdata;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -225,7 +225,7 @@ static void *newSession(MXS_FILTER *instance, SESSION *session)
|
|||||||
* @param instance The maxrows instance data
|
* @param instance The maxrows instance data
|
||||||
* @param sdata The session data of the session being closed
|
* @param sdata The session data of the session being closed
|
||||||
*/
|
*/
|
||||||
static void closeSession(MXS_FILTER *instance, void *sdata)
|
static void closeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *sdata)
|
||||||
{
|
{
|
||||||
MAXROWS_INSTANCE *cinstance = (MAXROWS_INSTANCE*)instance;
|
MAXROWS_INSTANCE *cinstance = (MAXROWS_INSTANCE*)instance;
|
||||||
MAXROWS_SESSION_DATA *csdata = (MAXROWS_SESSION_DATA*)sdata;
|
MAXROWS_SESSION_DATA *csdata = (MAXROWS_SESSION_DATA*)sdata;
|
||||||
@ -237,7 +237,7 @@ static void closeSession(MXS_FILTER *instance, void *sdata)
|
|||||||
* @param instance The maxrows instance data
|
* @param instance The maxrows instance data
|
||||||
* @param sdata The session data of the session being closed
|
* @param sdata The session data of the session being closed
|
||||||
*/
|
*/
|
||||||
static void freeSession(MXS_FILTER *instance, void *sdata)
|
static void freeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *sdata)
|
||||||
{
|
{
|
||||||
MAXROWS_INSTANCE *cinstance = (MAXROWS_INSTANCE*)instance;
|
MAXROWS_INSTANCE *cinstance = (MAXROWS_INSTANCE*)instance;
|
||||||
MAXROWS_SESSION_DATA *csdata = (MAXROWS_SESSION_DATA*)sdata;
|
MAXROWS_SESSION_DATA *csdata = (MAXROWS_SESSION_DATA*)sdata;
|
||||||
@ -252,7 +252,7 @@ static void freeSession(MXS_FILTER *instance, void *sdata)
|
|||||||
* @param sdata The session data of the session
|
* @param sdata The session data of the session
|
||||||
* @param down The downstream filter or router
|
* @param down The downstream filter or router
|
||||||
*/
|
*/
|
||||||
static void setDownstream(MXS_FILTER *instance, void *sdata, DOWNSTREAM *down)
|
static void setDownstream(MXS_FILTER *instance, MXS_FILTER_SESSION *sdata, DOWNSTREAM *down)
|
||||||
{
|
{
|
||||||
MAXROWS_INSTANCE *cinstance = (MAXROWS_INSTANCE*)instance;
|
MAXROWS_INSTANCE *cinstance = (MAXROWS_INSTANCE*)instance;
|
||||||
MAXROWS_SESSION_DATA *csdata = (MAXROWS_SESSION_DATA*)sdata;
|
MAXROWS_SESSION_DATA *csdata = (MAXROWS_SESSION_DATA*)sdata;
|
||||||
@ -267,7 +267,7 @@ static void setDownstream(MXS_FILTER *instance, void *sdata, DOWNSTREAM *down)
|
|||||||
* @param sdata The session data of the session
|
* @param sdata The session data of the session
|
||||||
* @param up The upstream filter or router
|
* @param up The upstream filter or router
|
||||||
*/
|
*/
|
||||||
static void setUpstream(MXS_FILTER *instance, void *sdata, UPSTREAM *up)
|
static void setUpstream(MXS_FILTER *instance, MXS_FILTER_SESSION *sdata, UPSTREAM *up)
|
||||||
{
|
{
|
||||||
MAXROWS_INSTANCE *cinstance = (MAXROWS_INSTANCE*)instance;
|
MAXROWS_INSTANCE *cinstance = (MAXROWS_INSTANCE*)instance;
|
||||||
MAXROWS_SESSION_DATA *csdata = (MAXROWS_SESSION_DATA*)sdata;
|
MAXROWS_SESSION_DATA *csdata = (MAXROWS_SESSION_DATA*)sdata;
|
||||||
@ -282,7 +282,7 @@ static void setUpstream(MXS_FILTER *instance, void *sdata, UPSTREAM *up)
|
|||||||
* @param sdata The filter session data
|
* @param sdata The filter session data
|
||||||
* @param buffer Buffer containing an MySQL protocol packet.
|
* @param buffer Buffer containing an MySQL protocol packet.
|
||||||
*/
|
*/
|
||||||
static int routeQuery(MXS_FILTER *instance, void *sdata, GWBUF *packet)
|
static int routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *sdata, GWBUF *packet)
|
||||||
{
|
{
|
||||||
MAXROWS_INSTANCE *cinstance = (MAXROWS_INSTANCE*)instance;
|
MAXROWS_INSTANCE *cinstance = (MAXROWS_INSTANCE*)instance;
|
||||||
MAXROWS_SESSION_DATA *csdata = (MAXROWS_SESSION_DATA*)sdata;
|
MAXROWS_SESSION_DATA *csdata = (MAXROWS_SESSION_DATA*)sdata;
|
||||||
@ -327,7 +327,7 @@ static int routeQuery(MXS_FILTER *instance, void *sdata, GWBUF *packet)
|
|||||||
* @param sdata The filter session data
|
* @param sdata The filter session data
|
||||||
* @param queue The query data
|
* @param queue The query data
|
||||||
*/
|
*/
|
||||||
static int clientReply(MXS_FILTER *instance, void *sdata, GWBUF *data)
|
static int clientReply(MXS_FILTER *instance, MXS_FILTER_SESSION *sdata, GWBUF *data)
|
||||||
{
|
{
|
||||||
MAXROWS_INSTANCE *cinstance = (MAXROWS_INSTANCE*)instance;
|
MAXROWS_INSTANCE *cinstance = (MAXROWS_INSTANCE*)instance;
|
||||||
MAXROWS_SESSION_DATA *csdata = (MAXROWS_SESSION_DATA*)sdata;
|
MAXROWS_SESSION_DATA *csdata = (MAXROWS_SESSION_DATA*)sdata;
|
||||||
@ -405,7 +405,7 @@ static int clientReply(MXS_FILTER *instance, void *sdata, GWBUF *data)
|
|||||||
* @param fsession Filter session, may be NULL
|
* @param fsession Filter session, may be NULL
|
||||||
* @param dcb The DCB for diagnostic output
|
* @param dcb The DCB for diagnostic output
|
||||||
*/
|
*/
|
||||||
static void diagnostics(MXS_FILTER *instance, void *sdata, DCB *dcb)
|
static void diagnostics(MXS_FILTER *instance, MXS_FILTER_SESSION *sdata, DCB *dcb)
|
||||||
{
|
{
|
||||||
MAXROWS_INSTANCE *cinstance = (MAXROWS_INSTANCE*)instance;
|
MAXROWS_INSTANCE *cinstance = (MAXROWS_INSTANCE*)instance;
|
||||||
MAXROWS_SESSION_DATA *csdata = (MAXROWS_SESSION_DATA*)sdata;
|
MAXROWS_SESSION_DATA *csdata = (MAXROWS_SESSION_DATA*)sdata;
|
||||||
@ -448,7 +448,7 @@ static void maxrows_response_state_reset(MAXROWS_RESPONSE_STATE *state)
|
|||||||
* @return Session data or NULL if creation fails.
|
* @return Session data or NULL if creation fails.
|
||||||
*/
|
*/
|
||||||
static MAXROWS_SESSION_DATA *maxrows_session_data_create(MAXROWS_INSTANCE *instance,
|
static MAXROWS_SESSION_DATA *maxrows_session_data_create(MAXROWS_INSTANCE *instance,
|
||||||
SESSION* session)
|
SESSION* session)
|
||||||
{
|
{
|
||||||
MAXROWS_SESSION_DATA *data = (MAXROWS_SESSION_DATA*)MXS_CALLOC(1, sizeof(MAXROWS_SESSION_DATA));
|
MAXROWS_SESSION_DATA *data = (MAXROWS_SESSION_DATA*)MXS_CALLOC(1, sizeof(MAXROWS_SESSION_DATA));
|
||||||
|
|
||||||
|
@ -84,14 +84,14 @@ static int hktask_id = 0;
|
|||||||
* The filter entry points
|
* The filter entry points
|
||||||
*/
|
*/
|
||||||
static MXS_FILTER *createInstance(const char *name, char **options, CONFIG_PARAMETER *);
|
static MXS_FILTER *createInstance(const char *name, char **options, CONFIG_PARAMETER *);
|
||||||
static void *newSession(MXS_FILTER *instance, SESSION *session);
|
static MXS_FILTER_SESSION *newSession(MXS_FILTER *instance, SESSION *session);
|
||||||
static void closeSession(MXS_FILTER *instance, void *session);
|
static void closeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session);
|
||||||
static void freeSession(MXS_FILTER *instance, void *session);
|
static void freeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session);
|
||||||
static void setDownstream(MXS_FILTER *instance, void *fsession, DOWNSTREAM *downstream);
|
static void setDownstream(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DOWNSTREAM *downstream);
|
||||||
static void setUpstream(MXS_FILTER *instance, void *fsession, UPSTREAM *upstream);
|
static void setUpstream(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, UPSTREAM *upstream);
|
||||||
static int routeQuery(MXS_FILTER *instance, void *fsession, GWBUF *queue);
|
static int routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, GWBUF *queue);
|
||||||
static int clientReply(MXS_FILTER *instance, void *fsession, GWBUF *queue);
|
static int clientReply(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, GWBUF *queue);
|
||||||
static void diagnostic(MXS_FILTER *instance, void *fsession, DCB *dcb);
|
static void diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb);
|
||||||
static uint64_t getCapabilities(void);
|
static uint64_t getCapabilities(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -799,7 +799,7 @@ void pushMessage(MQ_INSTANCE *instance, amqp_basic_properties_t* prop, char* msg
|
|||||||
* @param session The session itself
|
* @param session The session itself
|
||||||
* @return Session specific data for this session
|
* @return Session specific data for this session
|
||||||
*/
|
*/
|
||||||
static void *
|
static MXS_FILTER_SESSION *
|
||||||
newSession(MXS_FILTER *instance, SESSION *session)
|
newSession(MXS_FILTER *instance, SESSION *session)
|
||||||
{
|
{
|
||||||
MYSQL_session *sessauth = session->client_dcb->data;
|
MYSQL_session *sessauth = session->client_dcb->data;
|
||||||
@ -834,7 +834,7 @@ newSession(MXS_FILTER *instance, SESSION *session)
|
|||||||
MXS_FREE(db);
|
MXS_FREE(db);
|
||||||
}
|
}
|
||||||
|
|
||||||
return my_session;
|
return (MXS_FILTER_SESSION*)my_session;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -846,7 +846,7 @@ newSession(MXS_FILTER *instance, SESSION *session)
|
|||||||
* @param session The session being closed
|
* @param session The session being closed
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
closeSession(MXS_FILTER *instance, void *session) { }
|
closeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session) { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Free the memory associated with the session
|
* Free the memory associated with the session
|
||||||
@ -855,7 +855,7 @@ closeSession(MXS_FILTER *instance, void *session) { }
|
|||||||
* @param session The filter session
|
* @param session The filter session
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
freeSession(MXS_FILTER *instance, void *session)
|
freeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session)
|
||||||
{
|
{
|
||||||
MQ_SESSION *my_session = (MQ_SESSION *) session;
|
MQ_SESSION *my_session = (MQ_SESSION *) session;
|
||||||
MXS_FREE(my_session->uid);
|
MXS_FREE(my_session->uid);
|
||||||
@ -873,13 +873,13 @@ freeSession(MXS_FILTER *instance, void *session)
|
|||||||
* @param downstream The downstream filter or router.
|
* @param downstream The downstream filter or router.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
setDownstream(MXS_FILTER *instance, void *session, DOWNSTREAM *downstream)
|
setDownstream(MXS_FILTER *instance, MXS_FILTER_SESSION *session, DOWNSTREAM *downstream)
|
||||||
{
|
{
|
||||||
MQ_SESSION *my_session = (MQ_SESSION *) session;
|
MQ_SESSION *my_session = (MQ_SESSION *) session;
|
||||||
my_session->down = *downstream;
|
my_session->down = *downstream;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setUpstream(MXS_FILTER *instance, void *session, UPSTREAM *upstream)
|
static void setUpstream(MXS_FILTER *instance, MXS_FILTER_SESSION *session, UPSTREAM *upstream)
|
||||||
{
|
{
|
||||||
MQ_SESSION *my_session = (MQ_SESSION *) session;
|
MQ_SESSION *my_session = (MQ_SESSION *) session;
|
||||||
my_session->up = *upstream;
|
my_session->up = *upstream;
|
||||||
@ -931,7 +931,7 @@ unsigned int pktlen(void* c)
|
|||||||
* @param queue The query data
|
* @param queue The query data
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
routeQuery(MXS_FILTER *instance, void *session, GWBUF *queue)
|
routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *session, GWBUF *queue)
|
||||||
{
|
{
|
||||||
MQ_SESSION *my_session = (MQ_SESSION *) session;
|
MQ_SESSION *my_session = (MQ_SESSION *) session;
|
||||||
MQ_INSTANCE *my_instance = (MQ_INSTANCE *) instance;
|
MQ_INSTANCE *my_instance = (MQ_INSTANCE *) instance;
|
||||||
@ -1346,7 +1346,7 @@ unsigned int is_eof(void* p)
|
|||||||
* @param session The filter session
|
* @param session The filter session
|
||||||
* @param reply The response data
|
* @param reply The response data
|
||||||
*/
|
*/
|
||||||
static int clientReply(MXS_FILTER* instance, void *session, GWBUF *reply)
|
static int clientReply(MXS_FILTER* instance, MXS_FILTER_SESSION *session, GWBUF *reply)
|
||||||
{
|
{
|
||||||
MQ_SESSION *my_session = (MQ_SESSION *) session;
|
MQ_SESSION *my_session = (MQ_SESSION *) session;
|
||||||
MQ_INSTANCE *my_instance = (MQ_INSTANCE *) instance;
|
MQ_INSTANCE *my_instance = (MQ_INSTANCE *) instance;
|
||||||
@ -1491,7 +1491,7 @@ static int clientReply(MXS_FILTER* instance, void *session, GWBUF *reply)
|
|||||||
* @param dcb The DCB for diagnostic output
|
* @param dcb The DCB for diagnostic output
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
diagnostic(MXS_FILTER *instance, void *fsession, DCB *dcb)
|
diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb)
|
||||||
{
|
{
|
||||||
MQ_INSTANCE *my_instance = (MQ_INSTANCE *) instance;
|
MQ_INSTANCE *my_instance = (MQ_INSTANCE *) instance;
|
||||||
|
|
||||||
|
@ -41,12 +41,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static MXS_FILTER *createInstance(const char *name, char **options, CONFIG_PARAMETER *params);
|
static MXS_FILTER *createInstance(const char *name, char **options, CONFIG_PARAMETER *params);
|
||||||
static void *newSession(MXS_FILTER *instance, SESSION *session);
|
static MXS_FILTER_SESSION *newSession(MXS_FILTER *instance, SESSION *session);
|
||||||
static void closeSession(MXS_FILTER *instance, void *session);
|
static void closeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session);
|
||||||
static void freeSession(MXS_FILTER *instance, void *session);
|
static void freeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session);
|
||||||
static void setDownstream(MXS_FILTER *instance, void *fsession, DOWNSTREAM *downstream);
|
static void setDownstream(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DOWNSTREAM *downstream);
|
||||||
static int routeQuery(MXS_FILTER *instance, void *fsession, GWBUF *queue);
|
static int routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, GWBUF *queue);
|
||||||
static void diagnostic(MXS_FILTER *instance, void *fsession, DCB *dcb);
|
static void diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb);
|
||||||
static uint64_t getCapabilities(void);
|
static uint64_t getCapabilities(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -194,7 +194,7 @@ createInstance(const char *name, char **options, CONFIG_PARAMETER *params)
|
|||||||
* @param session The session itself
|
* @param session The session itself
|
||||||
* @return Session specific data for this session
|
* @return Session specific data for this session
|
||||||
*/
|
*/
|
||||||
static void *
|
static MXS_FILTER_SESSION *
|
||||||
newSession(MXS_FILTER *instance, SESSION *session)
|
newSession(MXS_FILTER *instance, SESSION *session)
|
||||||
{
|
{
|
||||||
REGEXHINT_INSTANCE *my_instance = (REGEXHINT_INSTANCE *) instance;
|
REGEXHINT_INSTANCE *my_instance = (REGEXHINT_INSTANCE *) instance;
|
||||||
@ -222,7 +222,7 @@ newSession(MXS_FILTER *instance, SESSION *session)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return my_session;
|
return (MXS_FILTER_SESSION*)my_session;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -233,7 +233,7 @@ newSession(MXS_FILTER *instance, SESSION *session)
|
|||||||
* @param session The session being closed
|
* @param session The session being closed
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
closeSession(MXS_FILTER *instance, void *session)
|
closeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -244,7 +244,7 @@ closeSession(MXS_FILTER *instance, void *session)
|
|||||||
* @param session The session being closed
|
* @param session The session being closed
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
freeSession(MXS_FILTER *instance, void *session)
|
freeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session)
|
||||||
{
|
{
|
||||||
MXS_FREE(session);
|
MXS_FREE(session);
|
||||||
return;
|
return;
|
||||||
@ -258,7 +258,7 @@ freeSession(MXS_FILTER *instance, void *session)
|
|||||||
* @param downstream The downstream filter or router
|
* @param downstream The downstream filter or router
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
setDownstream(MXS_FILTER *instance, void *session, DOWNSTREAM *downstream)
|
setDownstream(MXS_FILTER *instance, MXS_FILTER_SESSION *session, DOWNSTREAM *downstream)
|
||||||
{
|
{
|
||||||
REGEXHINT_SESSION *my_session = (REGEXHINT_SESSION *) session;
|
REGEXHINT_SESSION *my_session = (REGEXHINT_SESSION *) session;
|
||||||
my_session->down = *downstream;
|
my_session->down = *downstream;
|
||||||
@ -279,7 +279,7 @@ setDownstream(MXS_FILTER *instance, void *session, DOWNSTREAM *downstream)
|
|||||||
* @param queue The query data
|
* @param queue The query data
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
routeQuery(MXS_FILTER *instance, void *session, GWBUF *queue)
|
routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *session, GWBUF *queue)
|
||||||
{
|
{
|
||||||
REGEXHINT_INSTANCE *my_instance = (REGEXHINT_INSTANCE *) instance;
|
REGEXHINT_INSTANCE *my_instance = (REGEXHINT_INSTANCE *) instance;
|
||||||
REGEXHINT_SESSION *my_session = (REGEXHINT_SESSION *) session;
|
REGEXHINT_SESSION *my_session = (REGEXHINT_SESSION *) session;
|
||||||
@ -319,7 +319,7 @@ routeQuery(MXS_FILTER *instance, void *session, GWBUF *queue)
|
|||||||
* @param dcb The DCB for diagnostic output
|
* @param dcb The DCB for diagnostic output
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
diagnostic(MXS_FILTER *instance, void *fsession, DCB *dcb)
|
diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb)
|
||||||
{
|
{
|
||||||
REGEXHINT_INSTANCE *my_instance = (REGEXHINT_INSTANCE *) instance;
|
REGEXHINT_INSTANCE *my_instance = (REGEXHINT_INSTANCE *) instance;
|
||||||
REGEXHINT_SESSION *my_session = (REGEXHINT_SESSION *) fsession;
|
REGEXHINT_SESSION *my_session = (REGEXHINT_SESSION *) fsession;
|
||||||
|
@ -74,12 +74,12 @@ enum log_options
|
|||||||
* The filter entry points
|
* The filter entry points
|
||||||
*/
|
*/
|
||||||
static MXS_FILTER *createInstance(const char *name, char **options, CONFIG_PARAMETER *);
|
static MXS_FILTER *createInstance(const char *name, char **options, CONFIG_PARAMETER *);
|
||||||
static void *newSession(MXS_FILTER *instance, SESSION *session);
|
static MXS_FILTER_SESSION *newSession(MXS_FILTER *instance, SESSION *session);
|
||||||
static void closeSession(MXS_FILTER *instance, void *session);
|
static void closeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session);
|
||||||
static void freeSession(MXS_FILTER *instance, void *session);
|
static void freeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session);
|
||||||
static void setDownstream(MXS_FILTER *instance, void *fsession, DOWNSTREAM *downstream);
|
static void setDownstream(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DOWNSTREAM *downstream);
|
||||||
static int routeQuery(MXS_FILTER *instance, void *fsession, GWBUF *queue);
|
static int routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, GWBUF *queue);
|
||||||
static void diagnostic(MXS_FILTER *instance, void *fsession, DCB *dcb);
|
static void diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb);
|
||||||
static uint64_t getCapabilities(void);
|
static uint64_t getCapabilities(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -376,7 +376,7 @@ createInstance(const char *name, char **options, CONFIG_PARAMETER *params)
|
|||||||
* @param session The session itself
|
* @param session The session itself
|
||||||
* @return Session specific data for this session
|
* @return Session specific data for this session
|
||||||
*/
|
*/
|
||||||
static void *
|
static MXS_FILTER_SESSION *
|
||||||
newSession(MXS_FILTER *instance, SESSION *session)
|
newSession(MXS_FILTER *instance, SESSION *session)
|
||||||
{
|
{
|
||||||
QLA_INSTANCE *my_instance = (QLA_INSTANCE *) instance;
|
QLA_INSTANCE *my_instance = (QLA_INSTANCE *) instance;
|
||||||
@ -436,7 +436,7 @@ newSession(MXS_FILTER *instance, SESSION *session)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return my_session;
|
return (MXS_FILTER_SESSION*)my_session;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -448,7 +448,7 @@ newSession(MXS_FILTER *instance, SESSION *session)
|
|||||||
* @param session The session being closed
|
* @param session The session being closed
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
closeSession(MXS_FILTER *instance, void *session)
|
closeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session)
|
||||||
{
|
{
|
||||||
QLA_SESSION *my_session = (QLA_SESSION *) session;
|
QLA_SESSION *my_session = (QLA_SESSION *) session;
|
||||||
|
|
||||||
@ -465,7 +465,7 @@ closeSession(MXS_FILTER *instance, void *session)
|
|||||||
* @param session The filter session
|
* @param session The filter session
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
freeSession(MXS_FILTER *instance, void *session)
|
freeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session)
|
||||||
{
|
{
|
||||||
QLA_SESSION *my_session = (QLA_SESSION *) session;
|
QLA_SESSION *my_session = (QLA_SESSION *) session;
|
||||||
|
|
||||||
@ -483,7 +483,7 @@ freeSession(MXS_FILTER *instance, void *session)
|
|||||||
* @param downstream The downstream filter or router.
|
* @param downstream The downstream filter or router.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
setDownstream(MXS_FILTER *instance, void *session, DOWNSTREAM *downstream)
|
setDownstream(MXS_FILTER *instance, MXS_FILTER_SESSION *session, DOWNSTREAM *downstream)
|
||||||
{
|
{
|
||||||
QLA_SESSION *my_session = (QLA_SESSION *) session;
|
QLA_SESSION *my_session = (QLA_SESSION *) session;
|
||||||
|
|
||||||
@ -501,7 +501,7 @@ setDownstream(MXS_FILTER *instance, void *session, DOWNSTREAM *downstream)
|
|||||||
* @param queue The query data
|
* @param queue The query data
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
routeQuery(MXS_FILTER *instance, void *session, GWBUF *queue)
|
routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *session, GWBUF *queue)
|
||||||
{
|
{
|
||||||
QLA_INSTANCE *my_instance = (QLA_INSTANCE *) instance;
|
QLA_INSTANCE *my_instance = (QLA_INSTANCE *) instance;
|
||||||
QLA_SESSION *my_session = (QLA_SESSION *) session;
|
QLA_SESSION *my_session = (QLA_SESSION *) session;
|
||||||
@ -580,7 +580,7 @@ routeQuery(MXS_FILTER *instance, void *session, GWBUF *queue)
|
|||||||
* @param dcb The DCB for diagnostic output
|
* @param dcb The DCB for diagnostic output
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
diagnostic(MXS_FILTER *instance, void *fsession, DCB *dcb)
|
diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb)
|
||||||
{
|
{
|
||||||
QLA_INSTANCE *my_instance = (QLA_INSTANCE *) instance;
|
QLA_INSTANCE *my_instance = (QLA_INSTANCE *) instance;
|
||||||
QLA_SESSION *my_session = (QLA_SESSION *) fsession;
|
QLA_SESSION *my_session = (QLA_SESSION *) fsession;
|
||||||
|
@ -41,12 +41,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static MXS_FILTER *createInstance(const char *name, char **options, CONFIG_PARAMETER *params);
|
static MXS_FILTER *createInstance(const char *name, char **options, CONFIG_PARAMETER *params);
|
||||||
static void *newSession(MXS_FILTER *instance, SESSION *session);
|
static MXS_FILTER_SESSION *newSession(MXS_FILTER *instance, SESSION *session);
|
||||||
static void closeSession(MXS_FILTER *instance, void *session);
|
static void closeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session);
|
||||||
static void freeSession(MXS_FILTER *instance, void *session);
|
static void freeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session);
|
||||||
static void setDownstream(MXS_FILTER *instance, void *fsession, DOWNSTREAM *downstream);
|
static void setDownstream(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DOWNSTREAM *downstream);
|
||||||
static int routeQuery(MXS_FILTER *instance, void *fsession, GWBUF *queue);
|
static int routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, GWBUF *queue);
|
||||||
static void diagnostic(MXS_FILTER *instance, void *fsession, DCB *dcb);
|
static void diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb);
|
||||||
static uint64_t getCapabilities(void);
|
static uint64_t getCapabilities(void);
|
||||||
|
|
||||||
static char *regex_replace(const char *sql, pcre2_code *re, pcre2_match_data *study,
|
static char *regex_replace(const char *sql, pcre2_code *re, pcre2_match_data *study,
|
||||||
@ -244,7 +244,7 @@ createInstance(const char *name, char **options, CONFIG_PARAMETER *params)
|
|||||||
* @param session The session itself
|
* @param session The session itself
|
||||||
* @return Session specific data for this session
|
* @return Session specific data for this session
|
||||||
*/
|
*/
|
||||||
static void *
|
static MXS_FILTER_SESSION *
|
||||||
newSession(MXS_FILTER *instance, SESSION *session)
|
newSession(MXS_FILTER *instance, SESSION *session)
|
||||||
{
|
{
|
||||||
REGEX_INSTANCE *my_instance = (REGEX_INSTANCE *) instance;
|
REGEX_INSTANCE *my_instance = (REGEX_INSTANCE *) instance;
|
||||||
@ -272,7 +272,7 @@ newSession(MXS_FILTER *instance, SESSION *session)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return my_session;
|
return (MXS_FILTER_SESSION*)my_session;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -283,7 +283,7 @@ newSession(MXS_FILTER *instance, SESSION *session)
|
|||||||
* @param session The session being closed
|
* @param session The session being closed
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
closeSession(MXS_FILTER *instance, void *session)
|
closeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -294,7 +294,7 @@ closeSession(MXS_FILTER *instance, void *session)
|
|||||||
* @param session The session being closed
|
* @param session The session being closed
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
freeSession(MXS_FILTER *instance, void *session)
|
freeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session)
|
||||||
{
|
{
|
||||||
MXS_FREE(session);
|
MXS_FREE(session);
|
||||||
return;
|
return;
|
||||||
@ -308,7 +308,7 @@ freeSession(MXS_FILTER *instance, void *session)
|
|||||||
* @param downstream The downstream filter or router
|
* @param downstream The downstream filter or router
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
setDownstream(MXS_FILTER *instance, void *session, DOWNSTREAM *downstream)
|
setDownstream(MXS_FILTER *instance, MXS_FILTER_SESSION *session, DOWNSTREAM *downstream)
|
||||||
{
|
{
|
||||||
REGEX_SESSION *my_session = (REGEX_SESSION *) session;
|
REGEX_SESSION *my_session = (REGEX_SESSION *) session;
|
||||||
my_session->down = *downstream;
|
my_session->down = *downstream;
|
||||||
@ -325,7 +325,7 @@ setDownstream(MXS_FILTER *instance, void *session, DOWNSTREAM *downstream)
|
|||||||
* @param queue The query data
|
* @param queue The query data
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
routeQuery(MXS_FILTER *instance, void *session, GWBUF *queue)
|
routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *session, GWBUF *queue)
|
||||||
{
|
{
|
||||||
REGEX_INSTANCE *my_instance = (REGEX_INSTANCE *) instance;
|
REGEX_INSTANCE *my_instance = (REGEX_INSTANCE *) instance;
|
||||||
REGEX_SESSION *my_session = (REGEX_SESSION *) session;
|
REGEX_SESSION *my_session = (REGEX_SESSION *) session;
|
||||||
@ -376,7 +376,7 @@ routeQuery(MXS_FILTER *instance, void *session, GWBUF *queue)
|
|||||||
* @param dcb The DCB for diagnostic output
|
* @param dcb The DCB for diagnostic output
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
diagnostic(MXS_FILTER *instance, void *fsession, DCB *dcb)
|
diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb)
|
||||||
{
|
{
|
||||||
REGEX_INSTANCE *my_instance = (REGEX_INSTANCE *) instance;
|
REGEX_INSTANCE *my_instance = (REGEX_INSTANCE *) instance;
|
||||||
REGEX_SESSION *my_session = (REGEX_SESSION *) fsession;
|
REGEX_SESSION *my_session = (REGEX_SESSION *) fsession;
|
||||||
|
@ -98,14 +98,14 @@ static unsigned char required_packets[] =
|
|||||||
* The filter entry points
|
* The filter entry points
|
||||||
*/
|
*/
|
||||||
static MXS_FILTER *createInstance(const char* name, char **options, CONFIG_PARAMETER *);
|
static MXS_FILTER *createInstance(const char* name, char **options, CONFIG_PARAMETER *);
|
||||||
static void *newSession(MXS_FILTER *instance, SESSION *session);
|
static MXS_FILTER_SESSION *newSession(MXS_FILTER *instance, SESSION *session);
|
||||||
static void closeSession(MXS_FILTER *instance, void *session);
|
static void closeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session);
|
||||||
static void freeSession(MXS_FILTER *instance, void *session);
|
static void freeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session);
|
||||||
static void setDownstream(MXS_FILTER *instance, void *fsession, DOWNSTREAM *downstream);
|
static void setDownstream(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DOWNSTREAM *downstream);
|
||||||
static void setUpstream(MXS_FILTER *instance, void *fsession, UPSTREAM *upstream);
|
static void setUpstream(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, UPSTREAM *upstream);
|
||||||
static int routeQuery(MXS_FILTER *instance, void *fsession, GWBUF *queue);
|
static int routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, GWBUF *queue);
|
||||||
static int clientReply(MXS_FILTER *instance, void *fsession, GWBUF *queue);
|
static int clientReply(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, GWBUF *queue);
|
||||||
static void diagnostic(MXS_FILTER *instance, void *fsession, DCB *dcb);
|
static void diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb);
|
||||||
static uint64_t getCapabilities(void);
|
static uint64_t getCapabilities(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -417,7 +417,7 @@ createInstance(const char *name, char **options, CONFIG_PARAMETER *params)
|
|||||||
* @param session The session itself
|
* @param session The session itself
|
||||||
* @return Session specific data for this session
|
* @return Session specific data for this session
|
||||||
*/
|
*/
|
||||||
static void *
|
static MXS_FILTER_SESSION *
|
||||||
newSession(MXS_FILTER *instance, SESSION *session)
|
newSession(MXS_FILTER *instance, SESSION *session)
|
||||||
{
|
{
|
||||||
TEE_INSTANCE *my_instance = (TEE_INSTANCE *) instance;
|
TEE_INSTANCE *my_instance = (TEE_INSTANCE *) instance;
|
||||||
@ -481,7 +481,7 @@ newSession(MXS_FILTER *instance, SESSION *session)
|
|||||||
SESSION* ses;
|
SESSION* ses;
|
||||||
if ((dcb = dcb_clone(session->client_dcb)) == NULL)
|
if ((dcb = dcb_clone(session->client_dcb)) == NULL)
|
||||||
{
|
{
|
||||||
freeSession(instance, (void *) my_session);
|
freeSession(instance, (MXS_FILTER_SESSION *) my_session);
|
||||||
my_session = NULL;
|
my_session = NULL;
|
||||||
|
|
||||||
MXS_ERROR("Creating client DCB for Tee "
|
MXS_ERROR("Creating client DCB for Tee "
|
||||||
@ -493,7 +493,7 @@ newSession(MXS_FILTER *instance, SESSION *session)
|
|||||||
if ((ses = session_alloc(my_instance->service, dcb)) == NULL)
|
if ((ses = session_alloc(my_instance->service, dcb)) == NULL)
|
||||||
{
|
{
|
||||||
dcb_close(dcb);
|
dcb_close(dcb);
|
||||||
freeSession(instance, (void *) my_session);
|
freeSession(instance, (MXS_FILTER_SESSION *) my_session);
|
||||||
my_session = NULL;
|
my_session = NULL;
|
||||||
MXS_ERROR("Creating client session for Tee "
|
MXS_ERROR("Creating client session for Tee "
|
||||||
"filter failed. Terminating session.");
|
"filter failed. Terminating session.");
|
||||||
@ -508,7 +508,7 @@ newSession(MXS_FILTER *instance, SESSION *session)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
retblock:
|
retblock:
|
||||||
return my_session;
|
return (MXS_FILTER_SESSION*)my_session;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -521,7 +521,7 @@ retblock:
|
|||||||
* @param session The session being closed
|
* @param session The session being closed
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
closeSession(MXS_FILTER *instance, void *session)
|
closeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session)
|
||||||
{
|
{
|
||||||
TEE_SESSION *my_session = (TEE_SESSION *) session;
|
TEE_SESSION *my_session = (TEE_SESSION *) session;
|
||||||
ROUTER_OBJECT *router;
|
ROUTER_OBJECT *router;
|
||||||
@ -579,7 +579,7 @@ closeSession(MXS_FILTER *instance, void *session)
|
|||||||
* @param session The filter session
|
* @param session The filter session
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
freeSession(MXS_FILTER *instance, void *session)
|
freeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session)
|
||||||
{
|
{
|
||||||
TEE_SESSION *my_session = (TEE_SESSION *) session;
|
TEE_SESSION *my_session = (TEE_SESSION *) session;
|
||||||
SESSION* ses = my_session->branch_session;
|
SESSION* ses = my_session->branch_session;
|
||||||
@ -636,7 +636,7 @@ freeSession(MXS_FILTER *instance, void *session)
|
|||||||
* @param downstream The downstream filter or router.
|
* @param downstream The downstream filter or router.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
setDownstream(MXS_FILTER *instance, void *session, DOWNSTREAM *downstream)
|
setDownstream(MXS_FILTER *instance, MXS_FILTER_SESSION *session, DOWNSTREAM *downstream)
|
||||||
{
|
{
|
||||||
TEE_SESSION *my_session = (TEE_SESSION *) session;
|
TEE_SESSION *my_session = (TEE_SESSION *) session;
|
||||||
my_session->down = *downstream;
|
my_session->down = *downstream;
|
||||||
@ -651,7 +651,7 @@ setDownstream(MXS_FILTER *instance, void *session, DOWNSTREAM *downstream)
|
|||||||
* @param downstream The downstream filter or router.
|
* @param downstream The downstream filter or router.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
setUpstream(MXS_FILTER *instance, void *session, UPSTREAM *upstream)
|
setUpstream(MXS_FILTER *instance, MXS_FILTER_SESSION *session, UPSTREAM *upstream)
|
||||||
{
|
{
|
||||||
TEE_SESSION *my_session = (TEE_SESSION *) session;
|
TEE_SESSION *my_session = (TEE_SESSION *) session;
|
||||||
my_session->up = *upstream;
|
my_session->up = *upstream;
|
||||||
@ -676,7 +676,7 @@ setUpstream(MXS_FILTER *instance, void *session, UPSTREAM *upstream)
|
|||||||
* @param queue The query data
|
* @param queue The query data
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
routeQuery(MXS_FILTER *instance, void *session, GWBUF *queue)
|
routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *session, GWBUF *queue)
|
||||||
{
|
{
|
||||||
TEE_INSTANCE *my_instance = (TEE_INSTANCE *) instance;
|
TEE_INSTANCE *my_instance = (TEE_INSTANCE *) instance;
|
||||||
TEE_SESSION *my_session = (TEE_SESSION *) session;
|
TEE_SESSION *my_session = (TEE_SESSION *) session;
|
||||||
@ -696,7 +696,7 @@ routeQuery(MXS_FILTER *instance, void *session, GWBUF *queue)
|
|||||||
* @param reply The response data
|
* @param reply The response data
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
clientReply(MXS_FILTER* instance, void *session, GWBUF *reply)
|
clientReply(MXS_FILTER* instance, MXS_FILTER_SESSION *session, GWBUF *reply)
|
||||||
{
|
{
|
||||||
int rc = 1, branch, eof;
|
int rc = 1, branch, eof;
|
||||||
TEE_SESSION *my_session = (TEE_SESSION *) session;
|
TEE_SESSION *my_session = (TEE_SESSION *) session;
|
||||||
@ -718,7 +718,7 @@ clientReply(MXS_FILTER* instance, void *session, GWBUF *reply)
|
|||||||
* @param dcb The DCB for diagnostic output
|
* @param dcb The DCB for diagnostic output
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
diagnostic(MXS_FILTER *instance, void *fsession, DCB *dcb)
|
diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb)
|
||||||
{
|
{
|
||||||
TEE_INSTANCE *my_instance = (TEE_INSTANCE *) instance;
|
TEE_INSTANCE *my_instance = (TEE_INSTANCE *) instance;
|
||||||
TEE_SESSION *my_session = (TEE_SESSION *) fsession;
|
TEE_SESSION *my_session = (TEE_SESSION *) fsession;
|
||||||
|
@ -31,12 +31,12 @@
|
|||||||
|
|
||||||
|
|
||||||
static MXS_FILTER *createInstance(const char *name, char **options, CONFIG_PARAMETER *params);
|
static MXS_FILTER *createInstance(const char *name, char **options, CONFIG_PARAMETER *params);
|
||||||
static void *newSession(MXS_FILTER *instance, SESSION *session);
|
static MXS_FILTER_SESSION *newSession(MXS_FILTER *instance, SESSION *session);
|
||||||
static void closeSession(MXS_FILTER *instance, void *session);
|
static void closeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session);
|
||||||
static void freeSession(MXS_FILTER *instance, void *session);
|
static void freeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session);
|
||||||
static void setDownstream(MXS_FILTER *instance, void *fsession, DOWNSTREAM *downstream);
|
static void setDownstream(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DOWNSTREAM *downstream);
|
||||||
static int routeQuery(MXS_FILTER *instance, void *fsession, GWBUF *queue);
|
static int routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, GWBUF *queue);
|
||||||
static void diagnostic(MXS_FILTER *instance, void *fsession, DCB *dcb);
|
static void diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb);
|
||||||
static uint64_t getCapabilities(void);
|
static uint64_t getCapabilities(void);
|
||||||
static void destroyInstance(MXS_FILTER *instance);
|
static void destroyInstance(MXS_FILTER *instance);
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ createInstance(const char *name, char **options, CONFIG_PARAMETER *params)
|
|||||||
* @param session The session itself
|
* @param session The session itself
|
||||||
* @return Session specific data for this session
|
* @return Session specific data for this session
|
||||||
*/
|
*/
|
||||||
static void *
|
static MXS_FILTER_SESSION *
|
||||||
newSession(MXS_FILTER *instance, SESSION *session)
|
newSession(MXS_FILTER *instance, SESSION *session)
|
||||||
{
|
{
|
||||||
TEST_INSTANCE *my_instance = (TEST_INSTANCE *)instance;
|
TEST_INSTANCE *my_instance = (TEST_INSTANCE *)instance;
|
||||||
@ -148,7 +148,7 @@ newSession(MXS_FILTER *instance, SESSION *session)
|
|||||||
my_session->count = 0;
|
my_session->count = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return my_session;
|
return (MXS_FILTER_SESSION*)my_session;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -159,7 +159,7 @@ newSession(MXS_FILTER *instance, SESSION *session)
|
|||||||
* @param session The session being closed
|
* @param session The session being closed
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
closeSession(MXS_FILTER *instance, void *session)
|
closeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -170,7 +170,7 @@ closeSession(MXS_FILTER *instance, void *session)
|
|||||||
* @param session The session being closed
|
* @param session The session being closed
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
freeSession(MXS_FILTER *instance, void *session)
|
freeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session)
|
||||||
{
|
{
|
||||||
MXS_FREE(session);
|
MXS_FREE(session);
|
||||||
return;
|
return;
|
||||||
@ -184,7 +184,7 @@ freeSession(MXS_FILTER *instance, void *session)
|
|||||||
* @param downstream The downstream filter or router
|
* @param downstream The downstream filter or router
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
setDownstream(MXS_FILTER *instance, void *session, DOWNSTREAM *downstream)
|
setDownstream(MXS_FILTER *instance, MXS_FILTER_SESSION *session, DOWNSTREAM *downstream)
|
||||||
{
|
{
|
||||||
TEST_SESSION *my_session = (TEST_SESSION *)session;
|
TEST_SESSION *my_session = (TEST_SESSION *)session;
|
||||||
|
|
||||||
@ -202,7 +202,7 @@ setDownstream(MXS_FILTER *instance, void *session, DOWNSTREAM *downstream)
|
|||||||
* @param queue The query data
|
* @param queue The query data
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
routeQuery(MXS_FILTER *instance, void *session, GWBUF *queue)
|
routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *session, GWBUF *queue)
|
||||||
{
|
{
|
||||||
TEST_SESSION *my_session = (TEST_SESSION *)session;
|
TEST_SESSION *my_session = (TEST_SESSION *)session;
|
||||||
|
|
||||||
@ -226,7 +226,7 @@ routeQuery(MXS_FILTER *instance, void *session, GWBUF *queue)
|
|||||||
* @param dcb The DCB for diagnostic output
|
* @param dcb The DCB for diagnostic output
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
diagnostic(MXS_FILTER *instance, void *fsession, DCB *dcb)
|
diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb)
|
||||||
{
|
{
|
||||||
TEST_INSTANCE *my_instance = (TEST_INSTANCE *)instance;
|
TEST_INSTANCE *my_instance = (TEST_INSTANCE *)instance;
|
||||||
TEST_SESSION *my_session = (TEST_SESSION *)fsession;
|
TEST_SESSION *my_session = (TEST_SESSION *)fsession;
|
||||||
|
@ -49,14 +49,14 @@
|
|||||||
* The filter entry points
|
* The filter entry points
|
||||||
*/
|
*/
|
||||||
static MXS_FILTER *createInstance(const char *name, char **options, CONFIG_PARAMETER *);
|
static MXS_FILTER *createInstance(const char *name, char **options, CONFIG_PARAMETER *);
|
||||||
static void *newSession(MXS_FILTER *instance, SESSION *session);
|
static MXS_FILTER_SESSION *newSession(MXS_FILTER *instance, SESSION *session);
|
||||||
static void closeSession(MXS_FILTER *instance, void *session);
|
static void closeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session);
|
||||||
static void freeSession(MXS_FILTER *instance, void *session);
|
static void freeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session);
|
||||||
static void setDownstream(MXS_FILTER *instance, void *fsession, DOWNSTREAM *downstream);
|
static void setDownstream(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DOWNSTREAM *downstream);
|
||||||
static void setUpstream(MXS_FILTER *instance, void *fsession, UPSTREAM *upstream);
|
static void setUpstream(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, UPSTREAM *upstream);
|
||||||
static int routeQuery(MXS_FILTER *instance, void *fsession, GWBUF *queue);
|
static int routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, GWBUF *queue);
|
||||||
static int clientReply(MXS_FILTER *instance, void *fsession, GWBUF *queue);
|
static int clientReply(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, GWBUF *queue);
|
||||||
static void diagnostic(MXS_FILTER *instance, void *fsession, DCB *dcb);
|
static void diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb);
|
||||||
static uint64_t getCapabilities(void);
|
static uint64_t getCapabilities(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -263,7 +263,7 @@ createInstance(const char *name, char **options, CONFIG_PARAMETER *params)
|
|||||||
* @param session The session itself
|
* @param session The session itself
|
||||||
* @return Session specific data for this session
|
* @return Session specific data for this session
|
||||||
*/
|
*/
|
||||||
static void *
|
static MXS_FILTER_SESSION *
|
||||||
newSession(MXS_FILTER *instance, SESSION *session)
|
newSession(MXS_FILTER *instance, SESSION *session)
|
||||||
{
|
{
|
||||||
TOPN_INSTANCE *my_instance = (TOPN_INSTANCE *) instance;
|
TOPN_INSTANCE *my_instance = (TOPN_INSTANCE *) instance;
|
||||||
@ -328,7 +328,7 @@ newSession(MXS_FILTER *instance, SESSION *session)
|
|||||||
gettimeofday(&my_session->connect, NULL);
|
gettimeofday(&my_session->connect, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
return my_session;
|
return (MXS_FILTER_SESSION*)my_session;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -340,7 +340,7 @@ newSession(MXS_FILTER *instance, SESSION *session)
|
|||||||
* @param session The session being closed
|
* @param session The session being closed
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
closeSession(MXS_FILTER *instance, void *session)
|
closeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session)
|
||||||
{
|
{
|
||||||
TOPN_INSTANCE *my_instance = (TOPN_INSTANCE *) instance;
|
TOPN_INSTANCE *my_instance = (TOPN_INSTANCE *) instance;
|
||||||
TOPN_SESSION *my_session = (TOPN_SESSION *) session;
|
TOPN_SESSION *my_session = (TOPN_SESSION *) session;
|
||||||
@ -408,7 +408,7 @@ closeSession(MXS_FILTER *instance, void *session)
|
|||||||
* @param session The filter session
|
* @param session The filter session
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
freeSession(MXS_FILTER *instance, void *session)
|
freeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session)
|
||||||
{
|
{
|
||||||
TOPN_SESSION *my_session = (TOPN_SESSION *) session;
|
TOPN_SESSION *my_session = (TOPN_SESSION *) session;
|
||||||
|
|
||||||
@ -426,7 +426,7 @@ freeSession(MXS_FILTER *instance, void *session)
|
|||||||
* @param downstream The downstream filter or router.
|
* @param downstream The downstream filter or router.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
setDownstream(MXS_FILTER *instance, void *session, DOWNSTREAM *downstream)
|
setDownstream(MXS_FILTER *instance, MXS_FILTER_SESSION *session, DOWNSTREAM *downstream)
|
||||||
{
|
{
|
||||||
TOPN_SESSION *my_session = (TOPN_SESSION *) session;
|
TOPN_SESSION *my_session = (TOPN_SESSION *) session;
|
||||||
|
|
||||||
@ -442,7 +442,7 @@ setDownstream(MXS_FILTER *instance, void *session, DOWNSTREAM *downstream)
|
|||||||
* @param upstream The upstream filter or session.
|
* @param upstream The upstream filter or session.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
setUpstream(MXS_FILTER *instance, void *session, UPSTREAM *upstream)
|
setUpstream(MXS_FILTER *instance, MXS_FILTER_SESSION *session, UPSTREAM *upstream)
|
||||||
{
|
{
|
||||||
TOPN_SESSION *my_session = (TOPN_SESSION *) session;
|
TOPN_SESSION *my_session = (TOPN_SESSION *) session;
|
||||||
|
|
||||||
@ -460,7 +460,7 @@ setUpstream(MXS_FILTER *instance, void *session, UPSTREAM *upstream)
|
|||||||
* @param queue The query data
|
* @param queue The query data
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
routeQuery(MXS_FILTER *instance, void *session, GWBUF *queue)
|
routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *session, GWBUF *queue)
|
||||||
{
|
{
|
||||||
TOPN_INSTANCE *my_instance = (TOPN_INSTANCE *) instance;
|
TOPN_INSTANCE *my_instance = (TOPN_INSTANCE *) instance;
|
||||||
TOPN_SESSION *my_session = (TOPN_SESSION *) session;
|
TOPN_SESSION *my_session = (TOPN_SESSION *) session;
|
||||||
@ -508,7 +508,7 @@ cmp_topn(const void *va, const void *vb)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
clientReply(MXS_FILTER *instance, void *session, GWBUF *reply)
|
clientReply(MXS_FILTER *instance, MXS_FILTER_SESSION *session, GWBUF *reply)
|
||||||
{
|
{
|
||||||
TOPN_INSTANCE *my_instance = (TOPN_INSTANCE *) instance;
|
TOPN_INSTANCE *my_instance = (TOPN_INSTANCE *) instance;
|
||||||
TOPN_SESSION *my_session = (TOPN_SESSION *) session;
|
TOPN_SESSION *my_session = (TOPN_SESSION *) session;
|
||||||
@ -573,7 +573,7 @@ clientReply(MXS_FILTER *instance, void *session, GWBUF *reply)
|
|||||||
* @param dcb The DCB for diagnostic output
|
* @param dcb The DCB for diagnostic output
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
diagnostic(MXS_FILTER *instance, void *fsession, DCB *dcb)
|
diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb)
|
||||||
{
|
{
|
||||||
TOPN_INSTANCE *my_instance = (TOPN_INSTANCE *) instance;
|
TOPN_INSTANCE *my_instance = (TOPN_INSTANCE *) instance;
|
||||||
TOPN_SESSION *my_session = (TOPN_SESSION *) fsession;
|
TOPN_SESSION *my_session = (TOPN_SESSION *) fsession;
|
||||||
|
@ -76,14 +76,14 @@ static const int default_sql_size = 4 * 1024;
|
|||||||
* The filter entry points
|
* The filter entry points
|
||||||
*/
|
*/
|
||||||
static MXS_FILTER *createInstance(const char *name, char **options, CONFIG_PARAMETER *);
|
static MXS_FILTER *createInstance(const char *name, char **options, CONFIG_PARAMETER *);
|
||||||
static void *newSession(MXS_FILTER *instance, SESSION *session);
|
static MXS_FILTER_SESSION *newSession(MXS_FILTER *instance, SESSION *session);
|
||||||
static void closeSession(MXS_FILTER *instance, void *session);
|
static void closeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session);
|
||||||
static void freeSession(MXS_FILTER *instance, void *session);
|
static void freeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session);
|
||||||
static void setDownstream(MXS_FILTER *instance, void *fsession, DOWNSTREAM *downstream);
|
static void setDownstream(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DOWNSTREAM *downstream);
|
||||||
static void setUpstream(MXS_FILTER *instance, void *fsession, UPSTREAM *upstream);
|
static void setUpstream(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, UPSTREAM *upstream);
|
||||||
static int routeQuery(MXS_FILTER *instance, void *fsession, GWBUF *queue);
|
static int routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, GWBUF *queue);
|
||||||
static int clientReply(MXS_FILTER *instance, void *fsession, GWBUF *queue);
|
static int clientReply(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, GWBUF *queue);
|
||||||
static void diagnostic(MXS_FILTER *instance, void *fsession, DCB *dcb);
|
static void diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb);
|
||||||
static uint64_t getCapabilities(void);
|
static uint64_t getCapabilities(void);
|
||||||
static void checkNamedPipe(void *args);
|
static void checkNamedPipe(void *args);
|
||||||
|
|
||||||
@ -293,7 +293,7 @@ createInstance(const char *name, char **options, CONFIG_PARAMETER *params)
|
|||||||
* @param session The session itself
|
* @param session The session itself
|
||||||
* @return Session specific data for this session
|
* @return Session specific data for this session
|
||||||
*/
|
*/
|
||||||
static void *
|
static MXS_FILTER_SESSION *
|
||||||
newSession(MXS_FILTER *instance, SESSION *session)
|
newSession(MXS_FILTER *instance, SESSION *session)
|
||||||
{
|
{
|
||||||
TPM_INSTANCE *my_instance = (TPM_INSTANCE *)instance;
|
TPM_INSTANCE *my_instance = (TPM_INSTANCE *)instance;
|
||||||
@ -342,7 +342,7 @@ newSession(MXS_FILTER *instance, SESSION *session)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return my_session;
|
return (MXS_FILTER_SESSION*)my_session;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -353,7 +353,7 @@ newSession(MXS_FILTER *instance, SESSION *session)
|
|||||||
* @param session The session being closed
|
* @param session The session being closed
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
closeSession(MXS_FILTER *instance, void *session)
|
closeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session)
|
||||||
{
|
{
|
||||||
TPM_SESSION *my_session = (TPM_SESSION *)session;
|
TPM_SESSION *my_session = (TPM_SESSION *)session;
|
||||||
TPM_INSTANCE *my_instance = (TPM_INSTANCE *)instance;
|
TPM_INSTANCE *my_instance = (TPM_INSTANCE *)instance;
|
||||||
@ -372,7 +372,7 @@ closeSession(MXS_FILTER *instance, void *session)
|
|||||||
* @param session The filter session
|
* @param session The filter session
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
freeSession(MXS_FILTER *instance, void *session)
|
freeSession(MXS_FILTER *instance, MXS_FILTER_SESSION *session)
|
||||||
{
|
{
|
||||||
TPM_SESSION *my_session = (TPM_SESSION *)session;
|
TPM_SESSION *my_session = (TPM_SESSION *)session;
|
||||||
|
|
||||||
@ -392,7 +392,7 @@ freeSession(MXS_FILTER *instance, void *session)
|
|||||||
* @param downstream The downstream filter or router.
|
* @param downstream The downstream filter or router.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
setDownstream(MXS_FILTER *instance, void *session, DOWNSTREAM *downstream)
|
setDownstream(MXS_FILTER *instance, MXS_FILTER_SESSION *session, DOWNSTREAM *downstream)
|
||||||
{
|
{
|
||||||
TPM_SESSION *my_session = (TPM_SESSION *)session;
|
TPM_SESSION *my_session = (TPM_SESSION *)session;
|
||||||
|
|
||||||
@ -408,7 +408,7 @@ setDownstream(MXS_FILTER *instance, void *session, DOWNSTREAM *downstream)
|
|||||||
* @param upstream The upstream filter or session.
|
* @param upstream The upstream filter or session.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
setUpstream(MXS_FILTER *instance, void *session, UPSTREAM *upstream)
|
setUpstream(MXS_FILTER *instance, MXS_FILTER_SESSION *session, UPSTREAM *upstream)
|
||||||
{
|
{
|
||||||
TPM_SESSION *my_session = (TPM_SESSION *)session;
|
TPM_SESSION *my_session = (TPM_SESSION *)session;
|
||||||
|
|
||||||
@ -426,7 +426,7 @@ setUpstream(MXS_FILTER *instance, void *session, UPSTREAM *upstream)
|
|||||||
* @param queue The query data
|
* @param queue The query data
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
routeQuery(MXS_FILTER *instance, void *session, GWBUF *queue)
|
routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *session, GWBUF *queue)
|
||||||
{
|
{
|
||||||
TPM_INSTANCE *my_instance = (TPM_INSTANCE *)instance;
|
TPM_INSTANCE *my_instance = (TPM_INSTANCE *)instance;
|
||||||
TPM_SESSION *my_session = (TPM_SESSION *)session;
|
TPM_SESSION *my_session = (TPM_SESSION *)session;
|
||||||
@ -516,7 +516,7 @@ retblock:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
clientReply(MXS_FILTER *instance, void *session, GWBUF *reply)
|
clientReply(MXS_FILTER *instance, MXS_FILTER_SESSION *session, GWBUF *reply)
|
||||||
{
|
{
|
||||||
TPM_INSTANCE *my_instance = (TPM_INSTANCE *)instance;
|
TPM_INSTANCE *my_instance = (TPM_INSTANCE *)instance;
|
||||||
TPM_SESSION *my_session = (TPM_SESSION *)session;
|
TPM_SESSION *my_session = (TPM_SESSION *)session;
|
||||||
@ -572,7 +572,7 @@ clientReply(MXS_FILTER *instance, void *session, GWBUF *reply)
|
|||||||
* @param dcb The DCB for diagnostic output
|
* @param dcb The DCB for diagnostic output
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
diagnostic(MXS_FILTER *instance, void *fsession, DCB *dcb)
|
diagnostic(MXS_FILTER *instance, MXS_FILTER_SESSION *fsession, DCB *dcb)
|
||||||
{
|
{
|
||||||
TPM_INSTANCE *my_instance = (TPM_INSTANCE *)instance;
|
TPM_INSTANCE *my_instance = (TPM_INSTANCE *)instance;
|
||||||
TPM_SESSION *my_session = (TPM_SESSION *)fsession;
|
TPM_SESSION *my_session = (TPM_SESSION *)fsession;
|
||||||
|
Reference in New Issue
Block a user