summaryrefslogtreecommitdiff
path: root/indra/newview/llstartup.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-05-23 11:38:33 -0400
committerOz Linden <oz@lindenlab.com>2011-05-23 11:38:33 -0400
commit551d17f819ea3dbcdc61cb41a458ab6d893d28cf (patch)
tree130c90ed3b0f6a4245af843cf9170130d549dc4f /indra/newview/llstartup.cpp
parent99fe1004a6cb4406bcac790420a5be6269e02723 (diff)
parente5752934be74a84e6ec0ff8cb96974bd1e9060ec (diff)
merge latest changes (post-2.7.0) from viewer-development
Diffstat (limited to 'indra/newview/llstartup.cpp')
-rw-r--r--indra/newview/llstartup.cpp46
1 files changed, 30 insertions, 16 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 078de0cbdf..c6b73dae13 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -421,7 +421,7 @@ bool idle_startup()
//
// Load autopilot and stats stuff
- gAgentPilot.load(gSavedSettings.getString("StatsPilotFile"));
+ gAgentPilot.load();
//gErrorStream.setTime(gSavedSettings.getBOOL("LogTimestamps"));
@@ -995,6 +995,7 @@ bool idle_startup()
if(STATE_LOGIN_PROCESS_RESPONSE == LLStartUp::getStartupState())
{
+ // Generic failure message
std::ostringstream emsg;
emsg << LLTrans::getString("LoginFailed") << "\n";
if(LLLoginInstance::getInstance()->authFailure())
@@ -1003,25 +1004,33 @@ bool idle_startup()
<< LLLoginInstance::getInstance()->getResponse() << LL_ENDL;
LLSD response = LLLoginInstance::getInstance()->getResponse();
// Still have error conditions that may need some
- // sort of handling.
+ // sort of handling - dig up specific message
std::string reason_response = response["reason"];
std::string message_response = response["message"];
-
- if(!message_response.empty())
+ std::string message_id = response["message_id"];
+ std::string message; // actual string to show the user
+
+ if(!message_id.empty() && LLTrans::findString(message, message_id, response["message_args"]))
{
- // XUI: fix translation for strings returned during login
- // We need a generic table for translations
- std::string big_reason = LLAgent::sTeleportErrorMessages[ message_response ];
- if ( big_reason.size() == 0 )
- {
- emsg << message_response;
- }
- else
- {
- emsg << big_reason;
- }
+ // message will be filled in with the template and arguments
+ }
+ else if(!message_response.empty())
+ {
+ // *HACK: "no_inventory_host" sent as the message itself.
+ // Remove this clause when server is sending message_id as well.
+ message = LLAgent::sTeleportErrorMessages[ message_response ];
+ }
+
+ if (message.empty())
+ {
+ // Fallback to server-supplied string; necessary since server
+ // may add strings that this viewer is not yet aware of
+ message = message_response;
}
+ emsg << message;
+
+
if(reason_response == "key")
{
// Couldn't login because user/password is wrong
@@ -1957,7 +1966,7 @@ bool idle_startup()
}
// Start automatic replay if the flag is set.
- if (gSavedSettings.getBOOL("StatsAutoRun") || LLAgentPilot::sReplaySession)
+ if (gSavedSettings.getBOOL("StatsAutoRun") || gAgentPilot.getReplaySession())
{
LLUUID id;
LL_DEBUGS("AppInit") << "Starting automatic playback" << LL_ENDL;
@@ -3068,6 +3077,11 @@ bool process_login_success_response()
}
// Request the map server url
+ // Non-agni grids have a different default location.
+ if (!LLGridManager::getInstance()->isInProductionGrid())
+ {
+ gSavedSettings.setString("MapServerURL", "http://test.map.secondlife.com.s3.amazonaws.com/");
+ }
std::string map_server_url = response["map-server-url"];
if(!map_server_url.empty())
{