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:
@ -95,11 +95,10 @@ MODULE_INFO info =
|
||||
MODULE_API_ROUTER,
|
||||
MODULE_GA,
|
||||
ROUTER_VERSION,
|
||||
"A connection based router to load balance based on connections"
|
||||
"A connection based router to load balance based on connections",
|
||||
"V1.1.0"
|
||||
};
|
||||
|
||||
static char *version_str = "V1.1.0";
|
||||
|
||||
/* The router entry points */
|
||||
static ROUTER *createInstance(SERVICE *service, char **options);
|
||||
static void *newSession(ROUTER *instance, SESSION *session);
|
||||
@ -138,17 +137,6 @@ static int handle_state_switch(DCB* dcb, DCB_REASON reason, void * routersession
|
||||
static SPINLOCK instlock;
|
||||
static ROUTER_INSTANCE *instances;
|
||||
|
||||
/**
|
||||
* Implementation of the mandatory version entry point
|
||||
*
|
||||
* @return version string of the module
|
||||
*/
|
||||
char *
|
||||
version()
|
||||
{
|
||||
return version_str;
|
||||
}
|
||||
|
||||
/**
|
||||
* The module initialisation routine, called when the module
|
||||
* is first loaded.
|
||||
@ -156,7 +144,7 @@ version()
|
||||
void
|
||||
ModuleInit()
|
||||
{
|
||||
MXS_NOTICE("Initialise readconnroute router module %s.", version_str);
|
||||
MXS_NOTICE("Initialise readconnroute router module.");
|
||||
spinlock_init(&instlock);
|
||||
instances = NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user