Ticket #7819: readyread.patch

File readyread.patch, 1.3 KB (added by Mike Nix <mnix@…>, 16 years ago)

temporary patch

  • libs/libmyth/mythcontext.cpp

     
    21632163
    21642164void MythContext::readyRead(MythSocket *sock)
    21652165{
    2166     (void)sock;
    2167 
    2168     while (d->eventSock->state() == MythSocket::Connected &&
    2169            d->eventSock->bytesAvailable() > 0)
     2166#if 1 // remove after bug fix for #7819 is finalized
     2167    if (!sock) {
     2168       VERBOSE(VB_IMPORTANT, QString("readyRead: sock is NULL"));
     2169       sock=d->eventSock;
     2170       if (!sock) {
     2171          VERBOSE(VB_IMPORTANT, QString("readyRead: d->eventSock is also NULL"));
     2172          return;
     2173          }
     2174       }
     2175    else if (sock != d->eventSock) {
     2176       if (d->eventSock) {
     2177          VERBOSE(VB_IMPORTANT, QString("readyRead: we got a socket that is not d->eventSock"));
     2178          }
     2179       else {
     2180          VERBOSE(VB_IMPORTANT, QString("readyRead: called with a socket and d->eventSock is NULL"));
     2181          }
     2182       }
     2183#endif
     2184       
     2185    while (sock->state() == MythSocket::Connected &&
     2186           sock->bytesAvailable() > 0)
    21702187    {
    21712188        QStringList strlist;
    2172         if (!d->eventSock->readStringList(strlist))
     2189        if (!sock->readStringList(strlist))
    21732190            continue;
    21742191
    21752192        QString prefix = strlist[0];