summaryrefslogtreecommitdiff
path: root/opentracker.c
diff options
context:
space:
mode:
authorerdgeist <>2012-05-28 15:24:33 +0000
committererdgeist <>2012-05-28 15:24:33 +0000
commit3eeb536a44266a208a7287d4d5b57c56fd5d1c8a (patch)
treecdcd848b0615f27d939e6ea4fa6da92b6348f3ba /opentracker.c
parentae16a23ae09b78b78b5b0b21129e3ee014ae1e87 (diff)
Init prng before udp code needs it.
Diffstat (limited to 'opentracker.c')
-rw-r--r--opentracker.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/opentracker.c b/opentracker.c
index c735393..3e72985 100644
--- a/opentracker.c
+++ b/opentracker.c
@@ -562,6 +562,12 @@ int main( int argc, char **argv ) {
562 noipv6=1; 562 noipv6=1;
563#endif 563#endif
564 564
565#ifdef WANT_DEV_RANDOM
566 srandomdev();
567#else
568 srandom( time(NULL) );
569#endif
570
565 while( scanon ) { 571 while( scanon ) {
566 switch( getopt( argc, argv, ":i:p:A:P:d:u:r:s:f:l:v" 572 switch( getopt( argc, argv, ":i:p:A:P:d:u:r:s:f:l:v"
567#ifdef WANT_ACCESSLIST_BLACK 573#ifdef WANT_ACCESSLIST_BLACK
@@ -617,6 +623,9 @@ int main( int argc, char **argv ) {
617 ot_try_bind( serverip, 6969, FLAG_UDP ); 623 ot_try_bind( serverip, 6969, FLAG_UDP );
618 } 624 }
619 625
626 if( !g_udp_workers )
627 udp_init( -1, 0 );
628
620#ifdef WANT_SYSLOGS 629#ifdef WANT_SYSLOGS
621 openlog( "opentracker", 0, LOG_USER ); 630 openlog( "opentracker", 0, LOG_USER );
622 setlogmask(LOG_UPTO(LOG_INFO)); 631 setlogmask(LOG_UPTO(LOG_INFO));