diff options
-rw-r--r-- | CONTRIBUTORS | 1 | ||||
-rw-r--r-- | HISTORY | 3 | ||||
-rw-r--r-- | tools.c | 5 |
3 files changed, 6 insertions, 3 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index e13b6c08..0ee05623 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1087,6 +1087,7 @@ Marco Schlüßler <marco@lordzodiac.de> for fixing cRemux::ScanVideoPacket() to make sure it doesn't access memory beyond the end of the given buffer, which has caused some unjustified "unknown picture type errors" + for some improvements to cPoller Jürgen Schmitz <j.schmitz@web.de> for reporting a bug in displaying the current channel when switching via the SVDRP @@ -3139,7 +3139,7 @@ Video Disk Recorder Revision History days ('1' is monday). Thanks to Sascha Klek for reporting a problem with the '0' key in the "Day" item of the "Timers" menu. -2004-11-20: Version 1.3.17 +2004-11-21: Version 1.3.17 - Fixed cRemux::ScanVideoPacket() to make sure it doesn't access memory beyond the end of the given buffer, which has caused some unjustified "unknown @@ -3158,3 +3158,4 @@ Video Disk Recorder Revision History to Stefan Huelswitt for pointing this out). - Fixed toggling the "Day" item in the "Timers" menu, so that it selects the right day of week for timers in the future. +- Some improvements to cPoller (thanks to Marco Schlüßler). @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: tools.c 1.81 2004/10/31 16:42:36 kls Exp $ + * $Id: tools.c 1.82 2004/11/21 14:36:34 kls Exp $ */ #include "tools.h" @@ -532,12 +532,13 @@ bool cPoller::Add(int FileHandle, bool Out) { if (FileHandle >= 0) { for (int i = 0; i < numFileHandles; i++) { - if (pfd[i].fd == FileHandle) + if (pfd[i].fd == FileHandle && pfd[i].events == (Out ? POLLOUT : POLLIN)) return true; } if (numFileHandles < MaxPollFiles) { pfd[numFileHandles].fd = FileHandle; pfd[numFileHandles].events = Out ? POLLOUT : POLLIN; + pfd[numFileHandles].revents = 0; numFileHandles++; return true; } |