summaryrefslogtreecommitdiff
path: root/cpp/src/IceUtil/Random.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2006-03-31 07:06:50 +0000
committerBenoit Foucher <benoit@zeroc.com>2006-03-31 07:06:50 +0000
commitc569762bef4c04100b6b1703e32b099049556b24 (patch)
treea2e8792781c08ddc2d799c6b5192776d442752b6 /cpp/src/IceUtil/Random.cpp
parentAdded ability to read XML file by execing icegridadmin (diff)
downloadice-c569762bef4c04100b6b1703e32b099049556b24.tar.bz2
ice-c569762bef4c04100b6b1703e32b099049556b24.tar.xz
ice-c569762bef4c04100b6b1703e32b099049556b24.zip
context is now static
Diffstat (limited to 'cpp/src/IceUtil/Random.cpp')
-rw-r--r--cpp/src/IceUtil/Random.cpp5
1 files changed, 2 insertions, 3 deletions
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);