Ticket #5529: bufferedsocketdevice.patch

File bufferedsocketdevice.patch, 1.2 KB (added by michael bishop <clever@…>, 12 years ago)
  • bufferedsocketdevice.cpp

     
    1414#include "bufferedsocketdevice.h"
    1515#include "upnputil.h"
    1616#include "mythverbose.h"  // for VERBOSE
     17#define DBG printf("%s:%d %s\n",__FILE__,__LINE__,__func__)
    1718
    1819/////////////////////////////////////////////////////////////////////////////
    1920//
     
    376377Q_ULONG BufferedSocketDevice::WaitForMore( int msecs, bool *pTimeout /* = NULL*/ )
    377378{
    378379    bool bTimeout = false;
    379 
     380DBG;
    380381    if ( !m_pSocket->isValid() )
    381382        return 0;
    382383
     
    384385
    385386    if (nBytes == 0)
    386387    {
     388DBG;
    387389/*
    388390        The following code is a possible workaround to the lost request problem
    389391        I just hate looping too much to put it in.  I believe there is something
     
    409411        //          to help recover from lost requests.  (hack until better fix found)
    410412
    411413        msecs  = 1000;
    412 
     414DBG;
    413415        nBytes = m_pSocket->waitForMore( msecs, &bTimeout );
    414 
     416DBG;
    415417        if (pTimeout != NULL)
    416418            *pTimeout = bTimeout;
    417419    }
    418            
     420DBG;           
    419421    return nBytes; // nBytes  //m_bufRead.size();
    420422}
    421423