Ignore:
Timestamp:
28/04/2007 20:57:24 (5 years ago)
Author:
chris
Message:

Fix getting files with uncertain size (over 2GB) from the store. Failure
to drain the stream will leave the EOF byte in it, which breaks further
communications with the store over the same connection. (refs #2, refs #3)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/chris/merge/lib/backupclient/BackupStoreFile.cpp

    r1471 r1598  
    293293 
    294294                out.Close(); 
     295 
     296                // The stream might have uncertain size, in which case 
     297                // we need to drain it to get the  
     298                // Protocol::ProtocolStreamHeader_EndOfStream byte 
     299                // out of our connection stream. 
     300                char buffer[1]; 
     301                int drained = rEncodedFile.Read(buffer, 1); 
     302                ASSERT(drained == 0); 
    295303                 
    296304                // Write the attributes 
Note: See TracChangeset for help on using the changeset viewer.