Ignore:
Timestamp:
30/09/2008 22:07:36 (4 years ago)
Author:
chris
Message:

Additional debugging for protocol stream deadlock reported by
Matt Brown.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/trunk/lib/server/ProtocolUncertainStream.cpp

    r2127 r2303  
    7878                        } 
    7979                         
     80                        BOX_TRACE("Reading " << toRead << " bytes from stream"); 
     81         
    8082                        // Read it 
    8183                        int r = mrSource.Read(((uint8_t*)pBuffer) + read, toRead, Timeout); 
     
    8385                        if(r == 0) 
    8486                        { 
     87                                BOX_TRACE("Read " << r << " bytes from " 
     88                                        "stream, returning"); 
    8589                                return read; 
    8690                        } 
     
    9397                        if(r != toRead) 
    9498                        { 
     99                                BOX_TRACE("Read " << r << " bytes from " 
     100                                        "stream, returning"); 
    95101                                return read; 
    96102                        } 
     
    103109                        { 
    104110                                // Didn't get the byte, return now 
     111                                BOX_TRACE("Read 0 bytes of block header, " 
     112                                        "returning with " << read << " bytes " 
     113                                        "read this time"); 
    105114                                return read; 
    106115                        } 
     
    111120                                // All done. 
    112121                                mFinished = true; 
     122                                BOX_TRACE("Stream finished, returning with " << 
     123                                        read << " bytes read this time"); 
    113124                                return read; 
    114125                        } 
     
    128139                                THROW_EXCEPTION(ServerException, ProtocolUncertainStreamBadBlockHeader)  
    129140                        } 
     141 
     142                        BOX_TRACE("Next block has " << 
     143                                mBytesLeftInCurrentBlock << "bytes"); 
    130144                } 
    131145        } 
Note: See TracChangeset for help on using the changeset viewer.