More cURL API fixes... (Fix for LLSyntaxIdLSL will be merged from upstream in a later merge)
parent
94ec054a44
commit
f92aedd86e
|
|
@ -1595,18 +1595,18 @@ BOOL FSFloaterIM::isInviteAllowed() const
|
|||
(IM_SESSION_INVITE == mDialog && !gAgent.isInGroup(mSessionID)));
|
||||
}
|
||||
|
||||
class LLSessionInviteResponder : public LLHTTPClient::Responder
|
||||
class FSSessionInviteResponder : public LLHTTPClient::Responder
|
||||
{
|
||||
public:
|
||||
LLSessionInviteResponder(const LLUUID& session_id)
|
||||
FSSessionInviteResponder(const LLUUID& session_id)
|
||||
{
|
||||
mSessionID = session_id;
|
||||
}
|
||||
|
||||
void errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content)
|
||||
void httpFailure()
|
||||
{
|
||||
LL_WARNS("FSFloaterIM") << "Error inviting all agents to session [status:"
|
||||
<< statusNum << "]: " << content << LL_ENDL;
|
||||
<< getStatus() << "]: " << getContent() << LL_ENDL;
|
||||
//TODO: throw something back to the viewer here?
|
||||
}
|
||||
|
||||
|
|
@ -1637,7 +1637,7 @@ BOOL FSFloaterIM::inviteToSession(const uuid_vec_t& ids)
|
|||
}
|
||||
data["method"] = "invite";
|
||||
data["session-id"] = mSessionID;
|
||||
LLHTTPClient::post(url, data,new LLSessionInviteResponder(mSessionID));
|
||||
LLHTTPClient::post(url, data,new FSSessionInviteResponder(mSessionID));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -101,13 +101,10 @@ class FSClassifiedClickMessageResponder : public LLHTTPClient::Responder
|
|||
|
||||
public:
|
||||
// If we get back an error (not found, etc...), handle it here
|
||||
virtual void errorWithContent(
|
||||
U32 status,
|
||||
const std::string& reason,
|
||||
const LLSD& content)
|
||||
virtual void httpFailure()
|
||||
{
|
||||
LL_WARNS("FSClassifiedClickMessageResponder") << "Sending click message failed (" << status << "): [" << reason << "]" << LL_ENDL;
|
||||
LL_WARNS("FSClassifiedClickMessageResponder") << "Content: [" << content << "]" << LL_ENDL;
|
||||
LL_WARNS("FSClassifiedClickMessageResponder") << "Sending click message failed (" << getStatus() << "): [" << getReason() << "]" << LL_ENDL;
|
||||
LL_WARNS("FSClassifiedClickMessageResponder") << "Content: [" << getContent() << "]" << LL_ENDL;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -65,8 +65,14 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
virtual void error(U32 statusNum, const std::string& reason)
|
||||
// <FS:Ansariel> Fix cURL API
|
||||
//virtual void error(U32 statusNum, const std::string& reason)
|
||||
//{
|
||||
virtual void httpFailure()
|
||||
{
|
||||
S32 statusNum = getStatus();
|
||||
std::string reason = getReason();
|
||||
// </FS:Ansariel>
|
||||
LLViewerRegion * regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
|
||||
if (regionp)
|
||||
{
|
||||
|
|
@ -86,8 +92,13 @@ public:
|
|||
|
||||
}
|
||||
|
||||
virtual void result(const LLSD& content)
|
||||
// <FS:Ansariel> Fix cURL API
|
||||
//virtual void result(const LLSD& content)
|
||||
//{
|
||||
virtual void httpSuccess()
|
||||
{
|
||||
LLSD content = getContent();
|
||||
// </FS:Ansariel>
|
||||
LLViewerRegion * regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
|
||||
if (regionp)
|
||||
{
|
||||
|
|
@ -160,8 +171,14 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
virtual void error(U32 statusNum, const std::string& reason)
|
||||
// <FS:Ansariel> Fix cURL API
|
||||
//virtual void error(U32 statusNum, const std::string& reason)
|
||||
//{
|
||||
virtual void httpFailure()
|
||||
{
|
||||
S32 statusNum = getStatus();
|
||||
std::string reason = getReason();
|
||||
// </FS:Ansariel>
|
||||
LLViewerRegion * regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
|
||||
if (regionp)
|
||||
{
|
||||
|
|
@ -180,8 +197,13 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
virtual void result(const LLSD& content)
|
||||
// <FS:Ansariel> Fix cURL API
|
||||
//virtual void result(const LLSD& content)
|
||||
//{
|
||||
virtual void httpSuccess()
|
||||
{
|
||||
LLSD content = getContent();
|
||||
// </FS:Ansariel>
|
||||
LLViewerRegion * regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
|
||||
if (regionp)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -639,15 +639,15 @@ void LLInspectAvatar::toggleSelectedVoice(bool enabled)
|
|||
mSessionID = session_id;
|
||||
}
|
||||
|
||||
virtual void errorWithContent(U32 status, const std::string& reason, const LLSD& content)
|
||||
virtual void httpFailure()
|
||||
{
|
||||
LL_WARNS() << "MuteVoiceResponder error [status:" << status << "]: " << content << LL_ENDL;
|
||||
LL_WARNS() << "MuteVoiceResponder error [status:" << getStatus() << "]: " << getContent() << LL_ENDL;
|
||||
|
||||
if ( gIMMgr )
|
||||
{
|
||||
//403 == you're not a mod
|
||||
//HTTP_FORBIDDEN == you're not a mod
|
||||
//should be disabled if you're not a moderator
|
||||
if ( 403 == status )
|
||||
if ( HTTP_FORBIDDEN == getStatus() )
|
||||
{
|
||||
gIMMgr->showSessionEventError(
|
||||
"mute",
|
||||
|
|
|
|||
Loading…
Reference in New Issue