From ed82643faf805bbcc2eaf27dbb71fe905b5464b9 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Wed, 31 Jul 2013 18:41:33 -0700 Subject: [PATCH] Fix mutex scope and storage duration --- modules/beast_core/diagnostic/beast_FatalError.cpp | 6 +++++- modules/beast_core/diagnostic/beast_FatalError.h | 4 ---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/beast_core/diagnostic/beast_FatalError.cpp b/modules/beast_core/diagnostic/beast_FatalError.cpp index 6737f9db..68d864d5 100644 --- a/modules/beast_core/diagnostic/beast_FatalError.cpp +++ b/modules/beast_core/diagnostic/beast_FatalError.cpp @@ -31,7 +31,11 @@ void FatalError::resetReporter (Reporter& reporter) FatalError::FatalError (char const* message, char const* fileName, int lineNumber) { - LockType::ScopedLockType lock (m_mutex); + typedef CriticalSection LockType; + + static LockType s_mutex; + + LockType::ScopedLockType lock (s_mutex); String const backtraceString = SystemStats::getStackBacktrace (); diff --git a/modules/beast_core/diagnostic/beast_FatalError.h b/modules/beast_core/diagnostic/beast_FatalError.h index 130524ea..f65a39ad 100644 --- a/modules/beast_core/diagnostic/beast_FatalError.h +++ b/modules/beast_core/diagnostic/beast_FatalError.h @@ -87,11 +87,7 @@ public: FatalError (char const* message, char const* fileName, int lineNumber); private: - typedef CriticalSection LockType; - static Static::Storage , FatalError> s_reporter; - - LockType m_mutex; }; #endif