summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/bufferarray.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcorehttp/bufferarray.cpp')
-rw-r--r--indra/llcorehttp/bufferarray.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/llcorehttp/bufferarray.cpp b/indra/llcorehttp/bufferarray.cpp
index 5eaa60c9ba..5eb8f84c34 100644
--- a/indra/llcorehttp/bufferarray.cpp
+++ b/indra/llcorehttp/bufferarray.cpp
@@ -288,6 +288,20 @@ int BufferArray::findBlock(size_t pos, size_t * ret_offset)
}
+bool BufferArray::getBlockStartEnd(int block, const char ** start, const char ** end)
+{
+ if (block < 0 || block >= mBlocks.size())
+ {
+ return false;
+ }
+
+ const Block & b(*mBlocks[block]);
+ *start = &b.mData[0];
+ *end = &b.mData[b.mUsed];
+ return true;
+}
+
+
// ==================================
// BufferArray::Block Definitions
// ==================================