summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY3
-rw-r--r--tools.c4
3 files changed, 5 insertions, 3 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index c657573f..f6401ede 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -274,6 +274,7 @@ Artur Skawina <skawina@geocities.com>
for pointing out a problem with the ERR macro defined by ncurses.h
for a patch that contained a fix for checking toFile in cCuttingThread::Action()
for improving cUnbufferedFile
+ for fixing calculating the cache size in cUnbufferedFile::Read()
Werner Fink <werner@suse.de>
for making I/O more robust by handling EINTR
diff --git a/HISTORY b/HISTORY
index 57ea3c35..54bfa482 100644
--- a/HISTORY
+++ b/HISTORY
@@ -4716,7 +4716,7 @@ Video Disk Recorder Revision History
- Fixed automatically updating the CAM menu in case the whole operation (for
instance a firmware update) takes longer than the menu timeout.
-2006-05-25: Version 1.4.0-2
+2006-05-26: Version 1.4.0-2
- Removed leftover LSMOD=... line from 'runvdr'.
- Modified the Makefile to copy additional libraries a plugin might provide (suggested
@@ -4734,3 +4734,4 @@ Video Disk Recorder Revision History
- Fixed handling the running status of EPG events in case the "Schedule" menu is
currently open (i.e. a write lock on the schedules data can't be achieved).
- Fixed handling VPS timers in case the EPG event hasn't been 'seen' in a while.
+- Fixed calculating the cache size in cUnbufferedFile::Read() (thanks to Artur Skawina).
diff --git a/tools.c b/tools.c
index 53523fa0..475afdb8 100644
--- a/tools.c
+++ b/tools.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.c 1.117 2006/04/21 15:12:47 kls Exp $
+ * $Id: tools.c 1.118 2006/05/26 10:10:31 kls Exp $
*/
#include "tools.h"
@@ -1179,7 +1179,7 @@ ssize_t cUnbufferedFile::Read(void *Data, size_t Size)
}
else if (cachedend > ahead && cachedend - curpos > READCHUNK * 2) {
// current position has moved back enough, shrink head window.
- FadviseDrop(curpos + READCHUNK, cachedend - curpos + READCHUNK);
+ FadviseDrop(curpos + READCHUNK, cachedend - (curpos + READCHUNK));
cachedend = curpos + READCHUNK;
}
}