diff options
author | Nyx (Neal Orman) <nyx@lindenlab.com> | 2011-07-26 15:51:44 -0400 |
---|---|---|
committer | Nyx (Neal Orman) <nyx@lindenlab.com> | 2011-07-26 15:51:44 -0400 |
commit | 60d15f78e17a2203d73d58c3f1c2af941d599277 (patch) | |
tree | 58da32e9df5e9727e437efa90e98a0d4d2a3b0e9 /indra/llmessage/lldatapacker.h | |
parent | 85b316e5df41444eafe77964f1a4758ccfd40784 (diff) | |
parent | f79a058f3ce50361b732061ab30f4a1923fba445 (diff) |
merge with latest mesh-dev
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; |