summaryrefslogtreecommitdiff
path: root/indra/newview/llmediadataclient.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/newview/llmediadataclient.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/newview/llmediadataclient.cpp')
-rwxr-xr-xindra/newview/llmediadataclient.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp
index bfd0700a2f..bd8f464acd 100755
--- a/indra/newview/llmediadataclient.cpp
+++ b/indra/newview/llmediadataclient.cpp
@@ -353,14 +353,12 @@ void LLMediaDataClient::serviceQueue()
trackRequest(request);
// and make the post
- LLHttpSDHandler *handler = request->createHandler();
+ LLCore::HttpHandler::ptr_t handler = request->createHandler();
LLCore::HttpHandle handle = LLCoreHttpUtil::requestPostWithLLSD(mHttpRequest, mHttpPolicy, 0,
url, sd_payload, mHttpOpts, mHttpHeaders, handler);
if (handle == LLCORE_HTTP_HANDLE_INVALID)
{
- // *TODO: Change this metaphore to use boost::shared_ptr<> for handlers. Requires change in LLCore::HTTP
- delete handler;
LLCore::HttpStatus status = mHttpRequest->getStatus();
LL_WARNS("LLMediaDataClient") << "'" << url << "' request POST failed. Reason "
<< status.toTerseString() << " \"" << status.toString() << "\"" << LL_ENDL;
@@ -878,9 +876,9 @@ LLSD LLObjectMediaDataClient::RequestGet::getPayload() const
return result;
}
-LLHttpSDHandler *LLObjectMediaDataClient::RequestGet::createHandler()
+LLCore::HttpHandler::ptr_t LLObjectMediaDataClient::RequestGet::createHandler()
{
- return new LLObjectMediaDataClient::Handler(shared_from_this());
+ return LLCore::HttpHandler::ptr_t(new LLObjectMediaDataClient::Handler(shared_from_this()));
}
@@ -914,10 +912,10 @@ LLSD LLObjectMediaDataClient::RequestUpdate::getPayload() const
return result;
}
-LLHttpSDHandler *LLObjectMediaDataClient::RequestUpdate::createHandler()
+LLCore::HttpHandler::ptr_t LLObjectMediaDataClient::RequestUpdate::createHandler()
{
// This just uses the base class's responder.
- return new LLMediaDataClient::Handler(shared_from_this());
+ return LLCore::HttpHandler::ptr_t(new LLMediaDataClient::Handler(shared_from_this()));
}
void LLObjectMediaDataClient::Handler::onSuccess(LLCore::HttpResponse * response, const LLSD &content)
@@ -1049,9 +1047,9 @@ LLSD LLObjectMediaNavigateClient::RequestNavigate::getPayload() const
return result;
}
-LLHttpSDHandler *LLObjectMediaNavigateClient::RequestNavigate::createHandler()
+LLCore::HttpHandler::ptr_t LLObjectMediaNavigateClient::RequestNavigate::createHandler()
{
- return new LLObjectMediaNavigateClient::Handler(shared_from_this());
+ return LLCore::HttpHandler::ptr_t(new LLObjectMediaNavigateClient::Handler(shared_from_this()));
}
void LLObjectMediaNavigateClient::Handler::onSuccess(LLCore::HttpResponse * response, const LLSD &content)