diff options
author | Merov Linden <merov@lindenlab.com> | 2014-06-17 11:12:27 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-06-17 11:12:27 -0700 |
commit | c4c8debfc230b4ec6d28c7a84cd2a9bb81d6c894 (patch) | |
tree | d01f663d3fc1562d773a229e943addb02d14089f /indra/newview/llimview.cpp | |
parent | 51865f4e94885471dba0402b33f0b11b72bbdb30 (diff) | |
parent | 977476171ddcc057d7c28b6c14ae988b8189ed75 (diff) |
Pull merge from lindenlab/viewer-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 af93778c10..8917c07759 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); } } |