Ticket #13386: 20190128-dvbchannelscan-dvbv5.patch

File 20190128-dvbchannelscan-dvbv5.patch, 2.0 KB (added by Klaas de Waal, 5 years ago)

Patch without the change to the timeout value computation, as requested by Stuart.

  • mythtv/libs/libmythtv/recorders/dvbchannel.cpp

    diff --git a/mythtv/libs/libmythtv/recorders/dvbchannel.cpp b/mythtv/libs/libmythtv/recorders/dvbchannel.cpp
    index a21d35df3f..480384d9ef 100644
    a b  
    4949#include "dvbcam.h"
    5050#include "tv_rec.h"
    5151
     52// Returned by drivers on unsupported dvbv3 ioctl calls
     53#ifndef ENOTSUPP
     54#define ENOTSUPP 524
     55#endif
     56
    5257static void drain_dvb_events(int fd);
    5358static bool wait_for_backend(int fd, int timeout_ms);
    5459static struct dvb_frontend_parameters dtvmultiplex_to_dvbparams(
    double DVBChannel::GetSignalStrength(bool *ok) const 
    11671172    if (ret < 0)
    11681173    {
    11691174#if DVB_API_VERSION >=5
    1170         if (errno == EOPNOTSUPP)
     1175        if (errno == EOPNOTSUPP || errno == ENOTSUPP)
    11711176        {
    11721177            return GetSignalStrengthDVBv5(ok);
    11731178        }
    double DVBChannel::GetSNR(bool *ok) const 
    12551260    if (ret < 0)
    12561261    {
    12571262#if DVB_API_VERSION >=5
    1258         if (errno == EOPNOTSUPP)
     1263        if (errno == EOPNOTSUPP || errno == ENOTSUPP)
    12591264        {
    12601265            return GetSNRDVBv5(ok);
    12611266        }
    double DVBChannel::GetBitErrorRate(bool *ok) const 
    13261331    if (ret < 0)
    13271332    {
    13281333#if DVB_API_VERSION >=5
    1329         if (errno == EOPNOTSUPP)
     1334        if (errno == EOPNOTSUPP || errno == ENOTSUPP)
    13301335        {
    13311336            return GetBitErrorRateDVBv5(ok);
    13321337        }
    double DVBChannel::GetUncorrectedBlockCount(bool *ok) const 
    13901395    if (ret < 0)
    13911396    {
    13921397#if DVB_API_VERSION >=5
    1393         if (errno == EOPNOTSUPP)
     1398        if (errno == EOPNOTSUPP || errno == ENOTSUPP)
    13941399        {
    13951400            return GetUncorrectedBlockCountDVBv5(ok);
    13961401        }
    static bool wait_for_backend(int fd, int timeout_ms) 
    15151520
    15161521    // This is supposed to work on all cards, post 2.6.12...
    15171522    fe_status_t status;
     1523    memset(&status, 0, sizeof(status));
     1524
    15181525    if (ioctl(fd, FE_READ_STATUS, &status) < 0)
    15191526    {
    15201527        LOG(VB_GENERAL, LOG_ERR,