pcrs_filter_response(): Fix format specifiers in a log message
[privoxy.git] / filters.c
index c7e71f8..973c5d1 100644 (file)
--- a/filters.c
+++ b/filters.c
 #include <assert.h>
 
 #ifndef _WIN32
-#ifndef __OS2__
 #include <unistd.h>
-#endif /* ndef __OS2__ */
 #include <netinet/in.h>
 #else
 #include <winsock2.h>
 #endif /* ndef _WIN32 */
 
-#ifdef __OS2__
-#include <utils.h>
-#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;
       }