summaryrefslogtreecommitdiff
path: root/dvbdevice.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2007-02-24 11:20:42 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2007-02-24 11:20:42 +0100
commit50b14be807e1d3002246f359de83a8a18a0e6008 (patch)
tree1ac0d6fb9c3936f58a6a0c4c4f1131af4486d9c2 /dvbdevice.c
parent328d8b6494fe385034c80323738db9e6f6975c3d (diff)
downloadvdr-50b14be807e1d3002246f359de83a8a18a0e6008.tar.gz
vdr-50b14be807e1d3002246f359de83a8a18a0e6008.tar.bz2
Fixed handling error status in cDvbTuner::GetFrontendStatus()
Diffstat (limited to 'dvbdevice.c')
-rw-r--r--dvbdevice.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/dvbdevice.c b/dvbdevice.c
index 7271b4f0..8ea76fb5 100644
--- a/dvbdevice.c
+++ b/dvbdevice.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbdevice.c 1.162 2007/01/13 11:37:00 kls Exp $
+ * $Id: dvbdevice.c 1.163 2007/02/24 11:20:42 kls Exp $
*/
#include "dvbdevice.h"
@@ -155,15 +155,13 @@ bool cDvbTuner::GetFrontendStatus(fe_status_t &Status, int TimeoutMs)
; // just to clear the event queue - we'll read the actual status below
}
}
- do {
- int stat = ioctl(fd_frontend, FE_READ_STATUS, &Status);
- if (stat == 0)
- return true;
- if (stat < 0) {
- if (errno == EINTR)
- continue;
+ while (1) {
+ int stat = ioctl(fd_frontend, FE_READ_STATUS, &Status);
+ if (stat == 0)
+ return true;
+ if (stat > 0 || errno != EINTR)
+ break;
}
- } while (0);
return false;
}