summaryrefslogtreecommitdiff
path: root/trackerlogic.h
diff options
context:
space:
mode:
authorerdgeist <>2008-12-08 02:23:21 +0000
committererdgeist <>2008-12-08 02:23:21 +0000
commita9ab9b0c0dbd5de29d1aef9927cca92ac522d4cb (patch)
tree98356c754d090611d9b34dbf1f51b045b124d6f3 /trackerlogic.h
parentbca8bee62334de23fdb28ae5a8fa76b5d72089cb (diff)
Make all torrents in their buckets sorted again.
Diffstat (limited to 'trackerlogic.h')
-rw-r--r--trackerlogic.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/trackerlogic.h b/trackerlogic.h
index c7e2e97..75e98d2 100644
--- a/trackerlogic.h
+++ b/trackerlogic.h
@@ -38,16 +38,19 @@ typedef time_t ot_time;
38/* If peers come back before 10 minutes, don't live sync them */ 38/* If peers come back before 10 minutes, don't live sync them */
39#define OT_CLIENT_SYNC_RENEW_BOUNDARY 10 39#define OT_CLIENT_SYNC_RENEW_BOUNDARY 10
40 40
41/* We maintain a list of 1024 pointers to sorted list of ot_torrent structs
42 Sort key is, of course, its hash */
43#define OT_BUCKET_COUNT 1024
44
45/* Number of tracker admin ip addresses allowed */ 41/* Number of tracker admin ip addresses allowed */
46#define OT_ADMINIP_MAX 64 42#define OT_ADMINIP_MAX 64
47#define OT_MAX_THREADS 16 43#define OT_MAX_THREADS 16
48 44
49#define OT_PEER_TIMEOUT 45 45#define OT_PEER_TIMEOUT 45
50 46
47/* We maintain a list of 1024 pointers to sorted list of ot_torrent structs
48 Sort key is, of course, its hash */
49#define OT_BUCKET_COUNT_BITS 10
50
51#define OT_BUCKET_COUNT (1<<OT_BUCKET_COUNT_BITS)
52#define OT_BUCKET_COUNT_SHIFT (32-OT_BUCKET_COUNT_BITS)
53
51/* From opentracker.c */ 54/* From opentracker.c */
52extern time_t g_now_seconds; 55extern time_t g_now_seconds;
53extern volatile int g_opentracker_running; 56extern volatile int g_opentracker_running;