MXS-1848 Rename monitorDestroy to monitor_deactivate
MonitorDestroy() (renamed to monitor_destroy()) will be used for
actually destroying the monitor instance, that is, execute
destroyInstance() on the loaded module instance and freeing the
the monitor instance.
TODO: monitor_deactivate() could do all the stuff which is currently
done to the monitor in config_runtime(), instead of just
turning off the flag.
This commit is contained in:
@ -992,7 +992,7 @@ bool runtime_destroy_monitor(MXS_MONITOR *monitor)
|
|||||||
{
|
{
|
||||||
monitorRemoveServer(monitor, monitor->monitored_servers->server);
|
monitorRemoveServer(monitor, monitor->monitored_servers->server);
|
||||||
}
|
}
|
||||||
monitorDestroy(monitor);
|
monitor_deactivate(monitor);
|
||||||
MXS_NOTICE("Destroyed monitor '%s'", monitor->name);
|
MXS_NOTICE("Destroyed monitor '%s'", monitor->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -52,7 +52,17 @@ void monitor_free(MXS_MONITOR *);
|
|||||||
|
|
||||||
void monitorStart(MXS_MONITOR *, const MXS_CONFIG_PARAMETER*);
|
void monitorStart(MXS_MONITOR *, const MXS_CONFIG_PARAMETER*);
|
||||||
void monitorStop(MXS_MONITOR *);
|
void monitorStop(MXS_MONITOR *);
|
||||||
void monitorDestroy(MXS_MONITOR* monitor);
|
|
||||||
|
/**
|
||||||
|
* @brief Mark monitor as deactivated
|
||||||
|
*
|
||||||
|
* A deactivated monitor appears not to exist, as if it had been
|
||||||
|
* destroyed.
|
||||||
|
*
|
||||||
|
* @param monitor
|
||||||
|
*/
|
||||||
|
void monitor_deactivate(MXS_MONITOR* monitor);
|
||||||
|
|
||||||
void monitorStopAll();
|
void monitorStopAll();
|
||||||
void monitorStartAll();
|
void monitorStartAll();
|
||||||
|
|
||||||
|
|||||||
@ -270,7 +270,7 @@ monitorStop(MXS_MONITOR *monitor)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void monitorDestroy(MXS_MONITOR* monitor)
|
void monitor_deactivate(MXS_MONITOR* monitor)
|
||||||
{
|
{
|
||||||
spinlock_acquire(&monLock);
|
spinlock_acquire(&monLock);
|
||||||
monitor->active = false;
|
monitor->active = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user