mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
No longer checking for EOPNOTSUPP in cDvbTuner::GetSignalQuality()
This commit is contained in:
parent
9455b9a2b0
commit
62dfd2f996
3
HISTORY
3
HISTORY
@ -7612,3 +7612,6 @@ Video Disk Recorder Revision History
|
|||||||
- Updated the Lithuanian OSD texts (thanks to Valdemaras Pipiras).
|
- Updated the Lithuanian OSD texts (thanks to Valdemaras Pipiras).
|
||||||
- The timeout for trying to switch to a valid programme is now reset immediately once
|
- The timeout for trying to switch to a valid programme is now reset immediately once
|
||||||
a programme has been found.
|
a programme has been found.
|
||||||
|
- No longer checking for EOPNOTSUPP in cDvbTuner::GetSignalQuality() to avoid breaking
|
||||||
|
this function in case the driver suddenly decides to return a different errno value
|
||||||
|
if an operation is not supported.
|
||||||
|
14
dvbdevice.c
14
dvbdevice.c
@ -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: dvbdevice.c 2.77 2012/12/30 13:08:41 kls Exp $
|
* $Id: dvbdevice.c 2.78 2013/02/14 13:21:34 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "dvbdevice.h"
|
#include "dvbdevice.h"
|
||||||
@ -583,15 +583,13 @@ int cDvbTuner::GetSignalQuality(void) const
|
|||||||
while (1) {
|
while (1) {
|
||||||
if (ioctl(fd_frontend, FE_READ_SNR, &Snr) != -1)
|
if (ioctl(fd_frontend, FE_READ_SNR, &Snr) != -1)
|
||||||
break;
|
break;
|
||||||
if (errno == EOPNOTSUPP) {
|
if (errno != EINTR) {
|
||||||
Snr = 0xFFFF;
|
Snr = 0xFFFF;
|
||||||
#ifdef DEBUG_SIGNALQUALITY
|
#ifdef DEBUG_SIGNALQUALITY
|
||||||
HasSnr = false;
|
HasSnr = false;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (errno != EINTR)
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
#ifdef DEBUG_SIGNALQUALITY
|
#ifdef DEBUG_SIGNALQUALITY
|
||||||
bool HasBer = true;
|
bool HasBer = true;
|
||||||
@ -600,15 +598,13 @@ int cDvbTuner::GetSignalQuality(void) const
|
|||||||
while (1) {
|
while (1) {
|
||||||
if (ioctl(fd_frontend, FE_READ_BER, &Ber) != -1)
|
if (ioctl(fd_frontend, FE_READ_BER, &Ber) != -1)
|
||||||
break;
|
break;
|
||||||
if (errno == EOPNOTSUPP) {
|
if (errno != EINTR) {
|
||||||
Ber = 0;
|
Ber = 0;
|
||||||
#ifdef DEBUG_SIGNALQUALITY
|
#ifdef DEBUG_SIGNALQUALITY
|
||||||
HasBer = false;
|
HasBer = false;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (errno != EINTR)
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
#ifdef DEBUG_SIGNALQUALITY
|
#ifdef DEBUG_SIGNALQUALITY
|
||||||
bool HasUnc = true;
|
bool HasUnc = true;
|
||||||
@ -617,15 +613,13 @@ int cDvbTuner::GetSignalQuality(void) const
|
|||||||
while (1) {
|
while (1) {
|
||||||
if (ioctl(fd_frontend, FE_READ_UNCORRECTED_BLOCKS, &Unc) != -1)
|
if (ioctl(fd_frontend, FE_READ_UNCORRECTED_BLOCKS, &Unc) != -1)
|
||||||
break;
|
break;
|
||||||
if (errno == EOPNOTSUPP) {
|
if (errno != EINTR) {
|
||||||
Unc = 0;
|
Unc = 0;
|
||||||
#ifdef DEBUG_SIGNALQUALITY
|
#ifdef DEBUG_SIGNALQUALITY
|
||||||
HasUnc = false;
|
HasUnc = false;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (errno != EINTR)
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
uint16_t MaxSnr = 0xFFFF; // Let's assume the default is using the entire range.
|
uint16_t MaxSnr = 0xFFFF; // Let's assume the default is using the entire range.
|
||||||
// Use the subsystemId to identify individual devices in case they need
|
// Use the subsystemId to identify individual devices in case they need
|
||||||
|
Loading…
Reference in New Issue
Block a user