From: Fabian Keil Date: Tue, 16 Mar 2021 18:09:24 +0000 (+0100) Subject: Rename the mutex used to protect the block reason statistics X-Git-Tag: v_3_0_34~133 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=c5a40240177ba7f8e30cdac6de6c15a3ddfeca54 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. --- 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