summaryrefslogtreecommitdiff
path: root/ot_livesync.c
diff options
context:
space:
mode:
Diffstat (limited to 'ot_livesync.c')
-rw-r--r--ot_livesync.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/ot_livesync.c b/ot_livesync.c
index bca7e12..9e1c723 100644
--- a/ot_livesync.c
+++ b/ot_livesync.c
@@ -282,11 +282,12 @@ void livesync_handle_tell( ssize_t datalen ) {
282 g_next_beacon_time = g_now_seconds + LIVESYNC_BEACON_INTERVAL; 282 g_next_beacon_time = g_now_seconds + LIVESYNC_BEACON_INTERVAL;
283 283
284 while( off + sizeof(ot_hash) + 12 <= (size_t)datalen ) { 284 while( off + sizeof(ot_hash) + 12 <= (size_t)datalen ) {
285 ot_hash *hash = (ot_hash*)(g_inbuffer+off); 285 ot_hash *hash = (ot_hash*)(g_inbuffer+off);
286 ot_vector *torrents_list = mutex_bucket_lock_by_hash(*hash); 286 ot_vector *torrents_list = mutex_bucket_lock_by_hash(*hash);
287 size_t down_count_remote; 287 size_t down_count_remote;
288 int exactmatch; 288 int exactmatch;
289 ot_torrent * torrent = vector_find_or_insert(torrents_list, hash, sizeof(ot_hash), OT_HASH_COMPARE_SIZE, &exactmatch); 289 ot_torrent *torrent = vector_find_or_insert(torrents_list, hash, sizeof(ot_hash), OT_HASH_COMPARE_SIZE, &exactmatch);
290
290 if( !torrent ) { 291 if( !torrent ) {
291 mutex_bucket_unlock_by_hash( *hash, 0 ); 292 mutex_bucket_unlock_by_hash( *hash, 0 );
292 continue; 293 continue;