summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/_httpreplyqueue.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2015-10-16 11:40:48 -0700
committerRider Linden <rider@lindenlab.com>2015-10-16 11:40:48 -0700
commit8d334ca1bf51dc1a0020f53cdd7a3927bdb7740c (patch)
treeb5624a2a6f94c5e6e1c748fc1c4ae3e77ceda5d2 /indra/llcorehttp/_httpreplyqueue.cpp
parent302e5780694a6f271807d0804db0c6fc6923026f (diff)
MAINT-5271: Converted internal pointers to internal operation to managed shared pointers. Removed direct cast and dereference of handles.
Diffstat (limited to 'indra/llcorehttp/_httpreplyqueue.cpp')
-rwxr-xr-xindra/llcorehttp/_httpreplyqueue.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/indra/llcorehttp/_httpreplyqueue.cpp b/indra/llcorehttp/_httpreplyqueue.cpp
index 912655d328..2b138f3ad5 100755
--- a/indra/llcorehttp/_httpreplyqueue.cpp
+++ b/indra/llcorehttp/_httpreplyqueue.cpp
@@ -45,16 +45,11 @@ HttpReplyQueue::HttpReplyQueue()
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);
@@ -65,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());
@@ -97,9 +92,6 @@ void HttpReplyQueue::fetchAll(OpContainer & ops)
mQueue.swap(ops);
}
}
-
- // Caller also acquires the reference counts on each op.
- return;
}