diff options
Diffstat (limited to 'opentracker.c')
| -rw-r--r-- | opentracker.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/opentracker.c b/opentracker.c index d2c0635..1c729cf 100644 --- a/opentracker.c +++ b/opentracker.c | |||
| @@ -256,11 +256,17 @@ static void * server_mainloop( void * args ) { | |||
| 256 | #ifdef _DEBUG_HTTPERROR | 256 | #ifdef _DEBUG_HTTPERROR |
| 257 | ws.debugbuf= malloc( G_DEBUGBUF_SIZE ); | 257 | ws.debugbuf= malloc( G_DEBUGBUF_SIZE ); |
| 258 | #endif | 258 | #endif |
| 259 | |||
| 259 | if( !ws.inbuf || !ws.outbuf ) | 260 | if( !ws.inbuf || !ws.outbuf ) |
| 260 | panic( "Initializing worker failed" ); | 261 | panic( "Initializing worker failed" ); |
| 262 | |||
| 263 | #ifdef WANT_ARC4RANDOM | ||
| 264 | arc4random_buf(&ws.rand48_state[0], 3 * sizeof(uint16_t)); | ||
| 265 | #else | ||
| 261 | ws.rand48_state[0] = (uint16_t)random(); | 266 | ws.rand48_state[0] = (uint16_t)random(); |
| 262 | ws.rand48_state[1] = (uint16_t)random(); | 267 | ws.rand48_state[1] = (uint16_t)random(); |
| 263 | ws.rand48_state[2] = (uint16_t)random(); | 268 | ws.rand48_state[2] = (uint16_t)random(); |
| 269 | #endif | ||
| 264 | 270 | ||
| 265 | for( ; ; ) { | 271 | for( ; ; ) { |
| 266 | int64 sock; | 272 | int64 sock; |
