MXS-1725 Use session_set_response() in Cache
- session_set_response() made const correct - set_response() function added to mxs::FilterSession; calls session_set_response(). - Cache uses set_response() for delivering the cache result to the client.
This commit is contained in:
@ -157,6 +157,18 @@ public:
|
||||
protected:
|
||||
FilterSession(MXS_SESSION* pSession);
|
||||
|
||||
/**
|
||||
* To be called by a filter that short-circuits the request processing.
|
||||
* If this function is called (in routeQuery), the filter must return
|
||||
* without passing the request further.
|
||||
*
|
||||
* @param pResponse The response to be sent to the client.
|
||||
*/
|
||||
void set_response(GWBUF* pResponse) const
|
||||
{
|
||||
session_set_response(m_pSession, &m_up.m_data, pResponse);
|
||||
}
|
||||
|
||||
protected:
|
||||
MXS_SESSION* m_pSession; /*< The MXS_SESSION this filter session is associated with. */
|
||||
Downstream m_down; /*< The downstream component. */
|
||||
@ -362,5 +374,4 @@ MXS_FILTER_OBJECT Filter<FilterType, FilterSessionType>::s_object =
|
||||
&Filter<FilterType, FilterSessionType>::destroyInstance,
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user