summaryrefslogtreecommitdiff
path: root/indra/newview/llstartup.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2012-08-09 11:52:48 -0700
committerOz Linden <oz@lindenlab.com>2012-08-09 11:52:48 -0700
commit5f1230e911623d77dbc3353819bed338c514f671 (patch)
treefef827996d95b645b2e54af7cfc31b2be7439d79 /indra/newview/llstartup.cpp
parent1869a399beb2cb3fa52d21f9c288f4c3b6ab4deb (diff)
MAINT-1342: correct initial login location handling, clarify the two related persistent settings
Diffstat (limited to 'indra/newview/llstartup.cpp')
-rw-r--r--indra/newview/llstartup.cpp35
1 files changed, 23 insertions, 12 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index a28d8d3546..218c35029e 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -2823,22 +2823,33 @@ bool LLStartUp::dispatchURL()
void LLStartUp::setStartSLURL(const LLSLURL& slurl)
{
- sStartSLURL = slurl;
- LL_DEBUGS("AppInit")<<slurl.asString()<<LL_ENDL;
+ LL_DEBUGS("AppInit")<<slurl.asString()<<LL_ENDL;
- switch(slurl.getType())
- {
- case LLSLURL::HOME_LOCATION:
- case LLSLURL::LAST_LOCATION:
- case LLSLURL::LOCATION:
- gSavedSettings.setString("LoginLocation", LLSLURL::SIM_LOCATION_HOME);
+ if ( slurl.isSpatial() )
+ {
+ std::string new_start = slurl.getSLURLString();
+ LL_DEBUGS("AppInit")<<new_start<<LL_ENDL;
+ sStartSLURL = slurl;
LLPanelLogin::onUpdateStartSLURL(slurl); // updates grid if needed
- break;
- default:
- break;
- }
+
+ // remember that this is where we wanted to log in...if the login fails,
+ // the next attempt will default to the same place.
+ gSavedSettings.setString("NextLoginLocation", new_start);
+ // following a successful login, this is cleared
+ // and the default reverts to LoginLocation
+ }
+ else
+ {
+ LL_WARNS("AppInit")<<"Invalid start SLURL (ignored): "<<slurl.asString()<<LL_ENDL;
+ }
}
+// static
+LLSLURL& LLStartUp::getStartSLURL()
+{
+ return sStartSLURL;
+}
+
/**
* Read all proxy configuration settings and set up both the HTTP proxy and
* SOCKS proxy as needed.