]> granicus.if.org Git - transmission/commitdiff
(trunk libT) remove some of the lazy-verify debug messages.
authorCharles Kerr <charles@transmissionbt.com>
Tue, 21 Dec 2010 23:09:26 +0000 (23:09 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Tue, 21 Dec 2010 23:09:26 +0000 (23:09 +0000)
libtransmission/torrent.c
libtransmission/verify.c

index 57a2ef53d4347be0c5f03119cad186ef8d2976e4..e5a606ee6ef6079e1de10e5cd13835e4a6c7b8a0 100644 (file)
@@ -2366,25 +2366,18 @@ tr_torrentPieceNeedsCheck( const tr_torrent * tor, tr_piece_index_t p )
     const tr_info * inf = tr_torrentInfo( tor );
 
     /* if we've never checked this piece, then it needs to be checked */
-    if( !inf->pieces[p].timeChecked ) {
-        tr_tordbg( tor, "[LAZY] piece %zu needs to be tested because it's never been tested", (size_t)p );
+    if( !inf->pieces[p].timeChecked )
         return TRUE;
-    }
 
     /* If we think we've completed one of the files in this piece,
      * but it's been modified since we last checked it,
      * then it needs to be rechecked */
     tr_ioFindFileLocation( tor, p, 0, &f, &unused );
-    for( ; f < inf->fileCount && pieceHasFile( p, &inf->files[f] ); ++f ) {
-        if( tr_cpFileIsComplete( &tor->completion, f ) ) {
-            if( getFileMTime( tor, f ) > inf->pieces[p].timeChecked ) {
-                tr_tordbg( tor, "[LAZY] piece %zu needs to be tested because file %zu mtime is newer than check time %zu", (size_t)p, (size_t)f, (size_t)inf->pieces[p].timeChecked );
+    for( ; f < inf->fileCount && pieceHasFile( p, &inf->files[f] ); ++f )
+        if( tr_cpFileIsComplete( &tor->completion, f ) )
+            if( getFileMTime( tor, f ) > inf->pieces[p].timeChecked )
                 return TRUE;
-            }
-        }
-    }
 
-    tr_tordbg( tor, "[LAZY] piece %zu does not need to be tested", (size_t)p );
     return FALSE;
 }
 
index 94886c1e2d97f39edd326f4f13ef285280bc186e..2f7c773f69399032fdefb9f8cec620874af54763 100644 (file)
@@ -55,7 +55,7 @@ verifyTorrent( tr_torrent * tor, tr_bool * stopFlag )
 
     SHA1_Init( &sha );
 
-    tr_tordbg( tor, "%s", "[LAZY] verifying torrent..." );
+    tr_tordbg( tor, "%s", "verifying torrent..." );
     tr_torrentSetChecked( tor, 0 );
     while( !*stopFlag && ( pieceIndex < tor->info.pieceCount ) )
     {
@@ -139,7 +139,6 @@ verifyTorrent( tr_torrent * tor, tr_bool * stopFlag )
             filePos = 0;
         }
     }
-    tr_tordbg( tor, "%s", "[LAZY] DONE verifying torrent..." );
 
     /* cleanup */
     if( fd >= 0 )
@@ -148,7 +147,7 @@ verifyTorrent( tr_torrent * tor, tr_bool * stopFlag )
 
     /* stopwatch */
     end = tr_time( );
-    tr_tordbg( tor, "it took %d seconds to verify %"PRIu64" bytes (%"PRIu64" bytes per second)",
+    tr_tordbg( tor, "Verification is done.  It took %d seconds to verify %"PRIu64" bytes (%"PRIu64" bytes per second)",
                (int)(end-begin), tor->info.totalSize,
                (uint64_t)(tor->info.totalSize/(1+(end-begin))) );