summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2007-02-25 11:52:09 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2007-02-25 11:52:09 +0100
commit1a4456d9818289e5c888199f586a71a6408182a3 (patch)
treef02171d070ddf6d22c476c51ced5b7eb725c4a8d
parent7b59d84be35ab655e3753eb28e67199db5f6f514 (diff)
downloadvdr-1a4456d9818289e5c888199f586a71a6408182a3.tar.gz
vdr-1a4456d9818289e5c888199f586a71a6408182a3.tar.bz2
Simplified the error handling in cDvbTuner::GetFrontendStatus()
-rw-r--r--HISTORY2
-rw-r--r--dvbdevice.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/HISTORY b/HISTORY
index b143c0fb..4edd5141 100644
--- a/HISTORY
+++ b/HISTORY
@@ -5121,3 +5121,5 @@ Video Disk Recorder Revision History
renamed to "MenuKeyCloses", accordingly. This will result in an "unknown config
parameter: MenuButtonCloses" error message in the log file, so you may want to
remove that entry from your 'setup.conf' file.
+- Simplified the error handling in cDvbTuner::GetFrontendStatus() (based on a
+ discussion with Reinhard Nissl).
diff --git a/dvbdevice.c b/dvbdevice.c
index 8ea76fb5..8757710a 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.163 2007/02/24 11:20:42 kls Exp $
+ * $Id: dvbdevice.c 1.164 2007/02/25 11:46:52 kls Exp $
*/
#include "dvbdevice.h"
@@ -156,10 +156,9 @@ bool cDvbTuner::GetFrontendStatus(fe_status_t &Status, int TimeoutMs)
}
}
while (1) {
- int stat = ioctl(fd_frontend, FE_READ_STATUS, &Status);
- if (stat == 0)
+ if (ioctl(fd_frontend, FE_READ_STATUS, &Status) != -1)
return true;
- if (stat > 0 || errno != EINTR)
+ if (errno != EINTR)
break;
}
return false;