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:
@ -42,7 +42,8 @@ MODULE_INFO info =
|
||||
MODULE_API_PROTOCOL,
|
||||
MODULE_GA,
|
||||
GWPROTOCOL_VERSION,
|
||||
"A telnet deamon protocol for simple administration interface"
|
||||
"A telnet deamon protocol for simple administration interface",
|
||||
"V1.1.1"
|
||||
};
|
||||
/*lint +e14 */
|
||||
|
||||
@ -68,8 +69,6 @@ MODULE_INFO info =
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
static char *version_str = "V1.1.1";
|
||||
|
||||
static int telnetd_read_event(DCB* dcb);
|
||||
static int telnetd_write_event(DCB *dcb);
|
||||
static int telnetd_write(DCB *dcb, GWBUF *queue);
|
||||
@ -103,20 +102,6 @@ static GWPROTOCOL MyObject =
|
||||
static void telnetd_command(DCB *, unsigned char *cmd);
|
||||
static void telnetd_echo(DCB *dcb, int enable);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
|
||||
Reference in New Issue
Block a user