diff options
author | Callum Prentice <callum@lindenlab.com> | 2014-06-16 13:22:19 -0700 |
---|---|---|
committer | Callum Prentice <callum@lindenlab.com> | 2014-06-16 13:22:19 -0700 |
commit | f11dd1d8a3dc4ba9a3c23563126e11ee971e219f (patch) | |
tree | cc2798f96eafb50f42d097da7ac53e152777c402 /indra/newview/llfloatertos.cpp | |
parent | 483bd134162ffeef8760173aa223daee81c0f9e3 (diff) | |
parent | 977476171ddcc057d7c28b6c14ae988b8189ed75 (diff) |
Merge with head of viewer-release
Diffstat (limited to 'indra/newview/llfloatertos.cpp')
-rwxr-xr-x | indra/newview/llfloatertos.cpp | 68 |
1 files changed, 36 insertions, 32 deletions
diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp index a242b224cd..0613ffc94d 100755 --- a/indra/newview/llfloatertos.cpp +++ b/indra/newview/llfloatertos.cpp @@ -36,7 +36,7 @@ #include "llbutton.h" #include "llevents.h" #include "llhttpclient.h" -#include "llhttpstatuscodes.h" // for HTTP_FOUND +#include "llhttpconstants.h" #include "llnotificationsutil.h" #include "llradiogroup.h" #include "lltextbox.h" @@ -62,42 +62,46 @@ LLFloaterTOS::LLFloaterTOS(const LLSD& data) // on parent class indicating if the web server is working or not class LLIamHere : public LLHTTPClient::Responder { - private: - LLIamHere( LLFloaterTOS* parent ) : - mParent( parent ) - {} + LOG_CLASS(LLIamHere); +private: + LLIamHere( LLFloaterTOS* parent ) : + mParent( parent ) + {} - LLFloaterTOS* mParent; + LLFloaterTOS* mParent; - public: - - static LLIamHere* build( LLFloaterTOS* parent ) - { - return new LLIamHere( parent ); - }; - - virtual void setParent( LLFloaterTOS* parentIn ) - { - mParent = parentIn; - }; - - virtual void result( const LLSD& content ) +public: + static LLIamHere* build( LLFloaterTOS* parent ) + { + return new LLIamHere( parent ); + } + + virtual void setParent( LLFloaterTOS* parentIn ) + { + mParent = parentIn; + } + +protected: + virtual void httpSuccess() + { + if ( mParent ) { - if ( mParent ) - mParent->setSiteIsAlive( true ); - }; + mParent->setSiteIsAlive( true ); + } + } - virtual void error( U32 status, const std::string& reason ) + virtual void httpFailure() + { + LL_DEBUGS("LLIamHere") << dumpResponse() << LL_ENDL; + if ( mParent ) { - if ( mParent ) - { - // *HACK: For purposes of this alive check, 302 Found - // (aka Moved Temporarily) is considered alive. The web site - // redirects this link to a "cache busting" temporary URL. JC - bool alive = (status == HTTP_FOUND); - mParent->setSiteIsAlive( alive ); - } - }; + // *HACK: For purposes of this alive check, 302 Found + // (aka Moved Temporarily) is considered alive. The web site + // redirects this link to a "cache busting" temporary URL. JC + bool alive = (getStatus() == HTTP_FOUND); + mParent->setSiteIsAlive( alive ); + } + } }; // this is global and not a class member to keep crud out of the header file |