summaryrefslogtreecommitdiff
path: root/indra/newview/llstartup.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2009-12-09 10:20:08 -0500
committerNat Goodspeed <nat@lindenlab.com>2009-12-09 10:20:08 -0500
commitadc975ff91ab89ebb3f0035110964e9aaea308b4 (patch)
treea5d1e7d88efc7718bbee2e7bf2a1e334f14754a1 /indra/newview/llstartup.cpp
parent724cbb8134567b7b8fd1e2fd8fd1c65d0d3aed78 (diff)
Reduce likelihood of indefinite wait in viewer integration tests.
Introduce LLStartupListener to allow viewerclient-based test script to query startup state. This handles the scenario in which, by the time the test script manages to connect, the viewer already IS in STATE_STARTED. Fix ViewerSession to invoke that query before waiting for STATE_STARTED. Make that wait time out eventually to deal with "System currently logging you off, please wait 5 minutes." Timeout raises new ViewerWontLogin exception. Fix testlangs to catch ViewerWontLogin and retry a limited number of times.
Diffstat (limited to 'indra/newview/llstartup.cpp')
-rw-r--r--indra/newview/llstartup.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 58df2ffb19..12ae12d4ae 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -193,6 +193,7 @@
#include "lllogin.h"
#include "llevents.h"
+#include "llstartuplistener.h"
#if LL_WINDOWS
#include "llwindebug.h"
@@ -241,7 +242,8 @@ static std::string gFirstSimSeedCap;
static LLVector3 gAgentStartLookAt(1.0f, 0.f, 0.f);
static std::string gAgentStartLocation = "safe";
-static LLEventStream sStartupStateWatcher("StartupState");
+boost::scoped_ptr<LLEventPump> LLStartUp::sStateWatcher(new LLEventStream("StartupState"));
+boost::scoped_ptr<LLStartupListener> LLStartUp::sListener(new LLStartupListener());
//
// local function declaration
@@ -2725,10 +2727,15 @@ void LLStartUp::setStartupState( EStartupState state )
getStartupStateString() << " to " <<
startupStateToString(state) << LL_ENDL;
gStartupState = state;
+ postStartupState();
+}
+
+void LLStartUp::postStartupState()
+{
LLSD stateInfo;
stateInfo["str"] = getStartupStateString();
- stateInfo["enum"] = state;
- sStartupStateWatcher.post(stateInfo);
+ stateInfo["enum"] = gStartupState;
+ sStateWatcher->post(stateInfo);
}