mirror of
git://erdgeist.org/opentracker
synced 2025-02-22 17:11:29 +08:00
make the interval with random an average value around the real value and not additional
This commit is contained in:
parent
7ab634b6f6
commit
929d375b97
@ -25,9 +25,10 @@ typedef time_t ot_time;
|
||||
#define OT_CLIENT_REQUEST_INTERVAL (60*30)
|
||||
#define OT_CLIENT_REQUEST_VARIATION (60*3)
|
||||
|
||||
#define OT_TORRENT_TIMEOUT ((60*60*24)/OT_POOLS_TIMEOUT)
|
||||
#define OT_TORRENT_TIMEOUT_HOURS 24
|
||||
#define OT_TORRENT_TIMEOUT ((60*60*OT_TORRENT_TIMEOUT_HOURS)/OT_POOLS_TIMEOUT)
|
||||
|
||||
#define OT_CLIENT_REQUEST_INTERVAL_RANDOM ( OT_CLIENT_REQUEST_INTERVAL + (int)( random( ) % OT_CLIENT_REQUEST_VARIATION ) )
|
||||
#define OT_CLIENT_REQUEST_INTERVAL_RANDOM ( OT_CLIENT_REQUEST_INTERVAL - OT_CLIENT_REQUEST_VARIATION/2 + (int)( random( ) % OT_CLIENT_REQUEST_VARIATION ) )
|
||||
|
||||
/* We maintain a list of 256 pointers to sorted list of ot_torrent structs
|
||||
Sort key is, of course, its hash */
|
||||
|
Loading…
x
Reference in New Issue
Block a user