summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/_httpservice.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/_httpservice.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/_httpservice.cpp')
-rwxr-xr-xindra/llcorehttp/_httpservice.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/indra/llcorehttp/_httpservice.cpp b/indra/llcorehttp/_httpservice.cpp
index 252db78c89..6c39fdc61b 100755
--- a/indra/llcorehttp/_httpservice.cpp
+++ b/indra/llcorehttp/_httpservice.cpp
@@ -263,14 +263,13 @@ void HttpService::shutdown()
// Cancel requests already on the request queue
HttpRequestQueue::OpContainer ops;
mRequestQueue->fetchAll(false, ops);
- while (! ops.empty())
- {
- HttpOperation * op(ops.front());
- ops.erase(ops.begin());
- op->cancel();
- op->release();
- }
+ for (HttpRequestQueue::OpContainer::iterator it = ops.begin();
+ it != ops.end(); ++it)
+ {
+ (*it)->cancel();
+ }
+ ops.clear();
// Shutdown transport canceling requests, freeing resources
mTransport->shutdown();
@@ -324,7 +323,7 @@ HttpService::ELoopSpeed HttpService::processRequestQueue(ELoopSpeed loop)
mRequestQueue->fetchAll(wait_for_req, ops);
while (! ops.empty())
{
- HttpOperation * op(ops.front());
+ HttpOperation::ptr_t op(ops.front());
ops.erase(ops.begin());
// Process operation
@@ -338,7 +337,7 @@ HttpService::ELoopSpeed HttpService::processRequestQueue(ELoopSpeed loop)
if (op->mTracing > HTTP_TRACE_OFF)
{
LL_INFOS(LOG_CORE) << "TRACE, FromRequestQueue, Handle: "
- << static_cast<HttpHandle>(op)
+ << op->getHandle()
<< LL_ENDL;
}
@@ -347,7 +346,7 @@ HttpService::ELoopSpeed HttpService::processRequestQueue(ELoopSpeed loop)
}
// Done with operation
- op->release();
+ op.reset();
}
// Queue emptied, allow polling loop to sleep