Ticket #13261: 20180417_1454_ignore_version_check.patch

File 20180417_1454_ignore_version_check.patch, 2.5 KB (added by Peter Bennett, 6 years ago)

Bypass version check options

  • mythtv/libs/libmythbase/mythcorecontext.cpp

    diff --git a/mythtv/libs/libmythbase/mythcorecontext.cpp b/mythtv/libs/libmythbase/mythcorecontext.cpp
    index a31e22a..98f8cac 100644
    a b bool MythCoreContext::SetupCommandSocket(MythSocket *serverSock, 
    297297    proto_mismatch = false;
    298298
    299299#ifndef IGNORE_PROTO_VER_MISMATCH
    300     if (!CheckProtoVersion(serverSock, timeout_in_ms, true))
     300    if (!GetNumSetting("IgnoreProtoVerMismatch", false)
     301        && !CheckProtoVersion(serverSock, timeout_in_ms, true))
    301302    {
    302303        proto_mismatch = true;
    303304        return false;
  • mythtv/libs/libmythbase/remotefile.cpp

    diff --git a/mythtv/libs/libmythbase/remotefile.cpp b/mythtv/libs/libmythbase/remotefile.cpp
    index 5d6d086..8003676 100644
    a b MythSocket *RemoteFile::openSocket(bool control) 
    167167    QStringList strlist;
    168168
    169169#ifndef IGNORE_PROTO_VER_MISMATCH
    170     if (!gCoreContext->CheckProtoVersion(lsock, 5000))
     170    if (!gCoreContext->GetNumSetting("IgnoreProtoVerMismatch", false)
     171        && !gCoreContext->CheckProtoVersion(lsock, 5000))
    171172    {
    172173        LOG(VB_GENERAL, LOG_ERR, loc +
    173174            QString("Failed validation to server %1:%2").arg(host).arg(port));
  • mythtv/libs/libmythprotoserver/requesthandler/outboundhandler.cpp

    diff --git a/mythtv/libs/libmythprotoserver/requesthandler/outboundhandler.cpp b/mythtv/libs/libmythprotoserver/requesthandler/outboundhandler.cpp
    index 392437b..c9eb966 100644
    a b bool OutboundRequestHandler::DoConnectToMaster(void) 
    4646    }
    4747
    4848#ifndef IGNORE_PROTO_VER_MISMATCH
    49     if (!m_socket->Validate())
     49    if (!gCoreContext->GetNumSetting("IgnoreProtoVerMismatch", false)
     50        && !m_socket->Validate())
    5051    {
    5152        LOG(VB_GENERAL, LOG_NOTICE, "Unable to confirm protocol version with backend.");
    5253        m_socket->DecrRef();
  • mythtv/programs/mythfrontend/main.cpp

    diff --git a/mythtv/programs/mythfrontend/main.cpp b/mythtv/programs/mythfrontend/main.cpp
    index 29c17d5..2784b30 100644
    a b int main(int argc, char **argv) 
    20082008            return GENERIC_EXIT_NO_THEME;
    20092009    }
    20102010
    2011     if (!UpgradeTVDatabaseSchema(false))
     2011    if (!gCoreContext->GetNumSetting("IgnoreSchemaVerMismatch", false)
     2012        && !UpgradeTVDatabaseSchema(false))
    20122013    {
    20132014        LOG(VB_GENERAL, LOG_ERR,
    20142015            "Couldn't upgrade database to new schema, exiting.");