diff options
author | Oz Linden <oz@lindenlab.com> | 2011-05-20 17:14:32 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-05-20 17:14:32 -0400 |
commit | 708b2974a9847fec822d19297e1ad6a1a84a9017 (patch) | |
tree | 7bf4016d278b908b8cd3ae47383877f2ffcba1f9 /indra/llmessage | |
parent | 385b1ca609a7c6f8d4b00da178ba7dd0cbeab790 (diff) | |
parent | ce554304fbc21e8a52b236a56eea70287f002fdd (diff) |
merge changes for sh-1591
Diffstat (limited to 'indra/llmessage')
-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; |