From c5a40240177ba7f8e30cdac6de6c15a3ddfeca54 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Tue, 16 Mar 2021 19:09:24 +0100 Subject: [PATCH 1/1] Rename the mutex used to protect the block reason statistics ... to be more precise so I can use the previous name in a following commit. --- filters.c | 14 +++++++------- jcc.c | 4 ++-- jcc.h | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/filters.c b/filters.c index 07830c3d..48259a83 100644 --- a/filters.c +++ b/filters.c @@ -3085,14 +3085,14 @@ void register_block_reason_for_statistics(const char *block_reason) { struct block_statistics_entry *entry; - privoxy_mutex_lock(&block_statistics_mutex); + privoxy_mutex_lock(&block_reason_statistics_mutex); if (block_statistics == NULL) { block_statistics = zalloc_or_die(sizeof(struct block_statistics_entry)); entry = block_statistics; entry->block_reason = strdup_or_die(block_reason); - privoxy_mutex_unlock(&block_statistics_mutex); + privoxy_mutex_unlock(&block_reason_statistics_mutex); return; } entry = block_statistics; @@ -3112,7 +3112,7 @@ void register_block_reason_for_statistics(const char *block_reason) entry = entry->next; } - privoxy_mutex_unlock(&block_statistics_mutex); + privoxy_mutex_unlock(&block_reason_statistics_mutex); } @@ -3133,7 +3133,7 @@ static void increment_block_reason_counter(const char *block_reason) { struct block_statistics_entry *entry; - privoxy_mutex_lock(&block_statistics_mutex); + privoxy_mutex_lock(&block_reason_statistics_mutex); entry = block_statistics; while (entry != NULL) @@ -3146,7 +3146,7 @@ static void increment_block_reason_counter(const char *block_reason) entry = entry->next; } - privoxy_mutex_unlock(&block_statistics_mutex); + privoxy_mutex_unlock(&block_reason_statistics_mutex); } @@ -3169,7 +3169,7 @@ void get_block_reason_count(const char *block_reason, unsigned long long *count) { struct block_statistics_entry *entry; - privoxy_mutex_lock(&block_statistics_mutex); + privoxy_mutex_lock(&block_reason_statistics_mutex); entry = block_statistics; while (entry != NULL) @@ -3182,7 +3182,7 @@ void get_block_reason_count(const char *block_reason, unsigned long long *count) entry = entry->next; } - privoxy_mutex_unlock(&block_statistics_mutex); + privoxy_mutex_unlock(&block_reason_statistics_mutex); } diff --git a/jcc.c b/jcc.c index 17aa0392..ef79d606 100644 --- a/jcc.c +++ b/jcc.c @@ -193,7 +193,7 @@ privoxy_mutex_t client_tags_mutex; #endif #ifdef FEATURE_EXTENDED_STATISTICS privoxy_mutex_t filter_statistics_mutex; -privoxy_mutex_t block_statistics_mutex; +privoxy_mutex_t block_reason_statistics_mutex; #endif #if !defined(HAVE_GETHOSTBYADDR_R) || !defined(HAVE_GETHOSTBYNAME_R) @@ -5283,7 +5283,7 @@ static void initialize_mutexes(void) #endif #ifdef FEATURE_EXTENDED_STATISTICS privoxy_mutex_init(&filter_statistics_mutex); - privoxy_mutex_init(&block_statistics_mutex); + privoxy_mutex_init(&block_reason_statistics_mutex); #endif /* diff --git a/jcc.h b/jcc.h index 3e170424..df513b83 100644 --- a/jcc.h +++ b/jcc.h @@ -88,7 +88,7 @@ extern privoxy_mutex_t client_tags_mutex; #ifdef FEATURE_EXTENDED_STATISTICS extern privoxy_mutex_t filter_statistics_mutex; -extern privoxy_mutex_t block_statistics_mutex; +extern privoxy_mutex_t block_reason_statistics_mutex; #endif #ifndef HAVE_GMTIME_R -- 2.39.2