From 7c6c4a2923736f6837e4088c5c948cd5c9d49330 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Mon, 30 Apr 2007 15:53:11 +0000 Subject: [PATCH] Make sure filters with dynamic jobs actually use them. --- filters.c | 9 +++++++-- parsers.c | 10 +++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/filters.c b/filters.c index 08c79a70..f6665bf0 100644 --- a/filters.c +++ b/filters.c @@ -1,4 +1,4 @@ -const char filters_rcs[] = "$Id: filters.c,v 1.85 2007/03/21 12:24:47 fabiankeil Exp $"; +const char filters_rcs[] = "$Id: filters.c,v 1.86 2007/04/30 15:03:28 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/filters.c,v $ @@ -40,6 +40,11 @@ const char filters_rcs[] = "$Id: filters.c,v 1.85 2007/03/21 12:24:47 fabiankeil * * Revisions : * $Log: filters.c,v $ + * Revision 1.86 2007/04/30 15:03:28 fabiankeil + * - Introduce dynamic pcrs jobs that can resolve variables. + * - Don't run redirect functions more than once, + * unless they are activated more than once. + * * Revision 1.85 2007/03/21 12:24:47 fabiankeil * - Log the content size after decompression in decompress_iob() * instead of pcrs_filter_response(). @@ -1948,7 +1953,7 @@ char *pcrs_filter_response(struct client_state *csp) prev_size = size; /* Apply all jobs from the joblist */ - for (job = b->joblist; NULL != job; job = job->next) + for (job = joblist; NULL != job; job = job->next) { job_number++; job_hits = pcrs_execute(job, old, size, &new, &size); diff --git a/parsers.c b/parsers.c index 5e646694..9d52898f 100644 --- a/parsers.c +++ b/parsers.c @@ -1,4 +1,4 @@ -const char parsers_rcs[] = "$Id: parsers.c,v 1.98 2007/04/17 18:32:10 fabiankeil Exp $"; +const char parsers_rcs[] = "$Id: parsers.c,v 1.99 2007/04/30 15:06:26 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/parsers.c,v $ @@ -44,6 +44,10 @@ const char parsers_rcs[] = "$Id: parsers.c,v 1.98 2007/04/17 18:32:10 fabiankeil * * Revisions : * $Log: parsers.c,v $ + * Revision 1.99 2007/04/30 15:06:26 fabiankeil + * - Introduce dynamic pcrs jobs that can resolve variables. + * - Remove unnecessary update_action_bits_for_all_tags() call. + * * Revision 1.98 2007/04/17 18:32:10 fabiankeil * - Make tagging based on tags set by earlier taggers * of the same kind possible. @@ -1829,7 +1833,7 @@ jb_err filter_header(struct client_state *csp, char **header) if (b->dynamic) joblist = compile_dynamic_pcrs_job_list(csp, b); - if ( NULL == b->joblist ) + if (NULL == joblist) { log_error(LOG_LEVEL_RE_FILTER, "Filter %s has empty joblist. Nothing to do.", b->name); continue; @@ -1839,7 +1843,7 @@ jb_err filter_header(struct client_state *csp, char **header) *header, size, b->name); /* Apply all jobs from the joblist */ - for (job = b->joblist; NULL != job; job = job->next) + for (job = joblist; NULL != job; job = job->next) { matches = pcrs_execute(job, *header, size, &newheader, &size); if ( 0 < matches ) -- 2.39.2