Commit 03cddd0a authored by Max Kellermann's avatar Max Kellermann

FilterConfig: return bool

parent 04a737e0
......@@ -86,15 +86,12 @@ filter_chain_append_new(Filter &chain, const char *template_name, Error &error)
return true;
}
unsigned int
bool
filter_chain_parse(Filter &chain, const char *spec, Error &error)
{
// Split on comma
gchar** tokens = g_strsplit_set(spec, ",", 255);
unsigned added_filters = 0;
// Add each name to the filter chain by instantiating an actual filter
char **template_names = tokens;
while (*template_names != NULL) {
......@@ -102,14 +99,12 @@ filter_chain_parse(Filter &chain, const char *spec, Error &error)
g_strstrip(*template_names);
if (!filter_chain_append_new(chain, *template_names, error))
break;
++added_filters;
return false;
++template_names;
}
g_strfreev(tokens);
return added_filters;
return true;
}
......@@ -35,9 +35,9 @@ class Error;
* @param chain the chain to append filters on
* @param spec the filter chain specification
* @param error_r space to return an error description
* @return the number of filters which were successfully added
* @return true on success
*/
unsigned int
bool
filter_chain_parse(Filter &chain, const char *spec, Error &error);
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment