From 36207fcf1a16c66a5b831af31e524fc44060c2c8 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Mon, 20 Dec 2010 12:59:17 -0800 Subject: STORM-805 : Fix the map URL --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llstartup.cpp | 9 ++++++++- indra/newview/llworldmipmap.cpp | 3 +-- 3 files changed, 20 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 06992d2b52..2bb192474b 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4747,6 +4747,17 @@ Value http://map.secondlife.com.s3.amazonaws.com/ + CurrentMapServerURL + + Comment + Current Session World map URL + Persist + 0 + Type + String + Value + + MapShowEvents Comment diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index d945af0776..cc2cf0d66f 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -3095,7 +3095,14 @@ bool process_login_success_response() std::string map_server_url = response["map-server-url"]; if(!map_server_url.empty()) { - gSavedSettings.setString("MapServerURL", map_server_url); + // We got an answer from the grid -> use that for map for the current session + gSavedSettings.setString("CurrentMapServerURL", map_server_url); + } + else + { + // No answer from the grid -> use the default setting for current session + map_server_url = gSavedSettings.getString("MapServerURL"); + gSavedSettings.setString("CurrentMapServerURL", map_server_url); } // Default male and female avatars allowing the user to choose their avatar on first login. diff --git a/indra/newview/llworldmipmap.cpp b/indra/newview/llworldmipmap.cpp index be8298daab..74ed844376 100644 --- a/indra/newview/llworldmipmap.cpp +++ b/indra/newview/llworldmipmap.cpp @@ -181,8 +181,7 @@ LLPointer LLWorldMipmap::getObjectsTile(U32 grid_x, U32 LLPointer LLWorldMipmap::loadObjectsTile(U32 grid_x, U32 grid_y, S32 level) { // Get the grid coordinates - std::string imageurl = gSavedSettings.getString("MapServerURL") + llformat("map-%d-%d-%d-objects.jpg", level, grid_x, grid_y); - + std::string imageurl = gSavedSettings.getString("CurrentMapServerURL") + llformat("map-%d-%d-%d-objects.jpg", level, grid_x, grid_y); // DO NOT COMMIT!! DEBUG ONLY!!! // Use a local jpeg for every tile to test map speed without S3 access -- cgit v1.2.3 From f8325ac588641d1f65a3c452b775a42efbe84069 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 22 Dec 2010 22:09:42 -0800 Subject: STORM-805 : add some printout to the log so we can trace the answer map-server-url at startup --- indra/newview/llstartup.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index cc2cf0d66f..611f9de2e6 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -3097,12 +3097,14 @@ bool process_login_success_response() { // We got an answer from the grid -> use that for map for the current session gSavedSettings.setString("CurrentMapServerURL", map_server_url); + LL_INFOS("LLStartup") << "map-server-url : we got an answer from the grid : " << map_server_url << LL_ENDL; } else { // No answer from the grid -> use the default setting for current session map_server_url = gSavedSettings.getString("MapServerURL"); gSavedSettings.setString("CurrentMapServerURL", map_server_url); + LL_INFOS("LLStartup") << "map-server-url : no map-server-url answer, we use the default setting for the map : " << map_server_url << LL_ENDL; } // Default male and female avatars allowing the user to choose their avatar on first login. -- cgit v1.2.3