summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/_httpoperation.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2015-10-14 17:46:24 -0700
committerRider Linden <rider@lindenlab.com>2015-10-14 17:46:24 -0700
commitbbb9d4f21b018bfffc41f790aab7b54975504027 (patch)
tree4c81cfc2348dd98a4a157979afc854568da4caea /indra/llcorehttp/_httpoperation.cpp
parent53b947e0397d6b88fdc6c0a10144e5a6d02a67d3 (diff)
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)
Diffstat (limited to 'indra/llcorehttp/_httpoperation.cpp')
-rwxr-xr-xindra/llcorehttp/_httpoperation.cpp29
1 files changed, 7 insertions, 22 deletions
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);
}