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:
@ -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());
|
||||
}
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user