diff options
| author | Oz Linden <oz@lindenlab.com> | 2011-10-17 16:19:57 -0400 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2011-10-17 16:19:57 -0400 |
| commit | 77dc594e79118769087c0e2094c303fc5aaea5d4 (patch) | |
| tree | ed538b0b4e1d0b1de7ecbf22f701bbb1595b967c /indra/llvfs/lllfsthread.cpp | |
| parent | 94c137d5c970bc01e3a4dbe8de6a7104085e5ba6 (diff) | |
| parent | 1afbdc79c6fb911a5ab2c87067e7b99bec92fbc6 (diff) | |
merge back late changes and tags from release branch
Diffstat (limited to 'indra/llvfs/lllfsthread.cpp')
| -rw-r--r-- | indra/llvfs/lllfsthread.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/llvfs/lllfsthread.cpp b/indra/llvfs/lllfsthread.cpp index bf49b9668e..3d3ed9f6d4 100644 --- a/indra/llvfs/lllfsthread.cpp +++ b/indra/llvfs/lllfsthread.cpp @@ -67,6 +67,10 @@ LLLFSThread::LLLFSThread(bool threaded) : LLQueuedThread("LFS", threaded), mPriorityCounter(PRIORITY_LOWBITS) { + if(!mLocalAPRFilePoolp) + { + mLocalAPRFilePoolp = new LLVolatileAPRPool() ; + } } LLLFSThread::~LLLFSThread() @@ -178,7 +182,8 @@ bool LLLFSThread::Request::processRequest() if (mOperation == FILE_READ) { llassert(mOffset >= 0); - LLAPRFile infile(mFileName, LL_APR_RB); + LLAPRFile infile ; // auto-closes + infile.open(mFileName, LL_APR_RB, mThread->getLocalAPRFilePool()); if (!infile.getFileHandle()) { llwarns << "LLLFS: Unable to read file: " << mFileName << llendl; @@ -200,7 +205,8 @@ bool LLLFSThread::Request::processRequest() apr_int32_t flags = APR_CREATE|APR_WRITE|APR_BINARY; if (mOffset < 0) flags |= APR_APPEND; - LLAPRFile outfile(mFileName, flags); + LLAPRFile outfile ; // auto-closes + outfile.open(mFileName, flags, mThread->getLocalAPRFilePool()); if (!outfile.getFileHandle()) { llwarns << "LLLFS: Unable to write file: " << mFileName << llendl; |
