Changeset 1487

Show
Ignore:
Timestamp:
07/18/05 07:30:19 (3 years ago)
Author:
madcat
Message:

doComplete() the download when lock isn't associated with a chunk as well.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • hydranode/src/partdata.cpp

    r1468 r1487  
    400400        using namespace Utils; 
    401401        using boost::algorithm::replace_last; 
    402          
     402 
    403403        std::string tmp(p.string()); 
    404404        replace_last(tmp, ".dat.bak", ""); // in case of backups 
     
    477477PartData::PartData( 
    478478        const boost::filesystem::path &path, MetaData *md 
    479 ) : m_chunks(new ChunkMap), m_size(md->getSize()), m_loc(path), m_toFlush(),  
     479) : m_chunks(new ChunkMap), m_size(md->getSize()), m_loc(path), m_toFlush(), 
    480480m_md(md), m_pendingHashes(), m_sourceCnt(), m_fullSourceCnt()  { 
    481481        getSourceCnt(); // initialize from main app 
     
    827827                save(); 
    828828        } 
     829        if (isComplete() && !m_fullJob && !m_pendingHashes) { 
     830                doComplete(); 
     831        } 
    829832} 
    830833 
     
    841844                ); 
    842845        } 
    843          
     846 
    844847        for (BIter i = m_buffer.begin(); i != m_buffer.end(); ++i) try { 
    845848                uint64_t ret = lseek64(fd, (*i).first, SEEK_SET);