From 8b2342e2a6010ea47837215cbdbd3b79d9ba3da0 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Tue, 6 Aug 2013 12:59:34 +0000 Subject: [PATCH] Do not repeatedly complain about missing header taggers or filters ... ... when trying to execute them. Nowadays Privoxy already warns about missing filters and taggers after loading action files. One log message per missing filter or tagger should be enough. --- parsers.c | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/parsers.c b/parsers.c index 4b4e9b7f..bd5d33d2 100644 --- a/parsers.c +++ b/parsers.c @@ -1,4 +1,4 @@ -const char parsers_rcs[] = "$Id: parsers.c,v 1.277 2013/04/23 09:43:25 fabiankeil Exp $"; +const char parsers_rcs[] = "$Id: parsers.c,v 1.278 2013/08/06 12:58:28 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/parsers.c,v $ @@ -1296,16 +1296,10 @@ static jb_err header_tagger(struct client_state *csp, char *header) multi_action_index = ACTION_MULTI_CLIENT_HEADER_TAGGER; } - if (list_is_empty(csp->action->multi[multi_action_index])) + if (list_is_empty(csp->action->multi[multi_action_index]) + || filters_available(csp) == FALSE) { - /* No appropriate tagger enabled, nothing left to do. */ - return JB_ERR_OK; - } - - if (filters_available(csp) == FALSE) - { - log_error(LOG_LEVEL_ERROR, "Inconsistent configuration: " - "tagging enabled, but no taggers available."); + /* Return early if no taggers apply or if none are available. */ return JB_ERR_OK; } @@ -1505,16 +1499,10 @@ static jb_err filter_header(struct client_state *csp, char **header) multi_action_index = ACTION_MULTI_CLIENT_HEADER_FILTER; } - if (list_is_empty(csp->action->multi[multi_action_index])) - { - /* No appropriate header filter enabled, nothing left to do. */ - return JB_ERR_OK; - } - - if (filters_available(csp) == FALSE) + if (list_is_empty(csp->action->multi[multi_action_index]) + || filters_available(csp) == FALSE) { - log_error(LOG_LEVEL_ERROR, "Inconsistent configuration: " - "header filtering enabled, but no matching filters available."); + /* Return early if no filters apply or if none are available. */ return JB_ERR_OK; } -- 2.39.2