Ticket #5529: bufferedsocketdevice.patch
File bufferedsocketdevice.patch, 1.2 KB (added by , 17 years ago) |
---|
-
bufferedsocketdevice.cpp
14 14 #include "bufferedsocketdevice.h" 15 15 #include "upnputil.h" 16 16 #include "mythverbose.h" // for VERBOSE 17 #define DBG printf("%s:%d %s\n",__FILE__,__LINE__,__func__) 17 18 18 19 ///////////////////////////////////////////////////////////////////////////// 19 20 // … … 376 377 Q_ULONG BufferedSocketDevice::WaitForMore( int msecs, bool *pTimeout /* = NULL*/ ) 377 378 { 378 379 bool bTimeout = false; 379 380 DBG; 380 381 if ( !m_pSocket->isValid() ) 381 382 return 0; 382 383 … … 384 385 385 386 if (nBytes == 0) 386 387 { 388 DBG; 387 389 /* 388 390 The following code is a possible workaround to the lost request problem 389 391 I just hate looping too much to put it in. I believe there is something … … 409 411 // to help recover from lost requests. (hack until better fix found) 410 412 411 413 msecs = 1000; 412 414 DBG; 413 415 nBytes = m_pSocket->waitForMore( msecs, &bTimeout ); 414 416 DBG; 415 417 if (pTimeout != NULL) 416 418 *pTimeout = bTimeout; 417 419 } 418 420 DBG; 419 421 return nBytes; // nBytes //m_bufRead.size(); 420 422 } 421 423