From f10d168e0cb4e8dd666bdcbe7ead850be8235bc9 Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Tue, 22 Mar 2011 02:32:25 +0100 Subject: Don't report crashes if the grid where the crash happened is different from the grid logging in. Because otherwise crash statistics are wrong. See viewers with higher crash than disconnect rate. --- linden/indra/newview/app_settings/settings.xml | 11 +++++++++++ linden/indra/newview/llstartup.cpp | 23 +++++++++++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index c381d99..315670c 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -677,6 +677,17 @@ Value Random + LastConnectedGrid + + Comment + Last grid actually connected to + Persist + 1 + Type + String + Value + + LastSelectedGrid Comment diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index a74744b..85836fd 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp @@ -1241,6 +1241,20 @@ bool idle_startup() hashed_mac.finalize(); hashed_mac.hex_digest(hashed_mac_string); + // Don't report crashes if the grid we crashed in + // is different from the grid we log in + eLastExecEvent last_exec_event = LAST_EXEC_NORMAL; + { + std::string current_grid = gHippoGridManager->getCurrentGrid()->getGridNick(); + std::string last_grid = gSavedSettings.getString("LastConnectedGrid"); + LL_DEBUGS("AppInit") << "current grid: " << current_grid + << " Last Connected Grid: " << last_grid << LL_ENDL; + if( last_grid == current_grid ) + { + last_exec_event = gLastExecEvent; + } + } + // TODO if statement here to use web_login_key if(web_login_key.isNull()){ sAuthUriNum = llclamp(sAuthUriNum, 0, (S32)sAuthUris.size()-1); @@ -1255,7 +1269,7 @@ bool idle_startup() gSkipOptionalUpdate, gAcceptTOS, gAcceptCriticalMessage, - gLastExecEvent, + last_exec_event, requested_options, hashed_mac_string, LLAppViewer::instance()->getSerialNumber()); @@ -1270,7 +1284,7 @@ bool idle_startup() gSkipOptionalUpdate, gAcceptTOS, gAcceptCriticalMessage, - gLastExecEvent, + last_exec_event, requested_options, hashed_mac_string, LLAppViewer::instance()->getSerialNumber()); @@ -1508,6 +1522,11 @@ bool idle_startup() if(successful_login) { + { + std::string current_grid = gHippoGridManager->getConnectedGrid()->getGridNick(); + gSavedSettings.setString("LastConnectedGrid", current_grid); + } + std::string text; text = LLUserAuth::getInstance()->getResponse("udp_blacklist"); if(!text.empty()) -- cgit v1.1