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/_httpoperation.cpp | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) (limited to 'indra/llcorehttp/_httpoperation.cpp') diff --git a/indra/llcorehttp/_httpoperation.cpp b/indra/llcorehttp/_httpoperation.cpp index fefe561f80..dc03b059a4 100755 --- a/indra/llcorehttp/_httpoperation.cpp +++ b/indra/llcorehttp/_httpoperation.cpp @@ -57,8 +57,8 @@ namespace LLCore HttpOperation::HttpOperation() : LLCoreInt::RefCounted(true), - mReplyQueue(NULL), - mUserHandler(NULL), + mReplyQueue(), + mUserHandler(), mReqPolicy(HttpRequest::DEFAULT_POLICY_ID), mReqPriority(0U), mTracing(HTTP_TRACE_OFF) @@ -69,30 +69,15 @@ HttpOperation::HttpOperation() HttpOperation::~HttpOperation() { - setReplyPath(NULL, NULL); + setReplyPath(HttpReplyQueue::ptr_t(), HttpHandler::ptr_t()); } -void HttpOperation::setReplyPath(HttpReplyQueue * reply_queue, - HttpHandler * user_handler) +void HttpOperation::setReplyPath(HttpReplyQueue::ptr_t reply_queue, + HttpHandler::ptr_t user_handler) { - if (reply_queue != mReplyQueue) - { - if (mReplyQueue) - { - mReplyQueue->release(); - } - - if (reply_queue) - { - reply_queue->addRef(); - } - - mReplyQueue = reply_queue; - } - - // Not refcounted - mUserHandler = user_handler; + mReplyQueue.swap(reply_queue); + mUserHandler.swap(user_handler); } -- cgit v1.2.3