diff options
| author | Monty Brandenberg <monty@lindenlab.com> | 2014-06-16 16:41:52 -0400 | 
|---|---|---|
| committer | Monty Brandenberg <monty@lindenlab.com> | 2014-06-16 16:41:52 -0400 | 
| commit | 903729d5c97c9f93daf463e155055653b92f8fe4 (patch) | |
| tree | 178e5b9e774702c046f3e7d279ef5b9ef8fc4d1b /indra/newview/llvoicechannel.cpp | |
| parent | f3a037f8ad520b7b070fdd057ce2d0b012121efd (diff) | |
| parent | 977476171ddcc057d7c28b6c14ae988b8189ed75 (diff) | |
Merge.  Refresh from viewer-release after 3.7.9 release.
Diffstat (limited to 'indra/newview/llvoicechannel.cpp')
| -rwxr-xr-x | indra/newview/llvoicechannel.cpp | 21 | 
1 files changed, 14 insertions, 7 deletions
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 312842a70f..3c3dc33772 100755 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -55,26 +55,27 @@ const U32 DEFAULT_RETRIES_COUNT = 3;  class LLVoiceCallCapResponder : public LLHTTPClient::Responder  { +	LOG_CLASS(LLVoiceCallCapResponder);  public:  	LLVoiceCallCapResponder(const LLUUID& session_id) : mSessionID(session_id) {}; +protected:  	// called with bad status codes -	virtual void errorWithContent(U32 status, const std::string& reason, const LLSD& content); -	virtual void result(const LLSD& content); +	virtual void httpFailure(); +	virtual void httpSuccess();  private:  	LLUUID mSessionID;  }; -void LLVoiceCallCapResponder::errorWithContent(U32 status, const std::string& reason, const LLSD& content) +void LLVoiceCallCapResponder::httpFailure()  { -	LL_WARNS("Voice") << "LLVoiceCallCapResponder error [status:" -		<< status << "]: " << content << LL_ENDL; +	LL_WARNS("Voice") << dumpResponse() << LL_ENDL;  	LLVoiceChannel* channelp = LLVoiceChannel::getChannelByID(mSessionID);  	if ( channelp )  	{ -		if ( 403 == status ) +		if ( HTTP_FORBIDDEN == getStatus() )  		{  			//403 == no ability  			LLNotificationsUtil::add( @@ -91,12 +92,18 @@ void LLVoiceCallCapResponder::errorWithContent(U32 status, const std::string& re  	}  } -void LLVoiceCallCapResponder::result(const LLSD& content) +void LLVoiceCallCapResponder::httpSuccess()  {  	LLVoiceChannel* channelp = LLVoiceChannel::getChannelByID(mSessionID);  	if (channelp)  	{  		//*TODO: DEBUG SPAM +		const LLSD& content = getContent(); +		if (!content.isMap()) +		{ +			failureResult(HTTP_INTERNAL_ERROR, "Malformed response contents", content); +			return; +		}  		LLSD::map_const_iterator iter;  		for(iter = content.beginMap(); iter != content.endMap(); ++iter)  		{  | 
