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

Now initializing the status variable in cDvbTuner::GetFrontendStatus() and cDvbTuner::GetSignalStats() to avoid problems with drivers that don't do this

This commit is contained in:
Klaus Schmidinger 2020-10-16 13:58:45 +02:00
parent c5461ffd9f
commit f387bb5e77
3 changed files with 8 additions and 2 deletions

View File

@ -3626,6 +3626,8 @@ Helmut Binder <cco@aon.at>
lost in version 1.7.13
for adding a check for an empty command in cDvbTuner::GetSignalStats() to avoid a
possible error message
for initializing the status variable in cDvbTuner::GetFrontendStatus() and
cDvbTuner::GetSignalStats() to avoid problems with drivers that don't do this
Ulrich Eckhardt <uli@uli-eckhardt.de>
for reporting a problem with shutdown after user inactivity in case a plugin is

View File

@ -9532,3 +9532,6 @@ Video Disk Recorder Revision History
in version 1.7.13 (thanks to Helmut Binder).
- Now checking for an empty command in cDvbTuner::GetSignalStats() to avoid a possible
error message (thanks to Helmut Binder).
- Now initializing the status variable in cDvbTuner::GetFrontendStatus() and
cDvbTuner::GetSignalStats() to avoid problems with drivers that don't do this
(thanks to Helmut Binder).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: dvbdevice.c 4.26 2020/10/16 13:50:36 kls Exp $
* $Id: dvbdevice.c 4.27 2020/10/16 13:58:45 kls Exp $
*/
#include "dvbdevice.h"
@ -856,6 +856,7 @@ void cDvbTuner::ClearEventQueue(void) const
bool cDvbTuner::GetFrontendStatus(fe_status_t &Status) const
{
ClearEventQueue();
Status = (fe_status_t)0; // initialize here to fix buggy drivers
while (1) {
if (ioctl(fd_frontend, FE_READ_STATUS, &Status) != -1)
return true;
@ -872,7 +873,7 @@ bool cDvbTuner::GetFrontendStatus(fe_status_t &Status) const
bool cDvbTuner::GetSignalStats(int &Valid, double *Strength, double *Cnr, double *BerPre, double *BerPost, double *Per, int *Status) const
{
ClearEventQueue();
fe_status_t FeStatus;
fe_status_t FeStatus = (fe_status_t)0; // initialize here to fix buggy drivers
dtv_property Props[MAXFRONTENDCMDS];
dtv_properties CmdSeq;
memset(&Props, 0, sizeof(Props));