summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordenis <>2008-10-07 02:09:38 +0000
committerdenis <>2008-10-07 02:09:38 +0000
commit1c3c5d57dafc44c582a6d29a7db04cfeba2464da (patch)
treea2543bb89a30942b824030971672fbe12603beca
parent719858548d6b3029c0d0a6f3cba5b2aa3aa09c8c (diff)
only sync when the peer is actually added to the first pool. this saves ca. 40% syncdata
-rw-r--r--trackerlogic.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/trackerlogic.c b/trackerlogic.c
index 5716207..f2691a5 100644
--- a/trackerlogic.c
+++ b/trackerlogic.c
@@ -60,11 +60,6 @@ ot_torrent *add_peer_to_torrent( ot_hash *hash, ot_peer *peer WANT_SYNC_PARAM(
60 return NULL; 60 return NULL;
61 } 61 }
62 62
63#ifdef WANT_SYNC_LIVE
64 if( !from_changeset )
65 livesync_tell( hash, peer, PEER_FLAG_LEECHING );
66#endif
67
68 if( !exactmatch ) { 63 if( !exactmatch ) {
69 /* Create a new torrent entry, then */ 64 /* Create a new torrent entry, then */
70 memmove( &torrent->hash, hash, sizeof( ot_hash ) ); 65 memmove( &torrent->hash, hash, sizeof( ot_hash ) );
@@ -109,6 +104,11 @@ ot_torrent *add_peer_to_torrent( ot_hash *hash, ot_peer *peer WANT_SYNC_PARAM(
109 memmove( peer_dest, peer, sizeof( ot_peer ) ); 104 memmove( peer_dest, peer, sizeof( ot_peer ) );
110 torrent->peer_list->peer_count++; 105 torrent->peer_list->peer_count++;
111 106
107#ifdef WANT_SYNC_LIVE
108 if( !from_changeset )
109 livesync_tell( hash, peer, PEER_FLAG_LEECHING );
110#endif
111
112 if( OT_FLAG( peer ) & PEER_FLAG_COMPLETED ) 112 if( OT_FLAG( peer ) & PEER_FLAG_COMPLETED )
113 torrent->peer_list->down_count++; 113 torrent->peer_list->down_count++;
114 114