Ticket #5268: mythcontext-endless-loop.diff

File mythcontext-endless-loop.diff, 1.1 KB (added by Shane Shrybman <gnome42@…>, 12 years ago)

mythcontext endless loop debug

  • libs/libmyth/mythcontext.cpp

    diff --git a/libs/libmyth/mythcontext.cpp b/libs/libmyth/mythcontext.cpp
    index 6f59cb2..c577c87 100644
    a b bool MythContext::ConnectToMasterServer(bool blockingClient) 
    15941594    int port = gContext->GetNumSetting("MasterServerPort", 6543);
    15951595
    15961596    if (!d->eventSock)
    1597         d->eventSock = new MythSocket();
     1597    {
     1598
     1599        if (IsBackend() && (server == d->m_localhostname ||
     1600                            server == gContext->GetSetting("BackendServerIP")))
     1601        {
     1602            VERBOSE(VB_IMPORTANT, QString("MasterBackend localhostname: %1 "
     1603                "mserver: %2 (Not listening for events)")
     1604                .arg(d->m_localhostname).arg(server));
     1605        }
     1606        else
     1607            d->eventSock = new MythSocket();
     1608
     1609    }
    15981610
    15991611    if (!d->serverSock)
    16001612        d->serverSock = ConnectServer(d->eventSock, server,
    16011613                                      port, blockingClient);
    16021614
    1603     if (d->serverSock)
     1615    if (d->serverSock && d->eventSock)
    16041616        d->eventSock->setCallbacks(this);
    16051617
    16061618    return (bool) (d->serverSock);