1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-01 07:26:57 +03:00

move srand() call from ssl_rand_choosenum() to ssl_init_Child()

this was being called twice per-connection with 'SSLRandom connect builtin'
configured (which is in the default config)

this also gets rid of two time() syscalls per-connection

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92232 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Doug MacEachern
2001-11-29 05:08:47 +00:00
parent 1c3ac886e0
commit 538110d762
2 changed files with 3 additions and 1 deletions

View File

@ -967,6 +967,9 @@ void ssl_init_Child(apr_pool_t *p, server_rec *s)
SSLModConfigRec *mc = myModConfig(s);
mc->pid = getpid(); /* only call getpid() once per-process */
/* XXX: there should be an ap_srand() function */
srand((unsigned int)time(NULL));
/* open the mutex lockfile */
ssl_mutex_reinit(s, p);
return;