diff options
Diffstat (limited to 'trackerlogic.c')
| -rw-r--r-- | trackerlogic.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/trackerlogic.c b/trackerlogic.c index 1bd8ac7..d1ef063 100644 --- a/trackerlogic.c +++ b/trackerlogic.c | |||
| @@ -128,8 +128,10 @@ size_t add_peer_to_torrent_and_return_peers( ot_hash hash, ot_peer *peer, PROTO_ | |||
| 128 | #endif | 128 | #endif |
| 129 | 129 | ||
| 130 | torrent->peer_list->peer_count++; | 130 | torrent->peer_list->peer_count++; |
| 131 | if( OT_PEERFLAG(peer) & PEER_FLAG_COMPLETED ) | 131 | if( OT_PEERFLAG(peer) & PEER_FLAG_COMPLETED ) { |
| 132 | torrent->peer_list->down_count++; | 132 | torrent->peer_list->down_count++; |
| 133 | stats_issue_event( EVENT_COMPLETED, 0, 0 ); | ||
| 134 | } | ||
| 133 | if( OT_PEERFLAG(peer) & PEER_FLAG_SEEDING ) | 135 | if( OT_PEERFLAG(peer) & PEER_FLAG_SEEDING ) |
| 134 | torrent->peer_list->seed_count++; | 136 | torrent->peer_list->seed_count++; |
| 135 | 137 | ||
| @@ -150,8 +152,10 @@ size_t add_peer_to_torrent_and_return_peers( ot_hash hash, ot_peer *peer, PROTO_ | |||
| 150 | torrent->peer_list->seed_count--; | 152 | torrent->peer_list->seed_count--; |
| 151 | if( !(OT_PEERFLAG(peer_dest) & PEER_FLAG_SEEDING ) && (OT_PEERFLAG(peer) & PEER_FLAG_SEEDING ) ) | 153 | if( !(OT_PEERFLAG(peer_dest) & PEER_FLAG_SEEDING ) && (OT_PEERFLAG(peer) & PEER_FLAG_SEEDING ) ) |
| 152 | torrent->peer_list->seed_count++; | 154 | torrent->peer_list->seed_count++; |
| 153 | if( !(OT_PEERFLAG(peer_dest) & PEER_FLAG_COMPLETED ) && (OT_PEERFLAG(peer) & PEER_FLAG_COMPLETED ) ) | 155 | if( !(OT_PEERFLAG(peer_dest) & PEER_FLAG_COMPLETED ) && (OT_PEERFLAG(peer) & PEER_FLAG_COMPLETED ) ) { |
| 154 | torrent->peer_list->down_count++; | 156 | torrent->peer_list->down_count++; |
| 157 | stats_issue_event( EVENT_COMPLETED, 0, 0 ); | ||
| 158 | } | ||
| 155 | if( OT_PEERFLAG(peer_dest) & PEER_FLAG_COMPLETED ) | 159 | if( OT_PEERFLAG(peer_dest) & PEER_FLAG_COMPLETED ) |
| 156 | OT_PEERFLAG( peer ) |= PEER_FLAG_COMPLETED; | 160 | OT_PEERFLAG( peer ) |= PEER_FLAG_COMPLETED; |
| 157 | } | 161 | } |
