From 70600ea66adc816e72e91e804deebde40ed6b1bc Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Mon, 24 Aug 2009 17:07:10 -0400
Subject: [PATCH] Make setStartupState() fling events on "StartupState"
 LLEventPump

---
 indra/newview/llstartup.cpp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index a2e879d24d4..4afb0b06c8e 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -186,6 +186,7 @@
 #include "llinventorybridge.h"
 
 #include "lllogin.h"
+#include "llevents.h"
 
 #if LL_LIBXUL_ENABLED
 #include "llmozlib.h"
@@ -234,6 +235,7 @@ static std::string gFirstSimSeedCap;
 static LLVector3 gAgentStartLookAt(1.0f, 0.f, 0.f);
 static std::string gAgentStartLocation = "safe";
 
+static LLEventStream sStartupStateWatcher("StartupState");
 
 //
 // local function declaration
@@ -2637,14 +2639,17 @@ std::string LLStartUp::startupStateToString(EStartupState state)
 #undef RTNENUM
 }
 
-
 // static
 void LLStartUp::setStartupState( EStartupState state )
 {
 	LL_INFOS("AppInit") << "Startup state changing from " <<  
-		startupStateToString(gStartupState) << " to " <<  
+		getStartupStateString() << " to " <<  
 		startupStateToString(state) << LL_ENDL;
 	gStartupState = state;
+	LLSD stateInfo;
+	stateInfo["str"] = getStartupStateString();
+	stateInfo["enum"] = state;
+	sStartupStateWatcher.post(stateInfo);
 }
 
 
-- 
GitLab