diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2011-08-31 10:48:56 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2011-08-31 10:48:56 -0600 |
commit | 749d9ebadcd201e27a9453de7a2d9320d78efbb5 (patch) | |
tree | 6e2119ba44dd37543a81c2b67644c5fa1ac2b698 /indra/llvfs | |
parent | bdd053abcffea1f4c30421176d0a3749027c6b7d (diff) | |
parent | 48d949150cd445ce1e801a7a8ee67597a965f14b (diff) |
Merge
Diffstat (limited to 'indra/llvfs')
-rw-r--r-- | indra/llvfs/lllfsthread.cpp | 10 | ||||
-rw-r--r-- | indra/llvfs/llvfs.cpp | 5 |
2 files changed, 4 insertions, 11 deletions
diff --git a/indra/llvfs/lllfsthread.cpp b/indra/llvfs/lllfsthread.cpp index 3d3ed9f6d4..bf49b9668e 100644 --- a/indra/llvfs/lllfsthread.cpp +++ b/indra/llvfs/lllfsthread.cpp @@ -67,10 +67,6 @@ LLLFSThread::LLLFSThread(bool threaded) : LLQueuedThread("LFS", threaded), mPriorityCounter(PRIORITY_LOWBITS) { - if(!mLocalAPRFilePoolp) - { - mLocalAPRFilePoolp = new LLVolatileAPRPool() ; - } } LLLFSThread::~LLLFSThread() @@ -182,8 +178,7 @@ bool LLLFSThread::Request::processRequest() if (mOperation == FILE_READ) { llassert(mOffset >= 0); - LLAPRFile infile ; // auto-closes - infile.open(mFileName, LL_APR_RB, mThread->getLocalAPRFilePool()); + LLAPRFile infile(mFileName, LL_APR_RB); if (!infile.getFileHandle()) { llwarns << "LLLFS: Unable to read file: " << mFileName << llendl; @@ -205,8 +200,7 @@ bool LLLFSThread::Request::processRequest() apr_int32_t flags = APR_CREATE|APR_WRITE|APR_BINARY; if (mOffset < 0) flags |= APR_APPEND; - LLAPRFile outfile ; // auto-closes - outfile.open(mFileName, flags, mThread->getLocalAPRFilePool()); + LLAPRFile outfile(mFileName, flags); if (!outfile.getFileHandle()) { llwarns << "LLLFS: Unable to write file: " << mFileName << llendl; diff --git a/indra/llvfs/llvfs.cpp b/indra/llvfs/llvfs.cpp index 82c926620a..ade19f8103 100644 --- a/indra/llvfs/llvfs.cpp +++ b/indra/llvfs/llvfs.cpp @@ -234,7 +234,7 @@ LLVFS::LLVFS(const std::string& index_filename, const std::string& data_filename mDataFP(NULL), mIndexFP(NULL) { - mDataMutex = new LLMutex(0); + mDataMutex = new LLMutex; S32 i; for (i = 0; i < VFSLOCK_COUNT; i++) @@ -2098,8 +2098,7 @@ void LLVFS::dumpFiles() std::string filename = id.asString() + extension; llinfos << " Writing " << filename << llendl; - LLAPRFile outfile; - outfile.open(filename, LL_APR_WB); + LLAPRFile outfile(filename, LL_APR_WB); outfile.write(&buffer[0], size); outfile.close(); |