diff options
author | Andy Polyakov <appro@openssl.org> | 2010-01-19 20:35:22 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2010-01-19 20:35:22 +0000 |
commit | b3020393f207d84f828fd021aa2c999cd434d2cf (patch) | |
tree | eabdb891045dff97f3e4e230aca863253cc760ea /crypto | |
parent | 071ef65cfa1f6174f677163555aa63ce6d68b9d2 (diff) |
rand_win.c: fix time limit logic.
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/rand/rand_win.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto/rand/rand_win.c b/crypto/rand/rand_win.c index 3fac961922..9bad067f43 100644 --- a/crypto/rand/rand_win.c +++ b/crypto/rand/rand_win.c @@ -536,7 +536,7 @@ int RAND_poll(void) ex_cnt_limit--; } } while (heaplist_next(handle, &hlist) - && (GetTickCount()-starttime)<MAXDELAY + && (!good || (GetTickCount()-starttime)<MAXDELAY) && ex_cnt_limit > 0); } @@ -559,7 +559,7 @@ int RAND_poll(void) && --entrycnt > 0); } } while (heaplist_next(handle, &hlist) - && (GetTickCount()-starttime)<MAXDELAY); + && (!good || (GetTickCount()-starttime)<MAXDELAY)); } #endif @@ -574,7 +574,7 @@ int RAND_poll(void) if (process_first(handle, &p)) do RAND_add(&p, p.dwSize, 9); - while (process_next(handle, &p) && (GetTickCount()-starttime)<MAXDELAY); + while (process_next(handle, &p) && (!good || (GetTickCount()-starttime)<MAXDELAY)); /* thread walking */ /* THREADENTRY32 contains 6 fields that will change @@ -586,7 +586,7 @@ int RAND_poll(void) if (thread_first(handle, &t)) do RAND_add(&t, t.dwSize, 6); - while (thread_next(handle, &t) && (GetTickCount()-starttime)<MAXDELAY); + while (thread_next(handle, &t) && (!good || (GetTickCount()-starttime)<MAXDELAY)); /* module walking */ /* MODULEENTRY32 contains 9 fields that will change @@ -599,7 +599,7 @@ int RAND_poll(void) do RAND_add(&m, m.dwSize, 9); while (module_next(handle, &m) - && (GetTickCount()-starttime)<MAXDELAY); + && (!good || (GetTickCount()-starttime)<MAXDELAY)); if (close_snap) close_snap(handle); else |