diff options
author | Logan Dethrow <log@lindenlab.com> | 2011-06-01 17:05:38 -0400 |
---|---|---|
committer | Logan Dethrow <log@lindenlab.com> | 2011-06-01 17:05:38 -0400 |
commit | 2662c4b679f0eb2745619dc4fd1dd79af65126f0 (patch) | |
tree | f27ba8675353676d91327fc606b005f0096b2fb9 /indra/llmessage/lldatapacker.h | |
parent | 4b97f03b04e7df25e5b3622122f6d124d4a5f617 (diff) | |
parent | 2002a39e4db5ba96f4a0a7653f76a3cd55846a31 (diff) |
Merge. Pulling fix for VWR-25862 into bigger cache tree.
Diffstat (limited to 'indra/llmessage/lldatapacker.h')
-rw-r--r-- | indra/llmessage/lldatapacker.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/indra/llmessage/lldatapacker.h b/indra/llmessage/lldatapacker.h index dd9c4eaa38..b0a638c16e 100644 --- a/indra/llmessage/lldatapacker.h +++ b/indra/llmessage/lldatapacker.h @@ -168,10 +168,15 @@ public: S32 getCurrentSize() const { return (S32)(mCurBufferp - mBufferp); } S32 getBufferSize() const { return mBufferSize; } + const U8* getBuffer() const { return mBufferp; } void reset() { mCurBufferp = mBufferp; mWriteEnabled = (mCurBufferp != NULL); } void freeBuffer() { delete [] mBufferp; mBufferp = mCurBufferp = NULL; mBufferSize = 0; mWriteEnabled = FALSE; } void assignBuffer(U8 *bufferp, S32 size) { + if(mBufferp && mBufferp != bufferp) + { + freeBuffer() ; + } mBufferp = bufferp; mCurBufferp = bufferp; mBufferSize = size; |