summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/_httpreplyqueue.cpp
diff options
context:
space:
mode:
authorGlenn Glazer <coyot@lindenlab.com>2016-04-07 12:10:13 -0700
committerGlenn Glazer <coyot@lindenlab.com>2016-04-07 12:10:13 -0700
commit369cefd5b3f2f52ae0dd203fcd45a4618f74b0f3 (patch)
tree941d27a32099abaf71bae8a2865002e2b25a3512 /indra/llcorehttp/_httpreplyqueue.cpp
parent0494a502aafac73800352dc26c4eb3a27b02a8ce (diff)
parent18928ea6c6f2830a0d45ec412c915eceff1b76b0 (diff)
pull from viewer-release
Diffstat (limited to 'indra/llcorehttp/_httpreplyqueue.cpp')
-rwxr-xr-xindra/llcorehttp/_httpreplyqueue.cpp19
1 files changed, 5 insertions, 14 deletions
diff --git a/indra/llcorehttp/_httpreplyqueue.cpp b/indra/llcorehttp/_httpreplyqueue.cpp
index 558b7bdee9..2b138f3ad5 100755
--- a/indra/llcorehttp/_httpreplyqueue.cpp
+++ b/indra/llcorehttp/_httpreplyqueue.cpp
@@ -39,23 +39,17 @@ namespace LLCore
HttpReplyQueue::HttpReplyQueue()
- : RefCounted(true)
{
}
HttpReplyQueue::~HttpReplyQueue()
{
- while (! mQueue.empty())
- {
- HttpOperation * op = mQueue.back();
- mQueue.pop_back();
- op->release();
- }
+ mQueue.clear();
}
-void HttpReplyQueue::addOp(HttpOperation * op)
+void HttpReplyQueue::addOp(const HttpReplyQueue::opPtr_t &op)
{
{
HttpScopedLock lock(mQueueMutex);
@@ -66,15 +60,15 @@ void HttpReplyQueue::addOp(HttpOperation * op)
}
-HttpOperation * HttpReplyQueue::fetchOp()
+HttpReplyQueue::opPtr_t HttpReplyQueue::fetchOp()
{
- HttpOperation * result(NULL);
+ HttpOperation::ptr_t result;
{
HttpScopedLock lock(mQueueMutex);
if (mQueue.empty())
- return NULL;
+ return opPtr_t();
result = mQueue.front();
mQueue.erase(mQueue.begin());
@@ -98,9 +92,6 @@ void HttpReplyQueue::fetchAll(OpContainer & ops)
mQueue.swap(ops);
}
}
-
- // Caller also acquires the reference counts on each op.
- return;
}