MXS-2304 Remove remaining uses of config_get_string() from module code

The function returns a pointer to an internal string and should not be
used.
This commit is contained in:
Esa Korhonen
2019-02-04 16:07:09 +02:00
parent 5ab7734e9d
commit 78d9ef2910
7 changed files with 22 additions and 40 deletions

View File

@ -1909,11 +1909,6 @@ bool config_get_compiled_regexes(const MXS_CONFIG_PARAMETER* params,
}
string MXS_CONFIG_PARAMETER::get_string(const std::string& key) const
{
return get_c_str(key);
}
const char* MXS_CONFIG_PARAMETER::get_c_str(const std::string& key) const
{
return config_get_string(this, key.c_str());
}

View File

@ -245,3 +245,13 @@ bool config_can_modify_at_runtime(const char* name);
* @return The parameter or NULL if the parameter was not found
*/
MXS_CONFIG_PARAMETER* config_get_param(MXS_CONFIG_PARAMETER* params, const char* name);
/**
* @brief Get a string value
*
* @param params List of configuration parameters
* @param key Parameter name
*
* @return The raw string value or an empty string if no parameter was found
*/
const char* config_get_string(const MXS_CONFIG_PARAMETER* params, const char* key);