Remove unused and confusing variable
The global version_string variable was never set.
This commit is contained in:
parent
7deed35587
commit
06d1189e94
@ -245,7 +245,6 @@ typedef struct
|
||||
bool config_check; /**< Only check config */
|
||||
int n_threads; /**< Number of polling threads */
|
||||
size_t thread_stack_size; /**< The stack size of each worker thread */
|
||||
char* version_string; /**< The version string of embedded db library */
|
||||
char release_string[RELEASE_STR_LENGTH]; /**< The release name string of the system */
|
||||
char sysname[SYSNAME_LEN]; /**< The OS name of the system */
|
||||
uint8_t mac_sha1[SHA_DIGEST_LENGTH]; /**< The SHA1 digest of an interface MAC address
|
||||
|
@ -234,7 +234,6 @@ void config_fix_param(const MXS_MODULE_PARAM* params, MXS_CONFIG_PARAMETER
|
||||
|
||||
static const char* config_file = NULL;
|
||||
static MXS_CONFIG gateway;
|
||||
char* version_string = NULL;
|
||||
static bool is_persisted_config = false; /**< True if a persisted configuration file is being parsed */
|
||||
static CONFIG_CONTEXT config_context;
|
||||
|
||||
@ -2818,15 +2817,6 @@ void config_set_global_defaults()
|
||||
}
|
||||
}
|
||||
|
||||
if (version_string != NULL)
|
||||
{
|
||||
gateway.version_string = MXS_STRDUP_A(version_string);
|
||||
}
|
||||
else
|
||||
{
|
||||
gateway.version_string = NULL;
|
||||
}
|
||||
|
||||
/* get release string */
|
||||
if (!config_get_release_string(gateway.release_string))
|
||||
{
|
||||
|
@ -135,17 +135,9 @@ Service* service_alloc(const char* name, const char* router, MXS_CONFIG_PARAMETE
|
||||
|
||||
static std::string get_version_string(MXS_CONFIG_PARAMETER* params)
|
||||
{
|
||||
|
||||
std::string version_string = config_get_string(params, CN_VERSION_STRING);
|
||||
|
||||
if (version_string.empty())
|
||||
{
|
||||
if (config_get_global_options()->version_string)
|
||||
{
|
||||
version_string = config_get_global_options()->version_string;
|
||||
}
|
||||
}
|
||||
else if (version_string[0] != '5')
|
||||
if (!version_string.empty() && version_string[0] != '5')
|
||||
{
|
||||
/**
|
||||
* Add the 5.5.5- string to the start of the version string if the version
|
||||
|
Loading…
x
Reference in New Issue
Block a user