diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2004-11-21 14:37:36 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2004-11-21 14:37:36 +0100 |
commit | 4f65416bd16b9dfd0f4b9939070e8cf3a65646b3 (patch) | |
tree | 58be135c8fc92f12a3f3aa62fb656ba331536bc0 /tools.c | |
parent | 0d63ccef2137d5bff1f4a4bbce1c2eca01ca80b5 (diff) | |
download | vdr-4f65416bd16b9dfd0f4b9939070e8cf3a65646b3.tar.gz vdr-4f65416bd16b9dfd0f4b9939070e8cf3a65646b3.tar.bz2 |
Some improvements to cPoller1.3.17
Diffstat (limited to 'tools.c')
-rw-r--r-- | tools.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; } |