From 527a82d1aeca7155c6e8193bf7cf90b625875f17 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 31 Dec 2006 22:21:33 +0000 Subject: [PATCH] Skip empty filter files in filter_header() but don't ignore the ones that come afterwards. Fixes BR 1619208, this time for real. --- parsers.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/parsers.c b/parsers.c index 77120cd7..032dc833 100644 --- a/parsers.c +++ b/parsers.c @@ -1,4 +1,4 @@ -const char parsers_rcs[] = "$Id: parsers.c,v 1.79 2006/12/29 18:04:40 fabiankeil Exp $"; +const char parsers_rcs[] = "$Id: parsers.c,v 1.80 2006/12/29 19:08:22 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/parsers.c,v $ @@ -45,6 +45,10 @@ const char parsers_rcs[] = "$Id: parsers.c,v 1.79 2006/12/29 18:04:40 fabiankeil * * Revisions : * $Log: parsers.c,v $ + * Revision 1.80 2006/12/29 19:08:22 fabiankeil + * Reverted parts of my last commit + * to keep error handling working. + * * Revision 1.79 2006/12/29 18:04:40 fabiankeil * Fixed gcc43 conversion warnings. * @@ -1087,14 +1091,25 @@ jb_err filter_header(struct client_state *csp, char **header) if (0 == found_filters) { log_error(LOG_LEVEL_ERROR, "Unable to get current state of regexp filtering."); - return(JB_ERR_OK); + return(JB_ERR_OK); } for (i = 0; i < MAX_AF_FILES; i++) { fl = csp->rlist[i]; if ((NULL == fl) || (NULL == fl->f)) - break; + { + /* + * Either there are no filter files + * left, or this filter file just + * contains no valid filters. + * + * Continue to be sure we don't miss + * valid filter files that are chained + * after empty or invalid ones. + */ + continue; + } /* * For all applying +filter actions, look if a filter by that * name exists and if yes, execute its pcrs_joblist on the -- 2.39.2