diff --git a/server/core/config.cc b/server/core/config.cc index 49ee77719..08f783393 100644 --- a/server/core/config.cc +++ b/server/core/config.cc @@ -3480,7 +3480,7 @@ int create_new_monitor(CONFIG_CONTEXT *context, CONFIG_CONTEXT *obj, HASHTABLE* char *module = config_get_value(obj->parameters, CN_MODULE); if (module) { - if ((obj->element = monitor_alloc(obj->object, module)) == NULL) + if ((obj->element = monitor_create(obj->object, module)) == NULL) { MXS_ERROR("Failed to create monitor '%s'.", obj->object); error_count++; diff --git a/server/core/config_runtime.cc b/server/core/config_runtime.cc index 0f3a4c18e..1ef8aca80 100644 --- a/server/core/config_runtime.cc +++ b/server/core/config_runtime.cc @@ -937,7 +937,7 @@ bool runtime_create_monitor(const char *name, const char *module) { MXS_DEBUG("Repurposed monitor '%s'", name); } - else if ((monitor = monitor_alloc(name, module)) == NULL) + else if ((monitor = monitor_create(name, module)) == NULL) { runtime_error("Could not create monitor '%s' with module '%s'", name, module); } diff --git a/server/core/internal/monitor.h b/server/core/internal/monitor.h index e4967fe8b..517a9c5e4 100644 --- a/server/core/internal/monitor.h +++ b/server/core/internal/monitor.h @@ -47,8 +47,8 @@ typedef enum MONITOR_CONNECT_ATTEMPTS = 3 } monitor_timeouts_t; -MXS_MONITOR *monitor_alloc(const char *, const char *); -void monitor_free(MXS_MONITOR *); +MXS_MONITOR *monitor_create(const char *, const char *); +void monitor_destroy(MXS_MONITOR *); void monitor_start(MXS_MONITOR *, const MXS_CONFIG_PARAMETER*); void monitor_stop(MXS_MONITOR *); diff --git a/server/core/monitor.cc b/server/core/monitor.cc index f12657a54..eb30a654b 100644 --- a/server/core/monitor.cc +++ b/server/core/monitor.cc @@ -92,14 +92,14 @@ static unsigned int all_server_bits = SERVER_RUNNING | SERVER_MAINT | SERVER_JOINED | SERVER_NDB; /** - * Allocate a new monitor, load the associated module for the monitor + * Create a new monitor, load the associated module for the monitor * and start execution on the monitor. * * @param name The name of the monitor module to load * @param module The module to load * @return The newly created monitor */ -MXS_MONITOR* monitor_alloc(const char *name, const char *module) +MXS_MONITOR* monitor_create(const char *name, const char *module) { char* my_name = MXS_STRDUP(name); char *my_module = MXS_STRDUP(module); diff --git a/server/core/test/test_modulecmd.cc b/server/core/test/test_modulecmd.cc index 692d0db2c..3a51dd0ba 100644 --- a/server/core/test/test_modulecmd.cc +++ b/server/core/test/test_modulecmd.cc @@ -406,7 +406,7 @@ int test_domain_matching(const char* actual_module, /** Create a monitor */ char *libdir = MXS_STRDUP_A("../../modules/monitor/mariadbmon/"); set_libdir(libdir); - monitor_alloc(name, actual_module); + monitor_create(name, actual_module); const MODULECMD *cmd;