diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | opentracker.c | 9 |
2 files changed, 10 insertions, 1 deletions
@@ -35,7 +35,7 @@ BINDIR?=$(PREFIX)/bin | |||
35 | #FEATURES+=-DWANT_MODEST_FULLSCRAPES | 35 | #FEATURES+=-DWANT_MODEST_FULLSCRAPES |
36 | #FEATURES+=-DWANT_SPOT_WOODPECKER | 36 | #FEATURES+=-DWANT_SPOT_WOODPECKER |
37 | #FEATURES+=-DWANT_SYSLOGS | 37 | #FEATURES+=-DWANT_SYSLOGS |
38 | FEATURES+=-DWANT_DEV_RANDOM | 38 | #FEATURES+=-DWANT_DEV_RANDOM |
39 | FEATURES+=-DWANT_FULLSCRAPE | 39 | FEATURES+=-DWANT_FULLSCRAPE |
40 | 40 | ||
41 | #FEATURES+=-D_DEBUG_HTTPERROR | 41 | #FEATURES+=-D_DEBUG_HTTPERROR |
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)); |