From 8b21082abea16296c9333ce0053f5ff35347ef97 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Thu, 5 Sep 2019 12:47:41 -0700 Subject: [PATCH] Use wrapper macros for all touches of the sniffer statistics mutex. --- src/sniffer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sniffer.c b/src/sniffer.c index 8fcc537e6..60cbb1791 100644 --- a/src/sniffer.c +++ b/src/sniffer.c @@ -4358,9 +4358,9 @@ int ssl_ReadStatistics(SSLStats* stats) if (stats == NULL) return -1; - wc_LockMutex(&StatsMutex); + LOCK_STAT(); XMEMCPY(stats, &SnifferStats, sizeof(SSLStats)); - wc_UnLockMutex(&StatsMutex); + UNLOCK_STAT(); return 0; } @@ -4372,10 +4372,10 @@ int ssl_ReadResetStatistics(SSLStats* stats) if (stats == NULL) return -1; - wc_LockMutex(&StatsMutex); + LOCK_STAT(); XMEMCPY(stats, &SnifferStats, sizeof(SSLStats)); XMEMSET(&SnifferStats, 0, sizeof(SSLStats)); - wc_UnLockMutex(&StatsMutex); + UNLOCK_STAT(); return 0; }