From 5681c984f88ee6b33d4375f4de447e55bdd9fd7e Mon Sep 17 00:00:00 2001 From: Stefan Sayer Date: Tue, 7 Jul 2009 11:11:45 +0000 Subject: [PATCH] seed RNG (SEMS-57) git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1446 8eb893ce-cfd4-0310-b710-fb5ebe64c474 --- apps/webconference/WebConference.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/webconference/WebConference.cpp b/apps/webconference/WebConference.cpp index 3fa3e387..2f753aa3 100644 --- a/apps/webconference/WebConference.cpp +++ b/apps/webconference/WebConference.cpp @@ -184,6 +184,11 @@ int WebConferenceFactory::onLoad() // default: every 10 times RoomSweepInterval = cfg.getParameterInt("room_sweep_interval", 10); + // seed the rng (at least a little) + struct timeval now; + gettimeofday(&now, NULL); + srandom(now.tv_usec + now.tv_sec); + return 0; }