Move version entry point into MODULE_INFO

The MODULE_INFO can easily hold the version information of the
module. This removes the need for a explicit version entry point.
This commit is contained in:
Markus Mäkelä
2017-01-03 11:48:55 +02:00
parent d3907882d6
commit 7df29aa1ec
49 changed files with 127 additions and 700 deletions

View File

@ -47,11 +47,10 @@ MODULE_INFO info =
MODULE_API_AUTHENTICATOR,
MODULE_GA,
GWAUTHENTICATOR_VERSION,
"The CDC client to MaxScale authenticator implementation"
"The CDC client to MaxScale authenticator implementation",
"V1.1.0"
};
static char *version_str = "V1.1.0";
static int cdc_auth_set_protocol_data(DCB *dcb, GWBUF *buf);
static bool cdc_auth_is_client_ssl_capable(DCB *dcb);
static int cdc_auth_authenticate(DCB *dcb);
@ -90,16 +89,6 @@ static int cdc_auth_set_client_data(
int client_auth_packet_size
);
/**
* Implementation of the mandatory version entry point
*
* @return version string of the module
*/
char* version()
{
return version_str;
}
/**
* @brief Add a new CDC user
*

View File

@ -616,19 +616,10 @@ MODULE_INFO info =
MODULE_API_AUTHENTICATOR,
MODULE_GA,
GWAUTHENTICATOR_VERSION,
"GSSAPI authenticator"
"GSSAPI authenticator",
"V1.0.0"
};
static char version_str[] = "V1.0.0";
/**
* Version string entry point
*/
char* version()
{
return version_str;
}
/**
* Module initialization entry point
*/

View File

@ -280,19 +280,10 @@ MODULE_INFO info =
MODULE_API_AUTHENTICATOR,
MODULE_GA,
GWAUTHENTICATOR_VERSION,
"GSSAPI backend authenticator"
"GSSAPI backend authenticator",
"V1.0.0"
};
static char *version_str = "V1.0.0";
/**
* Version string entry point
*/
char* version()
{
return version_str;
}
/**
* Module initialization entry point
*/

View File

