1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed handling error case '-1' when polling CAM connections

This commit is contained in:
Klaus Schmidinger 2004-07-17 14:36:11 +02:00
parent 4807f978e5
commit d32f000861
2 changed files with 3 additions and 2 deletions

View File

@ -2951,3 +2951,4 @@ Video Disk Recorder Revision History
(thanks to Marco Schlüßler for pointing this out). (thanks to Marco Schlüßler for pointing this out).
- Fixed handling error case '-1' when polling section filters (thanks to Marco - Fixed handling error case '-1' when polling section filters (thanks to Marco
Schlüßler). Schlüßler).
- Fixed handling error case '-1' when polling CAM connections.

4
ci.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * 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" #include "ci.h"
@ -327,7 +327,7 @@ int cCiTransportConnection::RecvTPDU(void)
pfd[0].fd = fd; pfd[0].fd = fd;
pfd[0].events = POLLIN; pfd[0].events = POLLIN;
lastResponse = ERROR; 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) { switch (state) {
case stIDLE: break; case stIDLE: break;
case stCREATION: if (tpdu->Tag() == T_CTC_REPLY) { case stCREATION: if (tpdu->Tag() == T_CTC_REPLY) {