From c569762bef4c04100b6b1703e32b099049556b24 Mon Sep 17 00:00:00 2001 From: Benoit Foucher Date: Fri, 31 Mar 2006 07:06:50 +0000 Subject: context is now static --- cpp/src/IceUtil/Random.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cpp/src') diff --git a/cpp/src/IceUtil/Random.cpp b/cpp/src/IceUtil/Random.cpp index 3b80b45f020..f2927d35f64 100644 --- a/cpp/src/IceUtil/Random.cpp +++ b/cpp/src/IceUtil/Random.cpp @@ -29,7 +29,7 @@ IceUtil::RandomGeneratorException::RandomGeneratorException(const char* file, in const char* IceUtil::RandomGeneratorException::_name = "IceUtil::RandomGeneratorException"; // -// The static mutex is required to lazy initialized the file +// The static mutex is required to lazy initialize the file // descriptor for /dev/urandom (Unix) or the cryptographic // context (Windows). // @@ -43,7 +43,7 @@ const char* IceUtil::RandomGeneratorException::_name = "IceUtil::RandomGenerator // static IceUtil::StaticMutex staticMutex = ICE_STATIC_MUTEX_INITIALIZER; #ifdef _WIN32 -HCRYPTPROV context = NULL; +static HCRYPTPROV context = NULL; #else static int fd = -1; #endif @@ -67,7 +67,6 @@ public: context = NULL; } #else - IceUtil::StaticMutex::Lock lock(staticMutex); if(fd != -1) { close(fd); -- cgit v1.2.3