@ -43,12 +43,11 @@ MODULE_INFO info =
MODULE_API_AUTHENTICATOR,
MODULE_GA,
GWAUTHENTICATOR_VERSION,
"The MaxScale HTTP BA authenticator"
"The MaxScale HTTP BA authenticator",
"V1.1.0"
};
/*lint +e14 */
static char *version_str = "V1.1.0";
static int http_auth_set_protocol_data(DCB *dcb, GWBUF *buf);
static bool http_auth_is_client_ssl_capable(DCB *dcb);
static int http_auth_authenticate(DCB *dcb);
@ -75,20 +74,6 @@ typedef struct http_auth
char* pw;
}HTTP_AUTH;
/**
* Implementation of the mandatory version entry point
*
* @return version string of the module
*/
/* @see function load_module in load_utils.c for explanation of the following
* lint directives.
*/
/*lint -e14 */
char* version()
{
return version_str;
}
/**
* The module initialisation routine, called when the module
* is first loaded.

View File

@ -43,12 +43,11 @@ MODULE_INFO info =
MODULE_API_AUTHENTICATOR,
MODULE_GA,
GWAUTHENTICATOR_VERSION,
"The MaxScale Admin client authenticator implementation"
"The MaxScale Admin client authenticator implementation",
"V2.1.0"
};
/*lint +e14 */
static char *version_str = "V2.1.0";
static int max_admin_auth_set_protocol_data(DCB *dcb, GWBUF *buf);
static bool max_admin_auth_is_client_ssl_capable(DCB *dcb);
static int max_admin_auth_authenticate(DCB *dcb);
@ -69,20 +68,6 @@ static GWAUTHENTICATOR MyObject =
users_default_loadusers /* Load generic users */
};
/**
* Implementation of the mandatory version entry point
*
* @return version string of the module
*/
/* @see function load_module in load_utils.c for explanation of the following
* lint directives.
*/
/*lint -e14 */
char* version()
{
return version_str;
}
/**
* The module initialisation routine, called when the module
* is first loaded.

View File

@ -52,12 +52,11 @@ MODULE_INFO info =
MODULE_API_AUTHENTICATOR,
MODULE_GA,
GWAUTHENTICATOR_VERSION,
"The MySQL client to MaxScale authenticator implementation"
"The MySQL client to MaxScale authenticator implementation",
"V1.1.0"
};
/*lint +e14 */
static char *version_str = "V1.1.0";
static void* mysql_auth_init(char **options);
static int mysql_auth_set_protocol_data(DCB *dcb, GWBUF *buf);
static bool mysql_auth_is_client_ssl_capable(DCB *dcb);
@ -94,20 +93,6 @@ static int mysql_auth_set_client_data(
MySQLProtocol *protocol,
GWBUF *buffer);
/**
* Implementation of the mandatory version entry point
*
* @return version string of the module
*
* @see function load_module in load_utils.c for explanation of the following
* lint directives.
*/
/*lint -e14 */
char* version()
{
return version_str;
}
/**
* The module initialisation routine, called when the module
* is first loaded.

View File

@ -157,12 +157,11 @@ MODULE_INFO info =
MODULE_API_AUTHENTICATOR,
MODULE_GA,
GWAUTHENTICATOR_VERSION,
"The MySQL MaxScale to backend server authenticator"
"The MySQL MaxScale to backend server authenticator",
"V1.0.0"
};
/*lint +e14 */
static char *version_str = "V1.0.0";
/*
* The "module object" for mysql client authenticator module.
*/
@ -178,20 +177,6 @@ static GWAUTHENTICATOR MyObject =
NULL /* We don't need to load users */
};
/**
* Implementation of the mandatory version entry point
*
* @return version string of the module
*
* @see function load_module in load_utils.c for explanation of the following
* lint directives.
*/
/*lint -e14 */
char* version()
{
return version_str;
}
/**
* The module initialisation routine, called when the module
* is first loaded.

View File

@ -45,12 +45,11 @@ MODULE_INFO info =
MODULE_API_AUTHENTICATOR,
MODULE_GA,
GWAUTHENTICATOR_VERSION,
"The Null client authenticator implementation"
"The Null client authenticator implementation",
"V1.1.0"
};
/*lint +e14 */
static char *version_str = "V1.1.0";
static int null_auth_set_protocol_data(DCB *dcb, GWBUF *buf);
static bool null_auth_is_client_ssl_capable(DCB *dcb);
static int null_auth_authenticate(DCB *dcb);
@ -71,20 +70,6 @@ static GWAUTHENTICATOR MyObject =
users_default_loadusers /* Load generic users */
};
/**
* Implementation of the mandatory version entry point
*
* @return version string of the module
*
* @see function load_module in load_utils.c for explanation of the following
* lint directives.
*/
/*lint -e14 */
char* version()
{
return version_str;
}
/**
* The module initialisation routine, called when the module
* is first loaded.

View File

@ -42,12 +42,11 @@ MODULE_INFO info =
MODULE_API_AUTHENTICATOR,
MODULE_GA,
GWAUTHENTICATOR_VERSION,
"The Null client authenticator implementation"
"The Null client authenticator implementation",
"V1.1.0"
};
/*lint +e14 */
static char *version_str = "V1.1.0";
static int null_auth_set_protocol_data(DCB *dcb, GWBUF *buf);
static bool null_auth_is_client_ssl_capable(DCB *dcb);
static int null_auth_authenticate(DCB *dcb);
@ -68,20 +67,6 @@ static GWAUTHENTICATOR MyObject =
users_default_loadusers /* Load generic users */
};
/**
* Implementation of the mandatory version entry point
*
* @return version string of the module
*
* @see function load_module in load_utils.c for explanation of the following
* lint directives.
*/
/*lint -e14 */
char* version()
{
return version_str;
}
/**
* The module initialisation routine, called when the module
* is first loaded.