Don't complain about missing header taggers or filters ...
authorFabian Keil <fk@fabiankeil.de>
Tue, 6 Aug 2013 12:58:28 +0000 (12:58 +0000)
committerFabian Keil <fk@fabiankeil.de>
Tue, 6 Aug 2013 12:58:28 +0000 (12:58 +0000)
... just because no filter file is being used. As long as no action
file is referencing any header taggers or filters that's perfectly
fine.

Reported by Stefan Kurtz in #3614835.

parsers.c

index 90ba241..4b4e9b7 100644 (file)
--- a/parsers.c
+++ b/parsers.c
@@ -1,4 +1,4 @@
-const char parsers_rcs[] = "$Id: parsers.c,v 1.276 2013/03/20 11:31:20 fabiankeil Exp $";
+const char parsers_rcs[] = "$Id: parsers.c,v 1.277 2013/04/23 09:43:25 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/parsers.c,v $
@@ -1296,6 +1296,12 @@ 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]))
+   {
+      /* No appropriate tagger enabled, nothing left to do. */
+      return JB_ERR_OK;
+   }
+
    if (filters_available(csp) == FALSE)
    {
       log_error(LOG_LEVEL_ERROR, "Inconsistent configuration: "
@@ -1499,6 +1505,12 @@ 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)
    {
       log_error(LOG_LEVEL_ERROR, "Inconsistent configuration: "