miniupnpd.c: init random number generator in init()
This commit is contained in:
parent
8691c9c0e0
commit
e00c1bc6e9
|
@ -706,6 +706,7 @@ void complete_uuidvalues(void)
|
||||||
* 6) set startup time stamp
|
* 6) set startup time stamp
|
||||||
* 7) compute presentation URL
|
* 7) compute presentation URL
|
||||||
* 8) set signal handlers
|
* 8) set signal handlers
|
||||||
|
* 9) init random generator (srandom())
|
||||||
* 10) init redirection engine
|
* 10) init redirection engine
|
||||||
* 11) reload mapping from leasefile */
|
* 11) reload mapping from leasefile */
|
||||||
static int
|
static int
|
||||||
|
@ -1265,6 +1266,9 @@ init(int argc, char * * argv, struct runtime_vars * v)
|
||||||
syslog(LOG_NOTICE, "Failed to set %s handler", "SIGUSR1");
|
syslog(LOG_NOTICE, "Failed to set %s handler", "SIGUSR1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* initialize random number generator */
|
||||||
|
srandom((unsigned int)time(NULL));
|
||||||
|
|
||||||
/* initialize redirection engine (and pinholes) */
|
/* initialize redirection engine (and pinholes) */
|
||||||
if(init_redirect() < 0)
|
if(init_redirect() < 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue