diff options
author | Oz Linden <oz@lindenlab.com> | 2014-06-16 11:42:37 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2014-06-16 11:42:37 -0400 |
commit | e15002a11cf5081e0697065cb017ba0af6c4b32d (patch) | |
tree | d60ac6d3a85d114b7860e42be5d9ff3338a6a169 /indra/newview/llimview.cpp | |
parent | 78be5c3aa5f7263698bec5bcbccb24c150f78d09 (diff) | |
parent | 977476171ddcc057d7c28b6c14ae988b8189ed75 (diff) |
merge changes for 3.7.9-release
Diffstat (limited to 'indra/newview/llimview.cpp')
-rwxr-xr-x | indra/newview/llimview.cpp | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index f29f81406a..1b0f370536 100755 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1460,6 +1460,7 @@ void start_deprecated_conference_chat( class LLStartConferenceChatResponder : public LLHTTPClient::Responder { + LOG_CLASS(LLStartConferenceChatResponder); public: LLStartConferenceChatResponder( const LLUUID& temp_session_id, @@ -1473,10 +1474,12 @@ public: mAgents = agents_to_invite; } - virtual void errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content) +protected: + virtual void httpFailure() { //try an "old school" way. - if ( statusNum == 400 ) + // *TODO: What about other error status codes? 4xx 5xx? + if ( getStatus() == HTTP_BAD_REQUEST ) { start_deprecated_conference_chat( mTempSessionID, @@ -1485,8 +1488,7 @@ public: mAgents); } - LL_WARNS() << "LLStartConferenceChatResponder error [status:" - << statusNum << "]: " << content << LL_ENDL; + LL_WARNS() << dumpResponse() << LL_ENDL; //else throw an error back to the client? //in theory we should have just have these error strings @@ -1578,6 +1580,7 @@ bool LLIMModel::sendStartSession( class LLViewerChatterBoxInvitationAcceptResponder : public LLHTTPClient::Responder { + LOG_CLASS(LLViewerChatterBoxInvitationAcceptResponder); public: LLViewerChatterBoxInvitationAcceptResponder( const LLUUID& session_id, @@ -1587,8 +1590,15 @@ public: mInvitiationType = invitation_type; } - void result(const LLSD& content) +private: + void httpSuccess() { + const LLSD& content = getContent(); + if (!content.isMap()) + { + failureResult(HTTP_INTERNAL_ERROR, "Malformed response contents", content); + return; + } if ( gIMMgr) { LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); @@ -1633,19 +1643,17 @@ public: } } - void errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content) + void httpFailure() { - LL_WARNS() << "LLViewerChatterBoxInvitationAcceptResponder error [status:" - << statusNum << "]: " << content << LL_ENDL; + LL_WARNS() << dumpResponse() << LL_ENDL; //throw something back to the viewer here? if ( gIMMgr ) { gIMMgr->clearPendingAgentListUpdates(mSessionID); gIMMgr->clearPendingInvitation(mSessionID); - if ( 404 == statusNum ) + if ( HTTP_NOT_FOUND == getStatus() ) { - std::string error_string; - error_string = "session_does_not_exist_error"; + static const std::string error_string("session_does_not_exist_error"); gIMMgr->showSessionStartError(error_string, mSessionID); } } |