Fix filters parameter processing
The filter names for the service parameter `filters` weren't converted into the new format. This caused a configuration error when a filter with significant whitespace in its name was used in a service.
This commit is contained in:
@ -142,4 +142,11 @@ void config_add_module_params_json(const MXS_MODULE* mod,
|
|||||||
const char** type_params,
|
const char** type_params,
|
||||||
json_t* output);
|
json_t* output);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Convert section names to new format
|
||||||
|
*
|
||||||
|
* @param section Section name to fix
|
||||||
|
*/
|
||||||
|
void fix_section_name(char *section);
|
||||||
|
|
||||||
MXS_END_DECLS
|
MXS_END_DECLS
|
||||||
|
@ -1222,6 +1222,8 @@ serviceSetFilters(SERVICE *service, char *filters)
|
|||||||
ptr = strtok_r(filters, "|", &brkt);
|
ptr = strtok_r(filters, "|", &brkt);
|
||||||
while (ptr)
|
while (ptr)
|
||||||
{
|
{
|
||||||
|
fix_section_name(ptr);
|
||||||
|
|
||||||
n++;
|
n++;
|
||||||
MXS_FILTER_DEF **tmp;
|
MXS_FILTER_DEF **tmp;
|
||||||
if ((tmp = (MXS_FILTER_DEF **) MXS_REALLOC(flist,
|
if ((tmp = (MXS_FILTER_DEF **) MXS_REALLOC(flist,
|
||||||
|
Reference in New Issue
Block a user