summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatertos.cpp
diff options
context:
space:
mode:
authorCallum Prentice <callum@lindenlab.com>2014-06-16 13:22:19 -0700
committerCallum Prentice <callum@lindenlab.com>2014-06-16 13:22:19 -0700
commitf11dd1d8a3dc4ba9a3c23563126e11ee971e219f (patch)
treecc2798f96eafb50f42d097da7ac53e152777c402 /indra/newview/llfloatertos.cpp
parent483bd134162ffeef8760173aa223daee81c0f9e3 (diff)
parent977476171ddcc057d7c28b6c14ae988b8189ed75 (diff)
Merge with head of viewer-release
Diffstat (limited to 'indra/newview/llfloatertos.cpp')
-rwxr-xr-xindra/newview/llfloatertos.cpp68
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