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/llmessage/llhttpsdhandler.cpp | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) (limited to 'indra/llmessage/llhttpsdhandler.cpp') diff --git a/indra/llmessage/llhttpsdhandler.cpp b/indra/llmessage/llhttpsdhandler.cpp index d99bdd3f66..648bc5cfd8 100644 --- a/indra/llmessage/llhttpsdhandler.cpp +++ b/indra/llmessage/llhttpsdhandler.cpp @@ -36,8 +36,7 @@ #include "llcorehttputil.h" //======================================================================== -LLHttpSDHandler::LLHttpSDHandler(bool selfDelete): - mSelfDelete(selfDelete) +LLHttpSDHandler::LLHttpSDHandler() { } @@ -75,31 +74,4 @@ void LLHttpSDHandler::onCompleted(LLCore::HttpHandle handle, LLCore::HttpRespons this->onSuccess(response, resplsd); } - // The handler must destroy itself when it is done. - // *TODO: I'm not fond of this pattern. A class shooting itself in the head - // outside of a smart pointer always makes me nervous. - if (mSelfDelete) - delete this; -} - -//======================================================================== -LLHttpSDGenericHandler::LLHttpSDGenericHandler(const std::string &name, bool selfDelete): - LLHttpSDHandler(selfDelete), - mName(name) -{ -} - -void LLHttpSDGenericHandler::onSuccess(LLCore::HttpResponse * response, const LLSD &content) -{ - LL_DEBUGS() << mName << " Success." << LL_ENDL; -} - -void LLHttpSDGenericHandler::onFailure(LLCore::HttpResponse * response, LLCore::HttpStatus status) -{ - LL_WARNS() - << "\n--------------------------------------------------------------------------\n" - << mName << " Error[" << status.toULong() << "] cannot access cap with url '" - << response->getRequestURL() << "' because " << status.toString() - << "\n--------------------------------------------------------------------------" - << LL_ENDL; } -- cgit v1.2.3