aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/FilterConfig.cxx11
-rw-r--r--src/FilterConfig.hxx4
2 files changed, 5 insertions, 10 deletions
diff --git a/src/FilterConfig.cxx b/src/FilterConfig.cxx
index 2af44b9c0..0b0509af3 100644
--- a/src/FilterConfig.cxx
+++ b/src/FilterConfig.cxx
@@ -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;
}
diff --git a/src/FilterConfig.hxx b/src/FilterConfig.hxx
index 3e6553b8d..6b074b930 100644
--- a/src/FilterConfig.hxx
+++ b/src/FilterConfig.hxx
@@ -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