diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:57:16 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:57:16 -0600 |
commit | 42a9872891eba166e81cf4f8c062261cc77398f8 (patch) | |
tree | 86b4f99b354b8d8eabeca2ffe1874b3c4c90d957 /libktorrent/torrent/singlefilecache.cpp | |
parent | f96f74ffa7040e64ae3352e08c810c383c8a0ba2 (diff) | |
download | ktorrent-42a9872891eba166e81cf4f8c062261cc77398f8.tar.gz ktorrent-42a9872891eba166e81cf4f8c062261cc77398f8.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit f96f74ffa7040e64ae3352e08c810c383c8a0ba2.
Diffstat (limited to 'libktorrent/torrent/singlefilecache.cpp')
-rw-r--r-- | libktorrent/torrent/singlefilecache.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libktorrent/torrent/singlefilecache.cpp b/libktorrent/torrent/singlefilecache.cpp index 8986f98..4843c1f 100644 --- a/libktorrent/torrent/singlefilecache.cpp +++ b/libktorrent/torrent/singlefilecache.cpp @@ -76,7 +76,7 @@ namespace bt { // mmap continuously fails, so stop using it c->allocate(); - c->setStatus(Chunk::BUFFERED); + c->settqStatus(Chunk::BUFFERED); } else { @@ -88,7 +88,7 @@ namespace bt // buffer it if mmapping fails Out(SYS_GEN|LOG_IMPORTANT) << "Warning : mmap failure, falling back to buffered mode" << endl; c->allocate(); - c->setStatus(Chunk::BUFFERED); + c->settqStatus(Chunk::BUFFERED); } else { @@ -105,7 +105,7 @@ namespace bt if (mmap_failures >= 3 || !(buf = (Uint8*)fd->map(c,off,c->getSize(),CacheFile::READ))) { c->allocate(); - c->setStatus(Chunk::BUFFERED); + c->settqStatus(Chunk::BUFFERED); fd->read(c->getData(),c->getSize(),off); if (mmap_failures < 3) mmap_failures++; @@ -119,18 +119,18 @@ namespace bt void SingleFileCache::save(Chunk* c) { // unmap the chunk if it is mapped - if (c->getStatus() == Chunk::MMAPPED) + if (c->gettqStatus() == Chunk::MMAPPED) { fd->unmap(c->getData(),c->getSize()); c->clear(); - c->setStatus(Chunk::ON_DISK); + c->settqStatus(Chunk::ON_DISK); } - else if (c->getStatus() == Chunk::BUFFERED) + else if (c->gettqStatus() == Chunk::BUFFERED) { Uint64 off = c->getIndex() * tor.getChunkSize(); fd->write(c->getData(),c->getSize(),off); c->clear(); - c->setStatus(Chunk::ON_DISK); + c->settqStatus(Chunk::ON_DISK); } } |