diff options
author | Richard Linden <none@none> | 2013-10-01 14:28:39 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2013-10-01 14:28:39 -0700 |
commit | 59628d6f85deed89cb35d9343183069cfccd13c0 (patch) | |
tree | 6b4c35053c2291fd5ff1cccedf86bbd76ce78e1d /indra/llmessage/lldatapacker.h | |
parent | ad777b46d0fe5d790e43efb1771e9f64f3ad3dfb (diff) | |
parent | 9e486f6c6abbee6cb41ba9a6271d8a025ad924ef (diff) |
Automated merge with http://bitbucket.org/lindenlab/viewer-release
Diffstat (limited to 'indra/llmessage/lldatapacker.h')
-rwxr-xr-x | indra/llmessage/lldatapacker.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/llmessage/lldatapacker.h b/indra/llmessage/lldatapacker.h index b0a638c16e..5140f56c01 100755 --- a/indra/llmessage/lldatapacker.h +++ b/indra/llmessage/lldatapacker.h @@ -170,6 +170,7 @@ public: S32 getBufferSize() const { return mBufferSize; } const U8* getBuffer() const { return mBufferp; } void reset() { mCurBufferp = mBufferp; mWriteEnabled = (mCurBufferp != NULL); } + void shift(S32 offset) { reset(); mCurBufferp += offset;} void freeBuffer() { delete [] mBufferp; mBufferp = mCurBufferp = NULL; mBufferSize = 0; mWriteEnabled = FALSE; } void assignBuffer(U8 *bufferp, S32 size) { @@ -199,8 +200,8 @@ inline BOOL LLDataPackerBinaryBuffer::verifyLength(const S32 data_size, const ch { if (mWriteEnabled && (mCurBufferp - mBufferp) > mBufferSize - data_size) { - llwarns << "Buffer overflow in BinaryBuffer length verify, field name " << name << "!" << llendl; - llwarns << "Current pos: " << (int)(mCurBufferp - mBufferp) << " Buffer size: " << mBufferSize << " Data size: " << data_size << llendl; + LL_WARNS() << "Buffer overflow in BinaryBuffer length verify, field name " << name << "!" << LL_ENDL; + LL_WARNS() << "Current pos: " << (int)(mCurBufferp - mBufferp) << " Buffer size: " << mBufferSize << " Data size: " << data_size << LL_ENDL; return FALSE; } @@ -320,8 +321,8 @@ inline BOOL LLDataPackerAsciiBuffer::verifyLength(const S32 data_size, const cha { if (mWriteEnabled && (mCurBufferp - mBufferp) > mBufferSize - data_size) { - llwarns << "Buffer overflow in AsciiBuffer length verify, field name " << name << "!" << llendl; - llwarns << "Current pos: " << (int)(mCurBufferp - mBufferp) << " Buffer size: " << mBufferSize << " Data size: " << data_size << llendl; + LL_WARNS() << "Buffer overflow in AsciiBuffer length verify, field name " << name << "!" << LL_ENDL; + LL_WARNS() << "Current pos: " << (int)(mCurBufferp - mBufferp) << " Buffer size: " << mBufferSize << " Data size: " << data_size << LL_ENDL; return FALSE; } |