From bbb9d4f21b018bfffc41f790aab7b54975504027 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 14 Oct 2015 17:46:24 -0700 Subject: MAINT-5732: Change to the way event polling handles error conditions and cancel calls. Refactor any remaining LLCore::HTTPHandlers to use boost::shared_ptr Started minor refactor in the materials manager into coroutines (unfinished) --- indra/llcorehttp/_httpreplyqueue.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/llcorehttp/_httpreplyqueue.cpp') diff --git a/indra/llcorehttp/_httpreplyqueue.cpp b/indra/llcorehttp/_httpreplyqueue.cpp index 558b7bdee9..912655d328 100755 --- a/indra/llcorehttp/_httpreplyqueue.cpp +++ b/indra/llcorehttp/_httpreplyqueue.cpp @@ -39,7 +39,6 @@ namespace LLCore HttpReplyQueue::HttpReplyQueue() - : RefCounted(true) { } -- cgit v1.2.3 From 8d334ca1bf51dc1a0020f53cdd7a3927bdb7740c Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 16 Oct 2015 11:40:48 -0700 Subject: MAINT-5271: Converted internal pointers to internal operation to managed shared pointers. Removed direct cast and dereference of handles. --- indra/llcorehttp/_httpreplyqueue.cpp | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'indra/llcorehttp/_httpreplyqueue.cpp') 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; } -- cgit v1.2.3