]> granicus.if.org Git - transmission/commitdiff
(trunk libT) #4283 "Remove 'Prefetch failed' error message" -- done.
authorJordan Lee <jordan@transmissionbt.com>
Fri, 27 May 2011 23:26:05 +0000 (23:26 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Fri, 27 May 2011 23:26:05 +0000 (23:26 +0000)
libtransmission/inout.c

index b9da47c34c03d07af61969db7ab63ac7ff77bfb8..f35f0845b8bfce05eb6c73ed5c6c82bd0a19fce1 100644 (file)
@@ -124,13 +124,6 @@ readOrWriteBytes( tr_session       * session,
                 tr_torerr( tor, "read failed for \"%s\": %s",
                            file->name, tr_strerror( err ) );
             }
-        } else if( ioMode == TR_IO_PREFETCH ) {
-            const int rc = tr_prefetch( fd, fileOffset, buflen );
-            if( rc < 0 ) {
-                /* (don't set "err" here... it's okay for prefetch to fail) */
-                tr_tordbg( tor, "prefetch failed for \"%s\": %s",
-                           file->name, tr_strerror( errno ) );
-            }
         } else if( ioMode == TR_IO_WRITE ) {
             const int rc = tr_pwrite( fd, buf, buflen, fileOffset );
             if( rc < 0 ) {
@@ -138,6 +131,8 @@ readOrWriteBytes( tr_session       * session,
                 tr_torerr( tor, "write failed for \"%s\": %s",
                            file->name, tr_strerror( err ) );
             }
+        } else if( ioMode == TR_IO_PREFETCH ) {
+            tr_prefetch( fd, fileOffset, buflen );
         } else {
             abort();
         }