diff --git a/server/modules/routing/debugcli/debugcmd.c b/server/modules/routing/debugcli/debugcmd.c index 984df36ac..db1877877 100644 --- a/server/modules/routing/debugcli/debugcmd.c +++ b/server/modules/routing/debugcli/debugcmd.c @@ -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); } /** diff --git a/server/modules/routing/maxinfo/maxinfo_exec.c b/server/modules/routing/maxinfo/maxinfo_exec.c index b77cc148f..17521e42a 100644 --- a/server/modules/routing/maxinfo/maxinfo_exec.c +++ b/server/modules/routing/maxinfo/maxinfo_exec.c @@ -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