MXS-1775 Move thread main function to maxscale::MonitorInstance
This commit is contained in:
@ -119,12 +119,6 @@ void update_server_status(MXS_MONITOR *monitor, MXS_MONITORED_SERVER *database)
|
||||
*
|
||||
* @param arg The MONITOR object for this monitor
|
||||
*/
|
||||
//static
|
||||
void AuroraMonitor::main(void* data)
|
||||
{
|
||||
static_cast<AuroraMonitor*>(data)->main();
|
||||
}
|
||||
|
||||
void AuroraMonitor::main()
|
||||
{
|
||||
if (mysql_thread_init())
|
||||
@ -210,7 +204,7 @@ bool AuroraMonitor::start(const MXS_CONFIG_PARAMETER *params)
|
||||
m_script = config_copy_string(params, "script");
|
||||
m_events = config_get_enum(params, "events", mxs_monitor_event_enum_values);
|
||||
|
||||
if (thread_start(&m_thread, &AuroraMonitor::main, this, 0) == NULL)
|
||||
if (thread_start(&m_thread, &maxscale::MonitorInstance::main, this, 0) == NULL)
|
||||
{
|
||||
MXS_ERROR("Failed to start monitor thread for monitor '%s'.", m_monitor->name);
|
||||
MXS_FREE(m_script);
|
||||
|
@ -38,5 +38,4 @@ private:
|
||||
~AuroraMonitor();
|
||||
|
||||
void main();
|
||||
static void main(void* data);
|
||||
};
|
||||
|
Reference in New Issue
Block a user