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:
Markus Mäkelä 2017-05-02 11:21:32 +03:00
parent fce0edce8e
commit dcbd91deee
2 changed files with 9 additions and 0 deletions

View File

@ -142,4 +142,11 @@ void config_add_module_params_json(const MXS_MODULE* mod,
const char** type_params,
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

View File

@ -1222,6 +1222,8 @@ serviceSetFilters(SERVICE *service, char *filters)
ptr = strtok_r(filters, "|", &brkt);
while (ptr)
{
fix_section_name(ptr);
n++;
MXS_FILTER_DEF **tmp;
if ((tmp = (MXS_FILTER_DEF **) MXS_REALLOC(flist,