MXS-1834 Compile all monitors as C++

This commit is contained in:
Johan Wikman
2018-04-27 10:35:31 +03:00
parent 490d8c0963
commit da16ba538d
9 changed files with 56 additions and 35 deletions

View File

@ -1,4 +1,4 @@
add_library(ndbclustermon SHARED ndbclustermon.c)
add_library(ndbclustermon SHARED ndbclustermon.cc)
target_link_libraries(ndbclustermon maxscale-common)
add_dependencies(ndbclustermon pcre2)
set_target_properties(ndbclustermon PROPERTIES VERSION "2.1.0")

View File

@ -38,6 +38,9 @@ bool isNdbEvent(mxs_monitor_event_t event);
extern "C"
{
/**
* The module entry point routine. It is this routine that
* must populate the structure that is referred to as the
@ -91,6 +94,8 @@ MXS_MODULE* MXS_CREATE_MODULE()
return &info;
}
}
/*lint +e14 */
/**
@ -103,7 +108,7 @@ MXS_MODULE* MXS_CREATE_MODULE()
static void *
startMonitor(MXS_MONITOR *mon, const MXS_CONFIG_PARAMETER *params)
{
NDBC_MONITOR *handle = mon->handle;
NDBC_MONITOR *handle = static_cast<NDBC_MONITOR*>(mon->handle);
bool have_events = false, script_error = false;
if (handle != NULL)