Fix diagnostics on filter template

Diagnostics can be required on both instance and session level,
so both cases need to be handled explicitly.

In addition, some reinterpret_casts were changed into static_casts.
Reinterpret_cast needs to be used with the instance, which is a
void** but static_cast is sufficient for the session, which is void*.
This commit is contained in:
Johan Wikman
2016-12-13 12:26:00 +02:00
parent aa2de52054
commit 4239182aa0
3 changed files with 28 additions and 10 deletions

View File

@ -223,6 +223,12 @@ CacheFilterSession* CacheFilter::newSession(SESSION* pSession)
return CacheFilterSession::Create(m_sCache.get(), pSession);
}
// static
void CacheFilter::diagnostics(DCB* pDcb)
{
m_sCache->show(pDcb);
}
// static
uint64_t CacheFilter::getCapabilities()
{

View File

@ -29,6 +29,8 @@ public:
CacheFilterSession* newSession(SESSION* pSession);
void diagnostics(DCB* pDcb);
static uint64_t getCapabilities();
private: