Remove misguided call to srand()

A random number generator needs to be initialized once per process after a fork, but not after each request, more so with an argument that changes only once per second.

This fixes https://github.com/SpiderLabs/ModSecurity/issues/778
This commit is contained in:
Michael Bunk
2014-10-29 12:21:21 +01:00
parent a0f91de416
commit deec149ca3

View File

@@ -223,8 +223,6 @@ static void modsecurity_persist_data(modsec_rec *msr) {
}
/* Remove stale collections. */
srand(time(NULL));
if (rand() < RAND_MAX/100) {
arr = apr_table_elts(msr->collections);
te = (apr_table_entry_t *)arr->elts;