summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-07-17 14:36:11 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2004-07-17 14:36:11 +0200
commitd32f0008618b36d8db92e558b9f8413d0c812222 (patch)
treecbe76d7262bb1ac5512c3f603b9486e54e1a3eba
parent4807f978e5ad6f2310b71f10ab56c268bfb04852 (diff)
downloadvdr-d32f0008618b36d8db92e558b9f8413d0c812222.tar.gz
vdr-d32f0008618b36d8db92e558b9f8413d0c812222.tar.bz2
Fixed handling error case '-1' when polling CAM connections
-rw-r--r--HISTORY1
-rw-r--r--ci.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/HISTORY b/HISTORY
index 7a448521..4c6d2a07 100644
--- a/HISTORY
+++ b/HISTORY
@@ -2951,3 +2951,4 @@ Video Disk Recorder Revision History
(thanks to Marco Schlüßler for pointing this out).
- Fixed handling error case '-1' when polling section filters (thanks to Marco
Schlüßler).
+- Fixed handling error case '-1' when polling CAM connections.
diff --git a/ci.c b/ci.c
index 65ec687f..46b808ca 100644
--- a/ci.c
+++ b/ci.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: ci.c 1.22 2004/02/08 15:02:04 kls Exp $
+ * $Id: ci.c 1.23 2004/07/17 14:36:11 kls Exp $
*/
#include "ci.h"
@@ -327,7 +327,7 @@ int cCiTransportConnection::RecvTPDU(void)
pfd[0].fd = fd;
pfd[0].events = POLLIN;
lastResponse = ERROR;
- if (poll(pfd, 1, CAM_READ_TIMEOUT) && (pfd[0].revents & POLLIN) && tpdu->Read(fd) == OK && tpdu->Tcid() == tcid) {
+ if (poll(pfd, 1, CAM_READ_TIMEOUT) > 0 && (pfd[0].revents & POLLIN) && tpdu->Read(fd) == OK && tpdu->Tcid() == tcid) {
switch (state) {
case stIDLE: break;
case stCREATION: if (tpdu->Tag() == T_CTC_REPLY) {