Skip to content
Snippets Groups Projects
Commit 9eb74491 authored by rswindell's avatar rswindell
Browse files

Fixed random number generation.

parent 98dd823e
Branches
Tags
No related merge requests found
......@@ -867,6 +867,9 @@ void event_thread(void* arg)
sbbs->event_thread_running = true;
srand(clock()); /* Seed random number generator */
sbbs_random(10); /* Throw away first number */
thread_up();
#ifdef JAVASCRIPT
......@@ -2503,6 +2506,9 @@ void node_thread(void* arg)
update_clients();
thread_up();
srand(clock()); /* Seed random number generator */
sbbs_random(10); /* Throw away first number */
#ifdef JAVASCRIPT
sbbs->js_initcx(); /* This must be done in the context of the node thread */
#endif
......@@ -2952,8 +2958,6 @@ void DLLCALL bbs_thread(void* arg)
return;
}
srand(time(NULL));
if(!(startup->options&BBS_OPT_LOCAL_TIMEZONE)) {
if(PUTENV("TZ=UCT0"))
lprintf("!putenv() FAILED");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment