From 5c96f9ebd8246bfdbe6d1877ead247b6b35b098a Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Sat, 15 Jan 2011 05:34:47 +0000 Subject: [PATCH] (trunk libT) fix a minor error in the log message for prefetch errors. thanks to Chinstrap for spotting this. --- libtransmission/inout.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libtransmission/inout.c b/libtransmission/inout.c index 1eac6e545..fb6cda33d 100644 --- a/libtransmission/inout.c +++ b/libtransmission/inout.c @@ -156,8 +156,9 @@ readOrWriteBytes( tr_session * session, } 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( err ) ); + file->name, tr_strerror( errno ) ); } } else if( ioMode == TR_IO_WRITE ) { const int rc = tr_pwrite( fd, buf, buflen, fileOffset );