[Privoxy-commits] [privoxy] 02/05: Rename the mutex used to protect the block reason statistics
User Git
git at git.privoxy.org
Sun Apr 17 08:23:03 UTC 2022
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository privoxy.
commit c5a40240177ba7f8e30cdac6de6c15a3ddfeca54
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Tue Mar 16 19:09:24 2021 +0100
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
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Privoxy-commits
mailing list