X-Git-Url: http://git.madism.org/?a=blobdiff_plain;ds=sidebyside;f=postlicyd%2Fconfig.c;fp=postlicyd%2Fconfig.c;h=67cfb29eb6553571cde13d75914ac64c91cb1cef;hb=dd53acce112e59a9ba35e3389c9bad4ea81480ca;hp=21e49d1b79f61b42dd2c489c109dfcb7e44aa1f6;hpb=d8b00b7c6eb72ef123eeb85016649742932c38d9;p=apps%2Fpfixtools.git diff --git a/postlicyd/config.c b/postlicyd/config.c index 21e49d1..67cfb29 100644 --- a/postlicyd/config.c +++ b/postlicyd/config.c @@ -38,6 +38,10 @@ #include "config.h" #include "str.h" +#define config_param_register(Param) + +config_param_register("first_filter"); + struct config_t { A(filter_t) filters; A(filter_params_t) params; @@ -235,9 +239,11 @@ read_param_value: READ_STRING("parameter value", value, value_len, ;); { filter_params_t param; - param.name = m_strdup(key); - param.value = m_strdup(value); - array_add(config->params, param); + param.type = param_tokenize(key, key_len); + if (param.type != ATK_UNKNOWN) { + param.value = m_strdup(value); + array_add(config->params, param); + } } goto read_section; @@ -266,9 +272,10 @@ read_filter: key + 3, filter.name); } } else { - if (!filter_add_param(&filter, key, key_len, value, value_len)) { - goto error; - } + /* filter_add_param failure mean unknown type or unsupported type. + * this are non-fatal errors. + */ + (void)filter_add_param(&filter, key, key_len, value, value_len); } } READ_NEXT(;);