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:
Markus Mäkelä 2017-01-06 08:58:02 +02:00
parent 75c257327e
commit 72ea3ad453
2 changed files with 2 additions and 40 deletions

View File

@ -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, &param);
}
/**
* 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, &param);
monitorStart(monitor, monitor->parameters);
}
/**

View File

@ -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