diff options
| author | erdgeist <> | 2008-10-04 05:40:51 +0000 |
|---|---|---|
| committer | erdgeist <> | 2008-10-04 05:40:51 +0000 |
| commit | e534db03c6877f8ac0559f63840e9a00e9bd43bf (patch) | |
| tree | 811181b9b39d0484e28eb25cbb9f2eea094978e2 /ot_clean.c | |
| parent | 8cbfc8602c73e55770f3c06d8ea42758b22a0401 (diff) | |
added live sync code
added a config file parser
added tracker id
changed WANT_CLOSED_TRACKER and WANT_BLACKLIST into WANT_ACCESS_WHITE and WANT_ACCESS_BLACK
changed WANT_TRACKER_SYNC to WANT_SYNC_BATCH and added WANT_SYNC_LIVE
added an option to switch off fullscrapes
cleaned up many internal hardcoded values, like PROTO_FLAG,
Diffstat (limited to 'ot_clean.c')
| -rw-r--r-- | ot_clean.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -25,7 +25,7 @@ int clean_single_torrent( ot_torrent *torrent ) { | |||
| 25 | size_t peers_count = 0, seeds_count; | 25 | size_t peers_count = 0, seeds_count; |
| 26 | time_t timedout = (int)( NOW - peer_list->base ); | 26 | time_t timedout = (int)( NOW - peer_list->base ); |
| 27 | int i; | 27 | int i; |
| 28 | #ifdef WANT_TRACKER_SYNC | 28 | #ifdef WANT_SYNC_BATCH |
| 29 | char *new_peers; | 29 | char *new_peers; |
| 30 | #endif | 30 | #endif |
| 31 | 31 | ||
| @@ -55,7 +55,7 @@ int clean_single_torrent( ot_torrent *torrent ) { | |||
| 55 | memmove( peer_list->seed_counts + timedout, peer_list->seed_counts, sizeof( size_t ) * ( OT_POOLS_COUNT - timedout ) ); | 55 | memmove( peer_list->seed_counts + timedout, peer_list->seed_counts, sizeof( size_t ) * ( OT_POOLS_COUNT - timedout ) ); |
| 56 | byte_zero( peer_list->seed_counts, sizeof( size_t ) * timedout ); | 56 | byte_zero( peer_list->seed_counts, sizeof( size_t ) * timedout ); |
| 57 | 57 | ||
| 58 | #ifdef WANT_TRACKER_SYNC | 58 | #ifdef WANT_SYNC_BATCH |
| 59 | /* Save the block modified within last OT_POOLS_TIMEOUT */ | 59 | /* Save the block modified within last OT_POOLS_TIMEOUT */ |
| 60 | if( peer_list->peers[1].size && | 60 | if( peer_list->peers[1].size && |
| 61 | ( new_peers = realloc( peer_list->changeset.data, sizeof( ot_peer ) * peer_list->peers[1].size ) ) ) | 61 | ( new_peers = realloc( peer_list->changeset.data, sizeof( ot_peer ) * peer_list->peers[1].size ) ) ) |
