Fix improper use of monitorStart
Some uses of monitorStart didn't pass the monitor parameters to the function call. This caused runtime configuration of monitors to not have any parameters as they never got their parameters.
This commit is contained in:
parent
75c257327e
commit
72ea3ad453
@ -2078,45 +2078,7 @@ shutdown_monitor(DCB *dcb, MONITOR *monitor)
|
||||
static void
|
||||
restart_monitor(DCB *dcb, MONITOR *monitor)
|
||||
{
|
||||
monitorStart(monitor, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable replication heartbeat for a monitor
|
||||
*
|
||||
* @param dcb Connection to user interface
|
||||
* @param monitor The monitor
|
||||
*/
|
||||
static void
|
||||
enable_monitor_replication_heartbeat(DCB *dcb, MONITOR *monitor)
|
||||
{
|
||||
CONFIG_PARAMETER param;
|
||||
const char* name = "detect_replication_lag";
|
||||
const char* value = "1";
|
||||
param.name = (char*)name;
|
||||
param.value = (char*)value;
|
||||
param.next = NULL;
|
||||
monitorStop(monitor);
|
||||
monitorStart(monitor, ¶m);
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable replication heartbeat for a monitor
|
||||
*
|
||||
* @param dcb Connection to user interface
|
||||
* @param monitor The monitor
|
||||
*/
|
||||
static void
|
||||
disable_monitor_replication_heartbeat(DCB *dcb, MONITOR *monitor)
|
||||
{
|
||||
CONFIG_PARAMETER param;
|
||||
const char* name = "detect_replication_lag";
|
||||
const char* value = "0";
|
||||
param.name = (char*)name;
|
||||
param.value = (char*)value;
|
||||
param.next = NULL;
|
||||
monitorStop(monitor);
|
||||
monitorStart(monitor, ¶m);
|
||||
monitorStart(monitor, monitor->parameters);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -661,7 +661,7 @@ void exec_restart_monitor(DCB *dcb, MAXINFO_TREE *tree)
|
||||
MONITOR* monitor = monitor_find(tree->value);
|
||||
if (monitor)
|
||||
{
|
||||
monitorStart(monitor, NULL);
|
||||
monitorStart(monitor, monitor->parameters);
|
||||
maxinfo_send_ok(dcb);
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user