mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +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:
@@ -203,7 +203,6 @@ static int ssl_rand_choosenum(int l, int h)
|
||||
int i;
|
||||
char buf[50];
|
||||
|
||||
srand((unsigned int)time(NULL));
|
||||
apr_snprintf(buf, sizeof(buf), "%.0f",
|
||||
(((double)(rand()%RAND_MAX)/RAND_MAX)*(h-l)));
|
||||
i = atoi(buf)+1;
|
||||
|
Reference in New Issue
Block a user