Ticket #3720: 3720-event-socket-v1.patch

File 3720-event-socket-v1.patch, 989 bytes (added by danielk, 13 years ago)

Event socket issue fixed with a warning when possibly used incorrectly.

  • libs/libmyth/mythcontext.cpp

     
    10011001    QString server = gContext->GetSetting("MasterServerIP", "localhost");
    10021002    int port = gContext->GetNumSetting("MasterServerPort", 6543);
    10031003
    1004     if (!d->eventSock)
     1004    if (!d->eventSock && !IsMasterBackend())
    10051005        d->eventSock = new MythSocket();
    10061006
    10071007    if (!d->serverSock)
     
    27082708{
    27092709    (void)sock;
    27102710
     2711    if (!d->eventSock)
     2712    {
     2713        VERBOSE(VB_IMPORTANT, "MythContext: "
     2714                "Programmer Error: readyRead() called with no eventSock!"
     2715                "\n\t\t\tYou should not connect to the master backend "
     2716                "from the master backend using an event socket.");
     2717        return;
     2718    }
     2719
    27112720    while (d->eventSock->state() == MythSocket::Connected &&
    27122721           d->eventSock->bytesAvailable() > 0)
    27132722    {