Combine ModuleInit and GetModuleObject
The two functions can be combined into one as both are called only once. This removes the need for the explicit ModuleInit function.
This commit is contained in:
@ -88,15 +88,6 @@ static GWPROTOCOL MyObject =
|
||||
cdc_default_auth /* default authentication */
|
||||
};
|
||||
|
||||
/**
|
||||
* The module initialisation routine, called when the module
|
||||
* is first loaded.
|
||||
*/
|
||||
void
|
||||
ModuleInit()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* The module entry point routine. It is this routine that
|
||||
* must populate the structure that is referred to as the
|
||||
|
||||
@ -89,14 +89,6 @@ static GWPROTOCOL MyObject =
|
||||
NULL /**< Connection limit reached */
|
||||
};
|
||||
|
||||
/**
|
||||
* The module initialisation routine, called when the module
|
||||
* is first loaded.
|
||||
*/
|
||||
void ModuleInit()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* The module entry point routine. It is this routine that
|
||||
* must populate the structure that is referred to as the
|
||||
|
||||
@ -112,14 +112,6 @@ static GWPROTOCOL MyObject =
|
||||
NULL /* Connection limit reached */
|
||||
};
|
||||
|
||||
/*
|
||||
* The module initialisation routine, called when the module
|
||||
* is first loaded.
|
||||
*/
|
||||
void ModuleInit()
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* The module entry point routine. It is this routine that
|
||||
* must populate the structure that is referred to as the
|
||||
|
||||
@ -114,14 +114,6 @@ static GWPROTOCOL MyObject =
|
||||
gw_connection_limit /* Send error connection limit */
|
||||
};
|
||||
|
||||
/**
|
||||
* The module initialisation routine, called when the module
|
||||
* is first loaded.
|
||||
*/
|
||||
void ModuleInit()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* The module entry point routine. It is this routine that
|
||||
* must populate the structure that is referred to as the
|
||||
|
||||
@ -191,15 +191,6 @@ static GWPROTOCOL MyObject =
|
||||
NULL /**< Connection limit reached */
|
||||
};
|
||||
|
||||
/**
|
||||
* The module initialisation routine, called when the module
|
||||
* is first loaded.
|
||||
*/
|
||||
void ModuleInit()
|
||||
{
|
||||
MXS_INFO("Initialise MaxScaled Protocol module.");;
|
||||
}
|
||||
|
||||
/**
|
||||
* The module entry point routine. It is this routine that
|
||||
* must populate the structure that is referred to as the
|
||||
@ -210,6 +201,7 @@ void ModuleInit()
|
||||
*/
|
||||
GWPROTOCOL* GetModuleObject()
|
||||
{
|
||||
MXS_INFO("Initialise MaxScaled Protocol module.");
|
||||
return &MyObject;
|
||||
}
|
||||
/*lint +e14 */
|
||||
|
||||
@ -102,15 +102,6 @@ static GWPROTOCOL MyObject =
|
||||
static void telnetd_command(DCB *, unsigned char *cmd);
|
||||
static void telnetd_echo(DCB *dcb, int enable);
|
||||
|
||||
/**
|
||||
* The module initialisation routine, called when the module
|
||||
* is first loaded.
|
||||
*/
|
||||
void ModuleInit()
|
||||
{
|
||||
MXS_INFO("Initialise Telnetd Protocol module.");
|
||||
}
|
||||
|
||||
/**
|
||||
* The module entry point routine. It is this routine that
|
||||
* must populate the structure that is referred to as the
|
||||
@ -121,6 +112,7 @@ void ModuleInit()
|
||||
*/
|
||||
GWPROTOCOL* GetModuleObject()
|
||||
{
|
||||
MXS_INFO("Initialise Telnetd Protocol module.");
|
||||
return &MyObject;
|
||||
}
|
||||
/*lint +e14 */
|
||||
|
||||
@ -77,14 +77,6 @@ static GWPROTOCOL MyObject =
|
||||
test_connection_limit /**< Connection limit */
|
||||
};
|
||||
|
||||
/**
|
||||
* The module initialisation routine, called when the module
|
||||
* is first loaded.
|
||||
*/
|
||||
void ModuleInit()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* The module entry point routine. It is this routine that
|
||||
* must populate the structure that is referred to as the
|
||||
|
||||
Reference in New Issue
Block a user