summaryrefslogtreecommitdiff
path: root/indra/newview/llstartup.cpp
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-08-23 15:11:10 -0700
committerTodd Stinson <stinson@lindenlab.com>2012-08-23 15:11:10 -0700
commit6d84272d38a4d09819ae03f4d967195ec3bd660b (patch)
treef020454f9144a769081e44ee7cd4acae7042394b /indra/newview/llstartup.cpp
parentff95dd4a43fd888a9b7353abcbfa701e4844a3a5 (diff)
parentfcfc686d9c4125c7bf35fcc97cb40b18dd9a4fc1 (diff)
Pull and merge from ssh://hg@bitbucket.org/lindenlab/viewer-beta.
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 ba9c2c9e2f..ab72b4e512 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -2820,22 +2820,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.