Rename 'pages_modified' variable to 'response_bodies_modified'
authorFabian Keil <fk@fabiankeil.de>
Tue, 8 Sep 2020 13:07:24 +0000 (15:07 +0200)
committerFabian Keil <fk@fabiankeil.de>
Fri, 11 Sep 2020 14:35:39 +0000 (16:35 +0200)
... which is more precise as a page may consist of multiple responses.

cgisimple.c
filters.c

index d7c6ccd..4339ecd 100644 (file)
@@ -1146,15 +1146,15 @@ static char *get_filter_statistics_table(const struct client_state *csp)
         if (b->type == FT_CONTENT_FILTER)
         {
            unsigned long long executions;
-           unsigned long long pages_modified;
+           unsigned long long response_bodies_modified;
            unsigned long long hits;
 
-           get_filter_statistics(b->name, &executions, &pages_modified, &hits);
+           get_filter_statistics(b->name, &executions, &response_bodies_modified, &hits);
            snprintf(buf, sizeof(buf),
               "<tr><td>%s</td><td style=\"text-align: right\">%llu</td>"
               "<td style=\"text-align: right\">%llu</td>"
               "<td style=\"text-align: right\">%llu</td><tr>\n",
-              b->name, executions, pages_modified, hits);
+              b->name, executions, response_bodies_modified, hits);
 
            if (!err) err = string_append(&statistics, buf);
         }
index 9d350e7..2c9c352 100644 (file)
--- a/filters.c
+++ b/filters.c
@@ -2750,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;
@@ -2836,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;
@@ -2858,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;
@@ -2878,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;
       }