From c96bd64aa8c65f63e88c54aa3cf35c2ec15dff31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Tue, 3 Jan 2017 14:42:30 +0200 Subject: [PATCH] Rename MODULE_INFO to MXS_MODULE The MODULE_INFO is now the main object which is used by modules to convey information to the MaxScale core. The MXS_MODULE name is more apt as it now contains the actual module definition. The old MODULES structure was moved into load_utils.c as an internal implementation and was renamed so that it is not confused with the new MODULE structure. --- include/maxscale/filter.hh | 2 +- include/maxscale/modinfo.h | 44 ++++----- include/maxscale/modules.h | 11 --- query_classifier/qc_dummy/qc_dummy.cc | 8 +- .../qc_mysqlembedded/qc_mysqlembedded.cc | 8 +- query_classifier/qc_sqlite/qc_sqlite.c | 8 +- server/core/load_utils.c | 99 ++++++++++--------- server/core/test/testfeedback.c | 2 +- .../CDCPlainAuth/cdc_plain_auth.c | 8 +- .../GSSAPI/GSSAPIAuth/gssapi_auth.c | 8 +- .../GSSAPIBackendAuth/gssapi_backend_auth.c | 8 +- .../authenticator/HTTPAuth/http_auth.c | 8 +- .../MaxAdminAuth/max_admin_auth.c | 8 +- .../authenticator/MySQLAuth/mysql_auth.c | 8 +- .../MySQLBackendAuth/mysql_backend_auth.c | 8 +- .../NullAuthAllow/null_auth_allow.c | 8 +- .../NullAuthDeny/null_auth_deny.c | 8 +- server/modules/filter/cache/cachefilter.cc | 8 +- server/modules/filter/ccrfilter/ccrfilter.c | 8 +- server/modules/filter/dbfwfilter/dbfwfilter.c | 8 +- server/modules/filter/hintfilter/hintfilter.c | 8 +- server/modules/filter/luafilter/luafilter.c | 8 +- .../modules/filter/masking/maskingfilter.cc | 8 +- server/modules/filter/maxrows/maxrows.c | 8 +- server/modules/filter/mqfilter/mqfilter.c | 8 +- .../namedserverfilter/namedserverfilter.c | 8 +- server/modules/filter/qlafilter/qlafilter.c | 8 +- .../modules/filter/regexfilter/regexfilter.c | 8 +- server/modules/filter/tee/tee.c | 8 +- server/modules/filter/testfilter/testfilter.c | 8 +- server/modules/filter/topfilter/topfilter.c | 8 +- server/modules/filter/tpmfilter/tpmfilter.c | 8 +- server/modules/monitor/auroramon/auroramon.c | 8 +- server/modules/monitor/galeramon/galeramon.c | 8 +- server/modules/monitor/mmmon/mmmon.c | 14 +-- server/modules/monitor/mysqlmon/mysql_mon.c | 8 +- .../monitor/ndbclustermon/ndbclustermon.c | 8 +- server/modules/protocol/CDC/cdc.c | 8 +- server/modules/protocol/HTTPD/httpd.c | 8 +- .../MySQL/MySQLBackend/mysql_backend.c | 8 +- .../protocol/MySQL/MySQLClient/mysql_client.c | 8 +- server/modules/protocol/maxscaled/maxscaled.c | 8 +- server/modules/protocol/telnetd/telnetd.c | 8 +- .../protocol/testprotocol/testprotocol.c | 8 +- server/modules/routing/avrorouter/avro.c | 8 +- server/modules/routing/binlogrouter/blr.c | 8 +- server/modules/routing/cli/cli.c | 8 +- server/modules/routing/debugcli/debugcli.c | 8 +- server/modules/routing/maxinfo/maxinfo.c | 8 +- .../routing/readconnroute/readconnroute.c | 8 +- .../routing/readwritesplit/readwritesplit.c | 6 +- .../routing/schemarouter/schemarouter.c | 8 +- server/modules/routing/testroute/testroute.c | 8 +- 53 files changed, 273 insertions(+), 273 deletions(-) diff --git a/include/maxscale/filter.hh b/include/maxscale/filter.hh index 7c139b3b1..fe241548b 100644 --- a/include/maxscale/filter.hh +++ b/include/maxscale/filter.hh @@ -193,7 +193,7 @@ protected: * The plugin function @c GetModuleObject is then implemented as follows: * * @code - * extern "C" MODULE_INFO* MXS_CREATE_MODULE() + * extern "C" MODULE* MXS_CREATE_MODULE() * { * return &MyFilter::s_object; * }; diff --git a/include/maxscale/modinfo.h b/include/maxscale/modinfo.h index 51150b70c..547df0c80 100644 --- a/include/maxscale/modinfo.h +++ b/include/maxscale/modinfo.h @@ -34,25 +34,25 @@ MXS_BEGIN_DECLS */ typedef enum { - MODULE_IN_DEVELOPMENT = 0, - MODULE_ALPHA_RELEASE, - MODULE_BETA_RELEASE, - MODULE_GA, - MODULE_EXPERIMENTAL -} MODULE_STATUS; + MXS_MODULE_IN_DEVELOPMENT = 0, + MXS_MODULE_ALPHA_RELEASE, + MXS_MODULE_BETA_RELEASE, + MXS_MODULE_GA, + MXS_MODULE_EXPERIMENTAL +} MXS_MODULE_STATUS; /** * The API implemented by the module */ typedef enum { - MODULE_API_PROTOCOL = 0, - MODULE_API_ROUTER, - MODULE_API_MONITOR, - MODULE_API_FILTER, - MODULE_API_AUTHENTICATOR, - MODULE_API_QUERY_CLASSIFIER, -} MODULE_API; + MXS_MODULE_API_PROTOCOL = 0, + MXS_MODULE_API_ROUTER, + MXS_MODULE_API_MONITOR, + MXS_MODULE_API_FILTER, + MXS_MODULE_API_AUTHENTICATOR, + MXS_MODULE_API_QUERY_CLASSIFIER, +} MXS_MODULE_API; /** * The module version structure. @@ -74,20 +74,20 @@ typedef struct int major; int minor; int patch; -} MODULE_VERSION; +} MXS_MODULE_VERSION; /** * The module information structure */ typedef struct { - MODULE_API modapi; /**< Module API type */ - MODULE_STATUS status; /**< Module development status */ - MODULE_VERSION api_version; /**< Module API version */ + MXS_MODULE_API modapi; /**< Module API type */ + MXS_MODULE_STATUS status; /**< Module development status */ + MXS_MODULE_VERSION api_version; /**< Module API version */ const char *description; /**< Module description */ const char *version; /**< Module version */ void *module_object; /**< Module type specific API implementation */ -} MODULE_INFO; +} MXS_MODULE; /** * Name of the module entry point @@ -96,13 +96,13 @@ typedef struct * * @code{.cpp} * - * MODULE_INFO* MXS_CREATE_MODULE() + * MODULE* MXS_CREATE_MODULE() * { * // Module specific API implementation * static FILTER_OBJECT my_object = { ... }; * - * // An implementation of the MODULE_INFO structure - * static MODULE_INFO info = { ... }; + * // An implementation of the MODULE structure + * static MODULE info = { ... }; * * // Any global initialization should be done here * @@ -111,7 +111,7 @@ typedef struct * * @endcode * - * The @c module_object field of the MODULE_INFO structure should point to + * The @c module_object field of the MODULE structure should point to * the module type specific API implementation. In the above example, the @c info * would declare a pointer to @c my_object as the last member of the struct. */ diff --git a/include/maxscale/modules.h b/include/maxscale/modules.h index ef7c3f1b9..ce4404de0 100644 --- a/include/maxscale/modules.h +++ b/include/maxscale/modules.h @@ -39,17 +39,6 @@ MXS_BEGIN_DECLS -typedef struct modules -{ - char *module; /**< The name of the module */ - char *type; /**< The module type */ - char *version; /**< Module version */ - void *handle; /**< The handle returned by dlopen */ - void *modobj; /**< The module "object" this is the set of entry points */ - MODULE_INFO *info; /**< The module information */ - struct modules *next; /**< Next module in the linked list */ -} MODULES; - /** * Module types */ diff --git a/query_classifier/qc_dummy/qc_dummy.cc b/query_classifier/qc_dummy/qc_dummy.cc index 35a626c54..9cf3a91b5 100644 --- a/query_classifier/qc_dummy/qc_dummy.cc +++ b/query_classifier/qc_dummy/qc_dummy.cc @@ -97,7 +97,7 @@ void qc_thread_end(void) extern "C" { - MODULE_INFO* MXS_CREATE_MODULE() + MXS_MODULE* MXS_CREATE_MODULE() { static QUERY_CLASSIFIER qc = { @@ -120,10 +120,10 @@ extern "C" qc_get_field_info, }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_QUERY_CLASSIFIER, - MODULE_IN_DEVELOPMENT, + MXS_MODULE_API_QUERY_CLASSIFIER, + MXS_MODULE_IN_DEVELOPMENT, QUERY_CLASSIFIER_VERSION, "Dummy Query Classifier", "V1.0.0", diff --git a/query_classifier/qc_mysqlembedded/qc_mysqlembedded.cc b/query_classifier/qc_mysqlembedded/qc_mysqlembedded.cc index bf86c5488..b82fddb51 100644 --- a/query_classifier/qc_mysqlembedded/qc_mysqlembedded.cc +++ b/query_classifier/qc_mysqlembedded/qc_mysqlembedded.cc @@ -2557,7 +2557,7 @@ void qc_thread_end(void) extern "C" { -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { static QUERY_CLASSIFIER qc = { @@ -2580,10 +2580,10 @@ MODULE_INFO* MXS_CREATE_MODULE() qc_get_field_info, }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_QUERY_CLASSIFIER, - MODULE_IN_DEVELOPMENT, + MXS_MODULE_API_QUERY_CLASSIFIER, + MXS_MODULE_IN_DEVELOPMENT, QUERY_CLASSIFIER_VERSION, "Query classifier based upon MySQL Embedded", "V1.0.0", diff --git a/query_classifier/qc_sqlite/qc_sqlite.c b/query_classifier/qc_sqlite/qc_sqlite.c index e56d1bf25..eb3ef989e 100644 --- a/query_classifier/qc_sqlite/qc_sqlite.c +++ b/query_classifier/qc_sqlite/qc_sqlite.c @@ -3172,7 +3172,7 @@ void qc_sqlite_get_field_info(GWBUF* query, const QC_FIELD_INFO** infos, size_t* * EXPORTS */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { static QUERY_CLASSIFIER qc = { @@ -3195,10 +3195,10 @@ MODULE_INFO* MXS_CREATE_MODULE() qc_sqlite_get_field_info, }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_QUERY_CLASSIFIER, - MODULE_BETA_RELEASE, + MXS_MODULE_API_QUERY_CLASSIFIER, + MXS_MODULE_BETA_RELEASE, QUERY_CLASSIFIER_VERSION, "Query classifier using sqlite.", "V1.0.0", diff --git a/server/core/load_utils.c b/server/core/load_utils.c index 616d8c659..5df883c70 100644 --- a/server/core/load_utils.c +++ b/server/core/load_utils.c @@ -45,15 +45,26 @@ #include #include -static MODULES *registered = NULL; +typedef struct loaded_module +{ + char *module; /**< The name of the module */ + char *type; /**< The module type */ + char *version; /**< Module version */ + void *handle; /**< The handle returned by dlopen */ + void *modobj; /**< The module "object" this is the set of entry points */ + MXS_MODULE *info; /**< The module information */ + struct loaded_module *next; /**< Next module in the linked list */ +} LOADED_MODULE; -static MODULES *find_module(const char *module); -static MODULES* register_module(const char *module, +static LOADED_MODULE *registered = NULL; + +static LOADED_MODULE *find_module(const char *module); +static LOADED_MODULE* register_module(const char *module, const char *type, void *dlhandle, - MODULE_INFO *mod_info); + MXS_MODULE *mod_info); static void unregister_module(const char *module); -int module_create_feedback_report(GWBUF **buffer, MODULES *modules, FEEDBACK_CONF *cfg); +int module_create_feedback_report(GWBUF **buffer, LOADED_MODULE *modules, FEEDBACK_CONF *cfg); int do_http_post(GWBUF *buffer, void *cfg); struct MemoryStruct @@ -93,42 +104,42 @@ WriteMemoryCallback(void *contents, size_t size, size_t nmemb, void *userp) return realsize; } -static bool check_module(MODULE_INFO *mod_info, const char *type, const char *module) +static bool check_module(const MXS_MODULE *mod_info, const char *type, const char *module) { bool success = true; if (strcmp(type, MODULE_PROTOCOL) == 0 - && mod_info->modapi != MODULE_API_PROTOCOL) + && mod_info->modapi != MXS_MODULE_API_PROTOCOL) { MXS_ERROR("Module '%s' does not implement the protocol API.", module); success = false; } if (strcmp(type, MODULE_AUTHENTICATOR) == 0 - && mod_info->modapi != MODULE_API_AUTHENTICATOR) + && mod_info->modapi != MXS_MODULE_API_AUTHENTICATOR) { MXS_ERROR("Module '%s' does not implement the authenticator API.", module); success = false; } if (strcmp(type, MODULE_ROUTER) == 0 - && mod_info->modapi != MODULE_API_ROUTER) + && mod_info->modapi != MXS_MODULE_API_ROUTER) { MXS_ERROR("Module '%s' does not implement the router API.", module); success = false; } if (strcmp(type, MODULE_MONITOR) == 0 - && mod_info->modapi != MODULE_API_MONITOR) + && mod_info->modapi != MXS_MODULE_API_MONITOR) { MXS_ERROR("Module '%s' does not implement the monitor API.", module); success = false; } if (strcmp(type, MODULE_FILTER) == 0 - && mod_info->modapi != MODULE_API_FILTER) + && mod_info->modapi != MXS_MODULE_API_FILTER) { MXS_ERROR("Module '%s' does not implement the filter API.", module); success = false; } if (strcmp(type, MODULE_QUERY_CLASSIFIER) == 0 - && mod_info->modapi != MODULE_API_QUERY_CLASSIFIER) + && mod_info->modapi != MXS_MODULE_API_QUERY_CLASSIFIER) { MXS_ERROR("Module '%s' does not implement the query classifier API.", module); success = false; @@ -167,7 +178,7 @@ static bool check_module(MODULE_INFO *mod_info, const char *type, const char *mo void *load_module(const char *module, const char *type) { ss_dassert(module && type); - MODULES *mod; + LOADED_MODULE *mod; if ((mod = find_module(module)) == NULL) { @@ -206,7 +217,7 @@ void *load_module(const char *module, const char *type) } void *(*entry_point)() = sym; - MODULE_INFO *mod_info = entry_point(); + MXS_MODULE *mod_info = entry_point(); if (!check_module(mod_info, type, module) || (mod = register_module(module, type, dlhandle, mod_info)) == NULL) @@ -232,7 +243,7 @@ void *load_module(const char *module, const char *type) void unload_module(const char *module) { - MODULES *mod = find_module(module); + LOADED_MODULE *mod = find_module(module); if (mod) { @@ -249,10 +260,10 @@ unload_module(const char *module) * @param module The name of the module * @return The module handle or NULL if it was not found */ -static MODULES * +static LOADED_MODULE * find_module(const char *module) { - MODULES *mod = registered; + LOADED_MODULE *mod = registered; if (module) { @@ -283,16 +294,16 @@ find_module(const char *module) * @param mod_info The module information * @return The new registered module or NULL on memory allocation failure */ -static MODULES* register_module(const char *module, +static LOADED_MODULE* register_module(const char *module, const char *type, void *dlhandle, - MODULE_INFO *mod_info) + MXS_MODULE *mod_info) { module = MXS_STRDUP(module); type = MXS_STRDUP(type); char *version = MXS_STRDUP(mod_info->version); - MODULES *mod = (MODULES *)MXS_MALLOC(sizeof(MODULES)); + LOADED_MODULE *mod = (LOADED_MODULE *)MXS_MALLOC(sizeof(LOADED_MODULE)); if (!module || !type || !version || !mod) { @@ -322,8 +333,8 @@ static MODULES* register_module(const char *module, static void unregister_module(const char *module) { - MODULES *mod = find_module(module); - MODULES *ptr; + LOADED_MODULE *mod = find_module(module); + LOADED_MODULE *ptr; if (!mod) { @@ -384,7 +395,7 @@ unload_all_modules() void printModules() { - MODULES *ptr = registered; + LOADED_MODULE *ptr = registered; printf("%-15s | %-11s | Version\n", "Module Name", "Module Type"); printf("-----------------------------------------------------\n"); @@ -403,7 +414,7 @@ printModules() void dprintAllModules(DCB *dcb) { - MODULES *ptr = registered; + LOADED_MODULE *ptr = registered; dcb_printf(dcb, "Modules.\n"); dcb_printf(dcb, "----------------+-----------------+---------+-------+-------------------------\n"); @@ -417,15 +428,15 @@ dprintAllModules(DCB *dcb) ptr->info->api_version.major, ptr->info->api_version.minor, ptr->info->api_version.patch, - ptr->info->status == MODULE_IN_DEVELOPMENT + ptr->info->status == MXS_MODULE_IN_DEVELOPMENT ? "In Development" - : (ptr->info->status == MODULE_ALPHA_RELEASE + : (ptr->info->status == MXS_MODULE_ALPHA_RELEASE ? "Alpha" - : (ptr->info->status == MODULE_BETA_RELEASE + : (ptr->info->status == MXS_MODULE_BETA_RELEASE ? "Beta" - : (ptr->info->status == MODULE_GA + : (ptr->info->status == MXS_MODULE_GA ? "GA" - : (ptr->info->status == MODULE_EXPERIMENTAL + : (ptr->info->status == MXS_MODULE_EXPERIMENTAL ? "Experimental" : "Unknown"))))); dcb_printf(dcb, "\n"); ptr = ptr->next; @@ -442,7 +453,7 @@ void moduleShowFeedbackReport(DCB *dcb) { GWBUF *buffer; - MODULES *modules_list = registered; + LOADED_MODULE *modules_list = registered; FEEDBACK_CONF *feedback_config = config_get_feedback_data(); if (!module_create_feedback_report(&buffer, modules_list, feedback_config)) @@ -469,7 +480,7 @@ moduleRowCallback(RESULTSET *set, void *data) int i = 0;; char *stat, buf[20]; RESULT_ROW *row; - MODULES *ptr; + LOADED_MODULE *ptr; ptr = registered; while (i < *rowno && ptr) @@ -492,15 +503,15 @@ moduleRowCallback(RESULTSET *set, void *data) ptr->info->api_version.patch); buf[19] = '\0'; resultset_row_set(row, 3, buf); - resultset_row_set(row, 4, ptr->info->status == MODULE_IN_DEVELOPMENT + resultset_row_set(row, 4, ptr->info->status == MXS_MODULE_IN_DEVELOPMENT ? "In Development" - : (ptr->info->status == MODULE_ALPHA_RELEASE + : (ptr->info->status == MXS_MODULE_ALPHA_RELEASE ? "Alpha" - : (ptr->info->status == MODULE_BETA_RELEASE + : (ptr->info->status == MXS_MODULE_BETA_RELEASE ? "Beta" - : (ptr->info->status == MODULE_GA + : (ptr->info->status == MXS_MODULE_GA ? "GA" - : (ptr->info->status == MODULE_EXPERIMENTAL + : (ptr->info->status == MXS_MODULE_EXPERIMENTAL ? "Experimental" : "Unknown"))))); return row; } @@ -543,7 +554,7 @@ moduleGetList() void module_feedback_send(void* data) { - MODULES *modules_list = registered; + LOADED_MODULE *modules_list = registered; CURL *curl = NULL; CURLcode res; struct curl_httppost *formpost = NULL; @@ -661,9 +672,9 @@ module_feedback_send(void* data) */ int -module_create_feedback_report(GWBUF **buffer, MODULES *modules, FEEDBACK_CONF *cfg) +module_create_feedback_report(GWBUF **buffer, LOADED_MODULE *modules, FEEDBACK_CONF *cfg) { - MODULES *ptr = modules; + LOADED_MODULE *ptr = modules; int n_mod = 0; char *data_ptr = NULL; char hex_setup_info[2 * SHA_DIGEST_LENGTH + 1] = ""; @@ -741,15 +752,15 @@ module_create_feedback_report(GWBUF **buffer, MODULES *modules, FEEDBACK_CONF *c data_ptr += strlen(data_ptr); snprintf(data_ptr, _NOTIFICATION_REPORT_ROW_LEN, "module_%s_releasestatus\t%s\n", ptr->module, - ptr->info->status == MODULE_IN_DEVELOPMENT + ptr->info->status == MXS_MODULE_IN_DEVELOPMENT ? "In Development" - : (ptr->info->status == MODULE_ALPHA_RELEASE + : (ptr->info->status == MXS_MODULE_ALPHA_RELEASE ? "Alpha" - : (ptr->info->status == MODULE_BETA_RELEASE + : (ptr->info->status == MXS_MODULE_BETA_RELEASE ? "Beta" - : (ptr->info->status == MODULE_GA + : (ptr->info->status == MXS_MODULE_GA ? "GA" - : (ptr->info->status == MODULE_EXPERIMENTAL + : (ptr->info->status == MXS_MODULE_EXPERIMENTAL ? "Experimental" : "Unknown"))))); data_ptr += strlen(data_ptr); } diff --git a/server/core/test/testfeedback.c b/server/core/test/testfeedback.c index fe8736442..0e356f797 100644 --- a/server/core/test/testfeedback.c +++ b/server/core/test/testfeedback.c @@ -45,6 +45,7 @@ #include #include #include +#include "../load_utils.c" static char* server_options[] = { @@ -72,7 +73,6 @@ static char* server_groups[] = int config_load(char *); void config_enable_feedback_task(void); -int module_create_feedback_report(GWBUF **buffer, MODULES *modules, FEEDBACK_CONF *cfg); int do_http_post(GWBUF *buffer, void *cfg); int main(int argc, char** argv) diff --git a/server/modules/authenticator/CDCPlainAuth/cdc_plain_auth.c b/server/modules/authenticator/CDCPlainAuth/cdc_plain_auth.c index 72b294cd0..6f6605d69 100644 --- a/server/modules/authenticator/CDCPlainAuth/cdc_plain_auth.c +++ b/server/modules/authenticator/CDCPlainAuth/cdc_plain_auth.c @@ -143,7 +143,7 @@ static bool cdc_add_new_user(const MODULECMD_ARG *args) * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { static modulecmd_arg_type_t args[] = { @@ -166,10 +166,10 @@ MODULE_INFO* MXS_CREATE_MODULE() cdc_replace_users /* Load CDC users */ }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_AUTHENTICATOR, - MODULE_GA, + MXS_MODULE_API_AUTHENTICATOR, + MXS_MODULE_GA, GWAUTHENTICATOR_VERSION, "The CDC client to MaxScale authenticator implementation", "V1.1.0", diff --git a/server/modules/authenticator/GSSAPI/GSSAPIAuth/gssapi_auth.c b/server/modules/authenticator/GSSAPI/GSSAPIAuth/gssapi_auth.c index 4f14b24e1..9b49e07eb 100644 --- a/server/modules/authenticator/GSSAPI/GSSAPIAuth/gssapi_auth.c +++ b/server/modules/authenticator/GSSAPI/GSSAPIAuth/gssapi_auth.c @@ -599,7 +599,7 @@ int gssapi_auth_load_users(SERV_LISTENER *listener) /** * Module handle entry point */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { static GWAUTHENTICATOR MyObject = { @@ -613,10 +613,10 @@ MODULE_INFO* MXS_CREATE_MODULE() gssapi_auth_load_users /* Load database users */ }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_AUTHENTICATOR, - MODULE_GA, + MXS_MODULE_API_AUTHENTICATOR, + MXS_MODULE_GA, GWAUTHENTICATOR_VERSION, "GSSAPI authenticator", "V1.0.0", diff --git a/server/modules/authenticator/GSSAPI/GSSAPIBackendAuth/gssapi_backend_auth.c b/server/modules/authenticator/GSSAPI/GSSAPIBackendAuth/gssapi_backend_auth.c index 643e40a69..12a586fec 100644 --- a/server/modules/authenticator/GSSAPI/GSSAPIBackendAuth/gssapi_backend_auth.c +++ b/server/modules/authenticator/GSSAPI/GSSAPIBackendAuth/gssapi_backend_auth.c @@ -263,7 +263,7 @@ static int gssapi_backend_auth_authenticate(DCB *dcb) /** * Module handle entry point */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { static GWAUTHENTICATOR MyObject = { @@ -277,10 +277,10 @@ MODULE_INFO* MXS_CREATE_MODULE() NULL /* Load users from backend databases */ }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_AUTHENTICATOR, - MODULE_GA, + MXS_MODULE_API_AUTHENTICATOR, + MXS_MODULE_GA, GWAUTHENTICATOR_VERSION, "GSSAPI backend authenticator", "V1.0.0", diff --git a/server/modules/authenticator/HTTPAuth/http_auth.c b/server/modules/authenticator/HTTPAuth/http_auth.c index bc6a68d05..5758e3144 100644 --- a/server/modules/authenticator/HTTPAuth/http_auth.c +++ b/server/modules/authenticator/HTTPAuth/http_auth.c @@ -53,7 +53,7 @@ typedef struct http_auth * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { static GWAUTHENTICATOR MyObject = { @@ -67,10 +67,10 @@ MODULE_INFO* MXS_CREATE_MODULE() users_default_loadusers /* Load generic users */ }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_AUTHENTICATOR, - MODULE_GA, + MXS_MODULE_API_AUTHENTICATOR, + MXS_MODULE_GA, GWAUTHENTICATOR_VERSION, "The MaxScale HTTP BA authenticator", "V1.1.0", diff --git a/server/modules/authenticator/MaxAdminAuth/max_admin_auth.c b/server/modules/authenticator/MaxAdminAuth/max_admin_auth.c index 1cf666228..cfa965603 100644 --- a/server/modules/authenticator/MaxAdminAuth/max_admin_auth.c +++ b/server/modules/authenticator/MaxAdminAuth/max_admin_auth.c @@ -47,7 +47,7 @@ static void max_admin_auth_free_client_data(DCB *dcb); * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { static GWAUTHENTICATOR MyObject = { @@ -61,10 +61,10 @@ MODULE_INFO* MXS_CREATE_MODULE() users_default_loadusers /* Load generic users */ }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_AUTHENTICATOR, - MODULE_GA, + MXS_MODULE_API_AUTHENTICATOR, + MXS_MODULE_GA, GWAUTHENTICATOR_VERSION, "The MaxScale Admin client authenticator implementation", "V2.1.0", diff --git a/server/modules/authenticator/MySQLAuth/mysql_auth.c b/server/modules/authenticator/MySQLAuth/mysql_auth.c index 9e7f44d9b..660f2697c 100644 --- a/server/modules/authenticator/MySQLAuth/mysql_auth.c +++ b/server/modules/authenticator/MySQLAuth/mysql_auth.c @@ -71,7 +71,7 @@ static int mysql_auth_set_client_data( * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { static GWAUTHENTICATOR MyObject = { @@ -85,10 +85,10 @@ MODULE_INFO* MXS_CREATE_MODULE() mysql_auth_load_users /* Load users from backend databases */ }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_AUTHENTICATOR, - MODULE_GA, + MXS_MODULE_API_AUTHENTICATOR, + MXS_MODULE_GA, GWAUTHENTICATOR_VERSION, "The MySQL client to MaxScale authenticator implementation", "V1.1.0", diff --git a/server/modules/authenticator/MySQLBackendAuth/mysql_backend_auth.c b/server/modules/authenticator/MySQLBackendAuth/mysql_backend_auth.c index 55eac4d29..d783c1603 100644 --- a/server/modules/authenticator/MySQLBackendAuth/mysql_backend_auth.c +++ b/server/modules/authenticator/MySQLBackendAuth/mysql_backend_auth.c @@ -156,7 +156,7 @@ static bool auth_backend_ssl(DCB *dcb) * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { static GWAUTHENTICATOR MyObject = { @@ -170,10 +170,10 @@ MODULE_INFO* MXS_CREATE_MODULE() NULL /* We don't need to load users */ }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_AUTHENTICATOR, - MODULE_GA, + MXS_MODULE_API_AUTHENTICATOR, + MXS_MODULE_GA, GWAUTHENTICATOR_VERSION, "The MySQL MaxScale to backend server authenticator", "V1.0.0", diff --git a/server/modules/authenticator/NullAuthAllow/null_auth_allow.c b/server/modules/authenticator/NullAuthAllow/null_auth_allow.c index 145c6f198..58d13ce95 100644 --- a/server/modules/authenticator/NullAuthAllow/null_auth_allow.c +++ b/server/modules/authenticator/NullAuthAllow/null_auth_allow.c @@ -49,7 +49,7 @@ static void null_auth_free_client_data(DCB *dcb); * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { static GWAUTHENTICATOR MyObject = { @@ -63,10 +63,10 @@ MODULE_INFO* MXS_CREATE_MODULE() users_default_loadusers /* Load generic users */ }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_AUTHENTICATOR, - MODULE_GA, + MXS_MODULE_API_AUTHENTICATOR, + MXS_MODULE_GA, GWAUTHENTICATOR_VERSION, "The Null client authenticator implementation", "V1.1.0", diff --git a/server/modules/authenticator/NullAuthDeny/null_auth_deny.c b/server/modules/authenticator/NullAuthDeny/null_auth_deny.c index 36d65853b..007112957 100644 --- a/server/modules/authenticator/NullAuthDeny/null_auth_deny.c +++ b/server/modules/authenticator/NullAuthDeny/null_auth_deny.c @@ -46,7 +46,7 @@ static void null_auth_free_client_data(DCB *dcb); * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { static GWAUTHENTICATOR MyObject = { @@ -60,10 +60,10 @@ MODULE_INFO* MXS_CREATE_MODULE() users_default_loadusers /* Load generic users */ }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_AUTHENTICATOR, - MODULE_GA, + MXS_MODULE_API_AUTHENTICATOR, + MXS_MODULE_GA, GWAUTHENTICATOR_VERSION, "The Null client authenticator implementation", "V1.1.0", diff --git a/server/modules/filter/cache/cachefilter.cc b/server/modules/filter/cache/cachefilter.cc index a2c3c8a9a..2af357d3b 100644 --- a/server/modules/filter/cache/cachefilter.cc +++ b/server/modules/filter/cache/cachefilter.cc @@ -193,7 +193,7 @@ bool config_get_uint64(const FILTER_PARAMETER& param, uint64_t* pValue) // Global symbols of the Module // -extern "C" MODULE_INFO* MXS_CREATE_MODULE() +extern "C" MXS_MODULE* MXS_CREATE_MODULE() { static modulecmd_arg_type_t show_argv[] = { @@ -206,10 +206,10 @@ extern "C" MODULE_INFO* MXS_CREATE_MODULE() MXS_NOTICE("Initialized cache module %s.\n", VERSION_STRING); - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_FILTER, - MODULE_IN_DEVELOPMENT, + MXS_MODULE_API_FILTER, + MXS_MODULE_IN_DEVELOPMENT, FILTER_VERSION, "A caching filter that is capable of caching and returning cached data.", VERSION_STRING, diff --git a/server/modules/filter/ccrfilter/ccrfilter.c b/server/modules/filter/ccrfilter/ccrfilter.c index d30b5d8bf..e019e2fed 100644 --- a/server/modules/filter/ccrfilter/ccrfilter.c +++ b/server/modules/filter/ccrfilter/ccrfilter.c @@ -99,7 +99,7 @@ typedef struct * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { static FILTER_OBJECT MyObject = { @@ -116,10 +116,10 @@ MODULE_INFO* MXS_CREATE_MODULE() NULL, // No destroyInstance }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_FILTER, - MODULE_GA, + MXS_MODULE_API_FILTER, + MXS_MODULE_GA, FILTER_VERSION, "A routing hint filter that send queries to the master after data modification", "V1.1.0", diff --git a/server/modules/filter/dbfwfilter/dbfwfilter.c b/server/modules/filter/dbfwfilter/dbfwfilter.c index 1e20b5668..733413115 100644 --- a/server/modules/filter/dbfwfilter/dbfwfilter.c +++ b/server/modules/filter/dbfwfilter/dbfwfilter.c @@ -777,7 +777,7 @@ bool dbfw_show_rules(const MODULECMD_ARG *argv) * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { modulecmd_arg_type_t args_rules_reload[] = { @@ -810,10 +810,10 @@ MODULE_INFO* MXS_CREATE_MODULE() NULL, // No destroyInstance }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_FILTER, - MODULE_GA, + MXS_MODULE_API_FILTER, + MXS_MODULE_GA, FILTER_VERSION, "Firewall Filter", "V1.2.0", diff --git a/server/modules/filter/hintfilter/hintfilter.c b/server/modules/filter/hintfilter/hintfilter.c index 0b3538d1b..de560a0d2 100644 --- a/server/modules/filter/hintfilter/hintfilter.c +++ b/server/modules/filter/hintfilter/hintfilter.c @@ -40,7 +40,7 @@ static uint64_t getCapabilities(void); * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { static FILTER_OBJECT MyObject = { @@ -57,10 +57,10 @@ MODULE_INFO* MXS_CREATE_MODULE() NULL, // No destroyInstance }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_FILTER, - MODULE_ALPHA_RELEASE, + MXS_MODULE_API_FILTER, + MXS_MODULE_ALPHA_RELEASE, FILTER_VERSION, "A hint parsing filter", "V1.0.0", diff --git a/server/modules/filter/luafilter/luafilter.c b/server/modules/filter/luafilter/luafilter.c index e889ea0be..d0dd50677 100644 --- a/server/modules/filter/luafilter/luafilter.c +++ b/server/modules/filter/luafilter/luafilter.c @@ -72,7 +72,7 @@ static uint64_t getCapabilities(void); * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { static FILTER_OBJECT MyObject = { @@ -89,10 +89,10 @@ MODULE_INFO* MXS_CREATE_MODULE() NULL, // No destroyInstance }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_FILTER, - MODULE_EXPERIMENTAL, + MXS_MODULE_API_FILTER, + MXS_MODULE_EXPERIMENTAL, FILTER_VERSION, "Lua Filter", "V1.0.0", diff --git a/server/modules/filter/masking/maskingfilter.cc b/server/modules/filter/masking/maskingfilter.cc index ead14372f..6b167975c 100644 --- a/server/modules/filter/masking/maskingfilter.cc +++ b/server/modules/filter/masking/maskingfilter.cc @@ -18,14 +18,14 @@ // Global symbols of the Module // -extern "C" MODULE_INFO* MXS_CREATE_MODULE() +extern "C" MXS_MODULE* MXS_CREATE_MODULE() { MXS_NOTICE("Initialized masking module."); - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_FILTER, - MODULE_IN_DEVELOPMENT, + MXS_MODULE_API_FILTER, + MXS_MODULE_IN_DEVELOPMENT, FILTER_VERSION, "A masking filter that is capable of masking/obfuscating returned column values.", "V1.0.0", diff --git a/server/modules/filter/maxrows/maxrows.c b/server/modules/filter/maxrows/maxrows.c index 872244495..ee964105f 100644 --- a/server/modules/filter/maxrows/maxrows.c +++ b/server/modules/filter/maxrows/maxrows.c @@ -64,7 +64,7 @@ static uint64_t getCapabilities(void); * * @return The module object. */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { static FILTER_OBJECT object = { @@ -81,10 +81,10 @@ MODULE_INFO* MXS_CREATE_MODULE() NULL, // No destroyInstance }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_FILTER, - MODULE_IN_DEVELOPMENT, + MXS_MODULE_API_FILTER, + MXS_MODULE_IN_DEVELOPMENT, FILTER_VERSION, "A filter that is capable of limiting the resultset number of rows.", "V1.0.0", diff --git a/server/modules/filter/mqfilter/mqfilter.c b/server/modules/filter/mqfilter/mqfilter.c index 80f5effae..c38099c56 100644 --- a/server/modules/filter/mqfilter/mqfilter.c +++ b/server/modules/filter/mqfilter/mqfilter.c @@ -245,7 +245,7 @@ void sendMessage(void* data); * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { static FILTER_OBJECT MyObject = { @@ -262,10 +262,10 @@ MODULE_INFO* MXS_CREATE_MODULE() NULL, // No destroyInstance }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_FILTER, - MODULE_ALPHA_RELEASE, + MXS_MODULE_API_FILTER, + MXS_MODULE_ALPHA_RELEASE, FILTER_VERSION, "A RabbitMQ query logging filter", "V1.0.2", diff --git a/server/modules/filter/namedserverfilter/namedserverfilter.c b/server/modules/filter/namedserverfilter/namedserverfilter.c index 304879b66..03f62dc0b 100644 --- a/server/modules/filter/namedserverfilter/namedserverfilter.c +++ b/server/modules/filter/namedserverfilter/namedserverfilter.c @@ -80,7 +80,7 @@ typedef struct * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { static FILTER_OBJECT MyObject = { @@ -97,10 +97,10 @@ MODULE_INFO* MXS_CREATE_MODULE() NULL, // No destroyInstance }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_FILTER, - MODULE_GA, + MXS_MODULE_API_FILTER, + MXS_MODULE_GA, FILTER_VERSION, "A routing hint filter that uses regular expressions to direct queries", "V1.1.0", diff --git a/server/modules/filter/qlafilter/qlafilter.c b/server/modules/filter/qlafilter/qlafilter.c index f23a60a4b..3aa67af60 100644 --- a/server/modules/filter/qlafilter/qlafilter.c +++ b/server/modules/filter/qlafilter/qlafilter.c @@ -139,7 +139,7 @@ static int write_log_entry(uint32_t, FILE*, QLA_INSTANCE*, QLA_SESSION*, const c * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { static FILTER_OBJECT MyObject = { @@ -156,10 +156,10 @@ MODULE_INFO* MXS_CREATE_MODULE() NULL, // No destroyInstance }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_FILTER, - MODULE_GA, + MXS_MODULE_API_FILTER, + MXS_MODULE_GA, FILTER_VERSION, "A simple query logging filter", "V1.1.1", diff --git a/server/modules/filter/regexfilter/regexfilter.c b/server/modules/filter/regexfilter/regexfilter.c index 7708a3ca3..662c0b760 100644 --- a/server/modules/filter/regexfilter/regexfilter.c +++ b/server/modules/filter/regexfilter/regexfilter.c @@ -90,7 +90,7 @@ void log_nomatch(REGEX_INSTANCE* inst, char* re, char* old); * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { static FILTER_OBJECT MyObject = { @@ -107,10 +107,10 @@ MODULE_INFO* MXS_CREATE_MODULE() NULL, // No destroyInstance }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_FILTER, - MODULE_GA, + MXS_MODULE_API_FILTER, + MXS_MODULE_GA, FILTER_VERSION, "A query rewrite filter that uses regular expressions to rewrite queries", "V1.1.0", diff --git a/server/modules/filter/tee/tee.c b/server/modules/filter/tee/tee.c index a4f446281..49b372fa6 100644 --- a/server/modules/filter/tee/tee.c +++ b/server/modules/filter/tee/tee.c @@ -289,7 +289,7 @@ orphan_free(void* data) * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { spinlock_init(&orphanLock); #ifdef SS_DEBUG @@ -311,10 +311,10 @@ MODULE_INFO* MXS_CREATE_MODULE() NULL, // No destroyInstance }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_FILTER, - MODULE_GA, + MXS_MODULE_API_FILTER, + MXS_MODULE_GA, FILTER_VERSION, "A tee piece in the filter plumbing", "V1.0.0", diff --git a/server/modules/filter/testfilter/testfilter.c b/server/modules/filter/testfilter/testfilter.c index 0288437d3..c23d17a38 100644 --- a/server/modules/filter/testfilter/testfilter.c +++ b/server/modules/filter/testfilter/testfilter.c @@ -69,7 +69,7 @@ typedef struct * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { static FILTER_OBJECT MyObject = { @@ -86,10 +86,10 @@ MODULE_INFO* MXS_CREATE_MODULE() destroyInstance, }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_FILTER, - MODULE_BETA_RELEASE, + MXS_MODULE_API_FILTER, + MXS_MODULE_BETA_RELEASE, FILTER_VERSION, "A simple query counting filter", "V2.0.0", diff --git a/server/modules/filter/topfilter/topfilter.c b/server/modules/filter/topfilter/topfilter.c index 9a7a9e389..ff247ac6e 100644 --- a/server/modules/filter/topfilter/topfilter.c +++ b/server/modules/filter/topfilter/topfilter.c @@ -123,7 +123,7 @@ typedef struct * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { static FILTER_OBJECT MyObject = { @@ -140,10 +140,10 @@ MODULE_INFO* MXS_CREATE_MODULE() NULL, // No destroyInstance }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_FILTER, - MODULE_GA, + MXS_MODULE_API_FILTER, + MXS_MODULE_GA, FILTER_VERSION, "A top N query logging filter", "V1.0.1", diff --git a/server/modules/filter/tpmfilter/tpmfilter.c b/server/modules/filter/tpmfilter/tpmfilter.c index 4cfdb61e9..73fc4b6b0 100644 --- a/server/modules/filter/tpmfilter/tpmfilter.c +++ b/server/modules/filter/tpmfilter/tpmfilter.c @@ -142,7 +142,7 @@ typedef struct * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { static FILTER_OBJECT MyObject = { @@ -159,10 +159,10 @@ MODULE_INFO* MXS_CREATE_MODULE() NULL, // No destroyInstance }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_FILTER, - MODULE_GA, + MXS_MODULE_API_FILTER, + MXS_MODULE_GA, FILTER_VERSION, "Transaction Performance Monitoring filter", "V1.0.1", diff --git a/server/modules/monitor/auroramon/auroramon.c b/server/modules/monitor/auroramon/auroramon.c index 3136d0097..44da361a2 100644 --- a/server/modules/monitor/auroramon/auroramon.c +++ b/server/modules/monitor/auroramon/auroramon.c @@ -344,7 +344,7 @@ diagnostics(DCB *dcb, const MONITOR *mon) * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { static MONITOR_OBJECT MyObject = { @@ -353,10 +353,10 @@ MODULE_INFO* MXS_CREATE_MODULE() diagnostics }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_MONITOR, - MODULE_BETA_RELEASE, + MXS_MODULE_API_MONITOR, + MXS_MODULE_BETA_RELEASE, MONITOR_VERSION, "Aurora monitor", "V1.0.0", diff --git a/server/modules/monitor/galeramon/galeramon.c b/server/modules/monitor/galeramon/galeramon.c index 5f6712318..273d4f1a5 100644 --- a/server/modules/monitor/galeramon/galeramon.c +++ b/server/modules/monitor/galeramon/galeramon.c @@ -59,7 +59,7 @@ bool isGaleraEvent(monitor_event_t event); * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { MXS_NOTICE("Initialise the MySQL Galera Monitor module."); @@ -70,10 +70,10 @@ MODULE_INFO* MXS_CREATE_MODULE() diagnostics }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_MONITOR, - MODULE_GA, + MXS_MODULE_API_MONITOR, + MXS_MODULE_GA, MONITOR_VERSION, "A Galera cluster monitor", "V2.0.0", diff --git a/server/modules/monitor/mmmon/mmmon.c b/server/modules/monitor/mmmon/mmmon.c index 5347b822d..bb44ee751 100644 --- a/server/modules/monitor/mmmon/mmmon.c +++ b/server/modules/monitor/mmmon/mmmon.c @@ -35,10 +35,10 @@ static void monitorMain(void *); * lint directives. */ /*lint -e14 */ -MODULE_INFO info = +MXS_MODULE info = { - MODULE_API_MONITOR, - MODULE_BETA_RELEASE, + MXS_MODULE_API_MONITOR, + MXS_MODULE_BETA_RELEASE, MONITOR_VERSION, "A Multi-Master Multi Master monitor", "V1.1.1" @@ -60,7 +60,7 @@ static bool isMySQLEvent(monitor_event_t event); * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { MXS_NOTICE("Initialise the Multi-Master Monitor module."); @@ -71,10 +71,10 @@ MODULE_INFO* MXS_CREATE_MODULE() diagnostics }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_MONITOR, - MODULE_BETA_RELEASE, + MXS_MODULE_API_MONITOR, + MXS_MODULE_BETA_RELEASE, MONITOR_VERSION, "A Multi-Master Multi Master monitor", "V1.1.1", diff --git a/server/modules/monitor/mysqlmon/mysql_mon.c b/server/modules/monitor/mysqlmon/mysql_mon.c index bc1fe5707..1dff9dd6f 100644 --- a/server/modules/monitor/mysqlmon/mysql_mon.c +++ b/server/modules/monitor/mysqlmon/mysql_mon.c @@ -94,7 +94,7 @@ static const char* hb_table_name = "maxscale_schema.replication_heartbeat"; * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { MXS_NOTICE("Initialise the MySQL Monitor module."); @@ -105,10 +105,10 @@ MODULE_INFO* MXS_CREATE_MODULE() diagnostics }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_MONITOR, - MODULE_GA, + MXS_MODULE_API_MONITOR, + MXS_MODULE_GA, MONITOR_VERSION, "A MySQL Master/Slave replication monitor", "V1.5.0", diff --git a/server/modules/monitor/ndbclustermon/ndbclustermon.c b/server/modules/monitor/ndbclustermon/ndbclustermon.c index 9a7ec482e..f5c7e1878 100644 --- a/server/modules/monitor/ndbclustermon/ndbclustermon.c +++ b/server/modules/monitor/ndbclustermon/ndbclustermon.c @@ -53,7 +53,7 @@ bool isNdbEvent(monitor_event_t event); * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { MXS_NOTICE("Initialise the MySQL Cluster Monitor module."); @@ -64,10 +64,10 @@ MODULE_INFO* MXS_CREATE_MODULE() diagnostics }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_MONITOR, - MODULE_BETA_RELEASE, + MXS_MODULE_API_MONITOR, + MXS_MODULE_BETA_RELEASE, MONITOR_VERSION, "A MySQL cluster SQL node monitor", "V2.1.0", diff --git a/server/modules/protocol/CDC/cdc.c b/server/modules/protocol/CDC/cdc.c index 22f2e493c..d9d1ce518 100644 --- a/server/modules/protocol/CDC/cdc.c +++ b/server/modules/protocol/CDC/cdc.c @@ -68,7 +68,7 @@ static char* cdc_default_auth() * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { static GWPROTOCOL MyObject = { @@ -86,10 +86,10 @@ MODULE_INFO* MXS_CREATE_MODULE() cdc_default_auth /* default authentication */ }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_PROTOCOL, - MODULE_IN_DEVELOPMENT, + MXS_MODULE_API_PROTOCOL, + MXS_MODULE_IN_DEVELOPMENT, GWPROTOCOL_VERSION, "A Change Data Capture Listener implementation for use in binlog events retrieval", "V1.0.0" diff --git a/server/modules/protocol/HTTPD/httpd.c b/server/modules/protocol/HTTPD/httpd.c index 9c51eec2a..7882b3148 100644 --- a/server/modules/protocol/HTTPD/httpd.c +++ b/server/modules/protocol/HTTPD/httpd.c @@ -63,7 +63,7 @@ static char *httpd_default_auth(); * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { static GWPROTOCOL MyObject = { @@ -82,10 +82,10 @@ MODULE_INFO* MXS_CREATE_MODULE() NULL /**< Connection limit reached */ }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_PROTOCOL, - MODULE_IN_DEVELOPMENT, + MXS_MODULE_API_PROTOCOL, + MXS_MODULE_IN_DEVELOPMENT, GWPROTOCOL_VERSION, "An experimental HTTPD implementation for use in administration", "V1.2.0", diff --git a/server/modules/protocol/MySQL/MySQLBackend/mysql_backend.c b/server/modules/protocol/MySQL/MySQLBackend/mysql_backend.c index 028f13af8..bc8da0203 100644 --- a/server/modules/protocol/MySQL/MySQLBackend/mysql_backend.c +++ b/server/modules/protocol/MySQL/MySQLBackend/mysql_backend.c @@ -85,7 +85,7 @@ static int gw_send_change_user_to_backend(char *dbname, * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { static GWPROTOCOL MyObject = { @@ -104,10 +104,10 @@ MODULE_INFO* MXS_CREATE_MODULE() NULL /* Connection limit reached */ }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_PROTOCOL, - MODULE_GA, + MXS_MODULE_API_PROTOCOL, + MXS_MODULE_GA, GWPROTOCOL_VERSION, "The MySQL to backend server protocol", "V2.0.0", diff --git a/server/modules/protocol/MySQL/MySQLClient/mysql_client.c b/server/modules/protocol/MySQL/MySQLClient/mysql_client.c index 8364d0199..9d0796c59 100644 --- a/server/modules/protocol/MySQL/MySQLClient/mysql_client.c +++ b/server/modules/protocol/MySQL/MySQLClient/mysql_client.c @@ -93,7 +93,7 @@ static void gw_process_one_new_client(DCB *client_dcb); * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { static GWPROTOCOL MyObject = { @@ -112,10 +112,10 @@ MODULE_INFO* MXS_CREATE_MODULE() gw_connection_limit /* Send error connection limit */ }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_PROTOCOL, - MODULE_GA, + MXS_MODULE_API_PROTOCOL, + MXS_MODULE_GA, GWPROTOCOL_VERSION, "The client to MaxScale MySQL protocol implementation", "V1.1.0", diff --git a/server/modules/protocol/maxscaled/maxscaled.c b/server/modules/protocol/maxscaled/maxscaled.c index d4e46e110..f3687497f 100644 --- a/server/modules/protocol/maxscaled/maxscaled.c +++ b/server/modules/protocol/maxscaled/maxscaled.c @@ -164,7 +164,7 @@ static bool authenticate_socket(MAXSCALED *protocol, DCB *dcb) * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { MXS_INFO("Initialise MaxScaled Protocol module."); @@ -185,10 +185,10 @@ MODULE_INFO* MXS_CREATE_MODULE() NULL /**< Connection limit reached */ }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_PROTOCOL, - MODULE_GA, + MXS_MODULE_API_PROTOCOL, + MXS_MODULE_GA, GWPROTOCOL_VERSION, "A maxscale protocol for the administration interface", "V2.0.0", diff --git a/server/modules/protocol/telnetd/telnetd.c b/server/modules/protocol/telnetd/telnetd.c index c3ef87eb7..772b9ba8f 100644 --- a/server/modules/protocol/telnetd/telnetd.c +++ b/server/modules/protocol/telnetd/telnetd.c @@ -81,7 +81,7 @@ static void telnetd_echo(DCB *dcb, int enable); * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { MXS_INFO("Initialise Telnetd Protocol module."); @@ -102,10 +102,10 @@ MODULE_INFO* MXS_CREATE_MODULE() NULL /**< Connection limit reached */ }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_PROTOCOL, - MODULE_GA, + MXS_MODULE_API_PROTOCOL, + MXS_MODULE_GA, GWPROTOCOL_VERSION, "A telnet deamon protocol for simple administration interface", "V1.1.1", diff --git a/server/modules/protocol/testprotocol/testprotocol.c b/server/modules/protocol/testprotocol/testprotocol.c index 50da6fae7..5895692a7 100644 --- a/server/modules/protocol/testprotocol/testprotocol.c +++ b/server/modules/protocol/testprotocol/testprotocol.c @@ -52,7 +52,7 @@ static int test_connection_limit(DCB *dcb, int limit){return 0;} * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { static GWPROTOCOL MyObject = { @@ -71,10 +71,10 @@ MODULE_INFO* MXS_CREATE_MODULE() test_connection_limit /**< Connection limit */ }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_PROTOCOL, - MODULE_IN_DEVELOPMENT, + MXS_MODULE_API_PROTOCOL, + MXS_MODULE_IN_DEVELOPMENT, GWPROTOCOL_VERSION, "Test protocol", "V1.1.0", diff --git a/server/modules/routing/avrorouter/avro.c b/server/modules/routing/avrorouter/avro.c index d941c86fa..24723a712 100644 --- a/server/modules/routing/avrorouter/avro.c +++ b/server/modules/routing/avrorouter/avro.c @@ -126,7 +126,7 @@ bool avro_handle_convert(const MODULECMD_ARG *args) * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { spinlock_init(&instlock); instances = NULL; @@ -152,10 +152,10 @@ MODULE_INFO* MXS_CREATE_MODULE() NULL }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_ROUTER, - MODULE_GA, + MXS_MODULE_API_ROUTER, + MXS_MODULE_GA, ROUTER_VERSION, "Binlogrouter", "V1.0.0", diff --git a/server/modules/routing/binlogrouter/blr.c b/server/modules/routing/binlogrouter/blr.c index 764bde723..c88b94796 100644 --- a/server/modules/routing/binlogrouter/blr.c +++ b/server/modules/routing/binlogrouter/blr.c @@ -134,7 +134,7 @@ static ROUTER_INSTANCE *instances; * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { MXS_NOTICE("Initialise binlog router module."); spinlock_init(&instlock); @@ -154,10 +154,10 @@ MODULE_INFO* MXS_CREATE_MODULE() destroyInstance }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_ROUTER, - MODULE_GA, + MXS_MODULE_API_ROUTER, + MXS_MODULE_GA, ROUTER_VERSION, "Binlogrouter", "V2.1.0", diff --git a/server/modules/routing/cli/cli.c b/server/modules/routing/cli/cli.c index 1bee7aee1..bf0b17c5a 100644 --- a/server/modules/routing/cli/cli.c +++ b/server/modules/routing/cli/cli.c @@ -62,7 +62,7 @@ static CLI_INSTANCE *instances; * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { MXS_NOTICE("Initialise CLI router module"); spinlock_init(&instlock); @@ -82,10 +82,10 @@ MODULE_INFO* MXS_CREATE_MODULE() NULL }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_ROUTER, - MODULE_GA, + MXS_MODULE_API_ROUTER, + MXS_MODULE_GA, ROUTER_VERSION, "The admin user interface", "V1.0.0", diff --git a/server/modules/routing/debugcli/debugcli.c b/server/modules/routing/debugcli/debugcli.c index e82924e90..5f6d92f2f 100644 --- a/server/modules/routing/debugcli/debugcli.c +++ b/server/modules/routing/debugcli/debugcli.c @@ -61,7 +61,7 @@ static CLI_INSTANCE *instances; * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { MXS_NOTICE("Initialise debug CLI router module."); spinlock_init(&instlock); @@ -81,10 +81,10 @@ MODULE_INFO* MXS_CREATE_MODULE() NULL }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_ROUTER, - MODULE_GA, + MXS_MODULE_API_ROUTER, + MXS_MODULE_GA, ROUTER_VERSION, "The debug user interface", "V1.1.1", diff --git a/server/modules/routing/maxinfo/maxinfo.c b/server/modules/routing/maxinfo/maxinfo.c index e2ce2381c..5c628cd4a 100644 --- a/server/modules/routing/maxinfo/maxinfo.c +++ b/server/modules/routing/maxinfo/maxinfo.c @@ -85,7 +85,7 @@ static INFO_INSTANCE *instances; * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { MXS_NOTICE("Initialise MaxInfo router module."); spinlock_init(&instlock); @@ -105,10 +105,10 @@ MODULE_INFO* MXS_CREATE_MODULE() NULL }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_ROUTER, - MODULE_ALPHA_RELEASE, + MXS_MODULE_API_ROUTER, + MXS_MODULE_ALPHA_RELEASE, ROUTER_VERSION, "The MaxScale Information Schema", "V1.0.0", diff --git a/server/modules/routing/readconnroute/readconnroute.c b/server/modules/routing/readconnroute/readconnroute.c index d129069c5..dd4e97316 100644 --- a/server/modules/routing/readconnroute/readconnroute.c +++ b/server/modules/routing/readconnroute/readconnroute.c @@ -118,7 +118,7 @@ static ROUTER_INSTANCE *instances; * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { MXS_NOTICE("Initialise readconnroute router module."); spinlock_init(&instlock); @@ -138,10 +138,10 @@ MODULE_INFO* MXS_CREATE_MODULE() NULL }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_ROUTER, - MODULE_GA, + MXS_MODULE_API_ROUTER, + MXS_MODULE_GA, ROUTER_VERSION, "A connection based router to load balance based on connections", "V1.1.0", diff --git a/server/modules/routing/readwritesplit/readwritesplit.c b/server/modules/routing/readwritesplit/readwritesplit.c index e62479673..d5e7d7297 100644 --- a/server/modules/routing/readwritesplit/readwritesplit.c +++ b/server/modules/routing/readwritesplit/readwritesplit.c @@ -113,7 +113,7 @@ static bool create_backends(ROUTER_CLIENT_SES *rses, backend_ref_t** dest, int* * * @return The module object */ -MODULE_INFO *MXS_CREATE_MODULE() +MXS_MODULE *MXS_CREATE_MODULE() { static ROUTER_OBJECT MyObject = { @@ -129,9 +129,9 @@ MODULE_INFO *MXS_CREATE_MODULE() NULL }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_ROUTER, MODULE_GA, ROUTER_VERSION, + MXS_MODULE_API_ROUTER, MXS_MODULE_GA, ROUTER_VERSION, "A Read/Write splitting router for enhancement read scalability", "V1.1.0", &MyObject diff --git a/server/modules/routing/schemarouter/schemarouter.c b/server/modules/routing/schemarouter/schemarouter.c index c93d54a8e..00f36babe 100644 --- a/server/modules/routing/schemarouter/schemarouter.c +++ b/server/modules/routing/schemarouter/schemarouter.c @@ -591,7 +591,7 @@ bool check_shard_status(ROUTER_INSTANCE* router, char* shard) * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { MXS_NOTICE("Initializing Schema Sharding Router."); spinlock_init(&instlock); @@ -611,10 +611,10 @@ MODULE_INFO* MXS_CREATE_MODULE() NULL }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_ROUTER, - MODULE_BETA_RELEASE, + MXS_MODULE_API_ROUTER, + MXS_MODULE_BETA_RELEASE, ROUTER_VERSION, "A database sharding router for simple sharding", "V1.0.0", diff --git a/server/modules/routing/testroute/testroute.c b/server/modules/routing/testroute/testroute.c index a28ddf3a0..1ff4dbdd5 100644 --- a/server/modules/routing/testroute/testroute.c +++ b/server/modules/routing/testroute/testroute.c @@ -46,7 +46,7 @@ typedef struct * * @return The module object */ -MODULE_INFO* MXS_CREATE_MODULE() +MXS_MODULE* MXS_CREATE_MODULE() { static ROUTER_OBJECT MyObject = { @@ -62,10 +62,10 @@ MODULE_INFO* MXS_CREATE_MODULE() NULL }; - static MODULE_INFO info = + static MXS_MODULE info = { - MODULE_API_ROUTER, - MODULE_IN_DEVELOPMENT, + MXS_MODULE_API_ROUTER, + MXS_MODULE_IN_DEVELOPMENT, ROUTER_VERSION, "A test router - not for use in real systems", "V1.0.0",