From 3a1af63db8fece8442d84970e3b86eac46fa3aeb Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Wed, 6 Jun 2012 11:25:41 +0200 Subject: [PATCH] LLLoginInstance crash report grid correctness --- indra/newview/app_settings/settings.xml | 12 ++++++++++++ indra/newview/llstartup.cpp | 23 ++++++++++++++++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 2fa1abb3b2..52f41271c6 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -142,6 +142,18 @@ Value http://localhost/grids.xml + LastConnectedGrid + + Comment + Last grid with successful connection + Persist + 1 + Type + String + Value + + + ShowMutedAvatarsAsCloud Comment diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 8f48a59846..315f402c26 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1198,12 +1198,28 @@ bool idle_startup() progress += 0.02f; display_startup(); +// + eLastExecEvent last_exec_event = gLastExecEvent; + const std::string current_grid =LLGridManager::getInstance()->getGrid(); + const std::string last_grid = gSavedSettings.getString("LastConnectedGrid"); + if (!last_grid.empty() && last_grid != current_grid) + { + // don't report crashes on a different grid than the one connecting to, + // since a bad OpenSim setup can crash the viewer a lot + last_exec_event = LAST_EXEC_NORMAL; + } +// + // Setting initial values... LLLoginInstance* login = LLLoginInstance::getInstance(); login->setNotificationsInterface(LLNotifications::getInstance()); login->setSerialNumber(LLAppViewer::instance()->getSerialNumber()); - login->setLastExecEvent(gLastExecEvent); +// +// login->setLastExecEvent(gLastExecEvent); + login->setLastExecEvent(last_exec_event); +// + login->setUpdaterLauncher(boost::bind(&LLAppViewer::launchUpdater, LLAppViewer::instance())); // This call to LLLoginInstance::connect() starts the @@ -1352,6 +1368,11 @@ bool idle_startup() { if(process_login_success_response()) { +// + const std::string current_grid = LLGridManager::getInstance()->getGrid(); + gSavedSettings.setString("LastConnectedGrid", current_grid); +// + // Pass the user information to the voice chat server interface. LLVoiceClient::getInstance()->userAuthorized(gUserCredential->userID(), gAgentID); // create the default proximal channel