X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=filters.c;h=973c5d105d4d63da3fb2fdc0487db118586b8e1b;hp=c7e71f85ab2a9d0a632f7aafc72b11b80c639883;hb=fc4b3fb95f0c3fad1619b5c7f533632be91d42dc;hpb=23f625f4848f55342283b6ebc471735c14360bb1 diff --git a/filters.c b/filters.c index c7e71f85..973c5d10 100644 --- a/filters.c +++ b/filters.c @@ -42,18 +42,12 @@ #include #ifndef _WIN32 -#ifndef __OS2__ #include -#endif /* ndef __OS2__ */ #include #else #include #endif /* ndef _WIN32 */ -#ifdef __OS2__ -#include -#endif /* def __OS2__ */ - #include "project.h" #include "filters.h" #include "encode.h" @@ -1663,7 +1657,7 @@ static char *pcrs_filter_response(struct client_state *csp) if (b->dynamic) pcrs_free_joblist(joblist); log_error(LOG_LEVEL_RE_FILTER, - "filtering %s%s (size %d) with \'%s\' produced %d hits (new size %d).", + "filtering %s%s (size %lu) with \'%s\' produced %d hits (new size %lu).", csp->http->hostport, csp->http->path, prev_size, b->name, current_hits, size); #ifdef FEATURE_EXTENDED_STATISTICS update_filter_statistics(b->name, current_hits); @@ -2320,20 +2314,7 @@ void get_url_actions(struct client_state *csp, struct http_request *http) struct url_actions *b; int i; -#ifdef FEATURE_HTTPS_INSPECTION - if (!csp->http->client_ssl) -#endif - { - /* - * When filtering TLS traffic this function gets called a - * second time after the encrypted headers have been received. - * - * Only initialize the first time. The second time we apply - * the newly set actions on top of the ones that were set - * the first time. - */ - init_current_action(csp->action); - } + init_current_action(csp->action); for (i = 0; i < MAX_AF_FILES; i++) { @@ -2769,7 +2750,7 @@ struct filter_statistics_entry { char *filter; unsigned long long executions; - unsigned long long pages_modified; + unsigned long long response_bodies_modified; unsigned long long hits; struct filter_statistics_entry *next; @@ -2855,7 +2836,7 @@ void update_filter_statistics(const char *filter, int hits) entry->executions++; if (hits != 0) { - entry->pages_modified++; + entry->response_bodies_modified++; entry->hits += (unsigned)hits; } break; @@ -2877,14 +2858,15 @@ void update_filter_statistics(const char *filter, int hits) * Parameters : * 1 : filter = Name of the filter to get statistics for. * 2 : executions = Storage for the execution count. - * 3 : pages_modified = Storage for the number of modified pages. + * 3 : response_bodies_modified = Storage for the number + * of modified response bodies. * 4 : hits = Storage for the number of hits. * * Returns : void * *********************************************************************/ void get_filter_statistics(const char *filter, unsigned long long *executions, - unsigned long long *pages_modified, + unsigned long long *response_bodies_modified, unsigned long long *hits) { struct filter_statistics_entry *entry; @@ -2897,7 +2879,7 @@ void get_filter_statistics(const char *filter, unsigned long long *executions, if (!strcmp(entry->filter, filter)) { *executions = entry->executions; - *pages_modified = entry->pages_modified; + *response_bodies_modified = entry->response_bodies_modified; *hits = entry->hits; break; }