aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/rand/rand_win.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2000-09-18 11:51:07 +0000
committerRichard Levitte <levitte@openssl.org>2000-09-18 11:51:07 +0000
commit24842e0586662f20dcc7fc966cc3c53d51310f70 (patch)
tree5fea25e200b1743fa6576bc71ed08a5b1289cdea /crypto/rand/rand_win.c
parent159cf04e86bc2d0ad6105322531aee750effb5c6 (diff)
downloadopenssl-24842e0586662f20dcc7fc966cc3c53d51310f70.tar.gz
Going through performance statistics sometimes generates an exception,
so disable that part. Reported by Jeffrey Altman <jaltman@columbia.edu>
Diffstat (limited to 'crypto/rand/rand_win.c')
-rw-r--r--crypto/rand/rand_win.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/crypto/rand/rand_win.c b/crypto/rand/rand_win.c
index acdef30518..d3fe50d341 100644
--- a/crypto/rand/rand_win.c
+++ b/crypto/rand/rand_win.c
@@ -177,7 +177,7 @@ typedef BOOL (WINAPI *MODULE32)(HANDLE, LPMODULEENTRY32);
typedef NET_API_STATUS (NET_API_FUNCTION * NETSTATGET)
(LMSTR, LMSTR, DWORD, DWORD, LPBYTE*);
typedef NET_API_STATUS (NET_API_FUNCTION * NETFREE)(LPBYTE);
-#endif
+#endif /* 0 */
int RAND_poll(void)
{
@@ -196,7 +196,7 @@ int RAND_poll(void)
*/
NETSTATGET netstatget = 0;
NETFREE netfree = 0;
-#endif
+#endif /* 0 */
/* load functions dynamically - not available on all systems */
advapi = LoadLibrary("ADVAPI32.DLL");
@@ -232,8 +232,11 @@ int RAND_poll(void)
if (netapi)
FreeLibrary(netapi);
-#endif
+#endif /* 0 */
+#if 0 /* It appears like this can cause an exception deep within ADVAPI32.DLL
+ * at random times. Reported by Jeffrey Altman.
+ */
/* Read Performance Statistics from NT/2000 registry */
/* The size of the performance data can vary from call to call */
/* so we must guess the size of the buffer to use and increase */
@@ -264,6 +267,7 @@ int RAND_poll(void)
if (buf)
free(buf);
}
+#endif /* 0 */
if (advapi)
{