From 09d8d17382c72b7741fde1334e832f39d773299f Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 2 Jul 2013 15:30:49 -0400 Subject: CHOP-959: Introduce CmdLineLoginLocation var for --url and --slurl. Route --url and --slurl command-line switches through a common settings variable. Treat them uniformly now. (Previously, passing --url would notice a grid-specific SLURL and preselect that grid; --slurl wouldn't. Now both do.) --- indra/newview/app_settings/cmd_line.xml | 6 ++++-- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llappviewer.cpp | 27 +++++++++++---------------- 3 files changed, 26 insertions(+), 18 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml index 8ca33fbf54..71a052057c 100755 --- a/indra/newview/app_settings/cmd_line.xml +++ b/indra/newview/app_settings/cmd_line.xml @@ -372,7 +372,8 @@ true last_option true - + map-to + CmdLineLoginLocation url @@ -383,7 +384,8 @@ 1 last_option true - + map-to + CmdLineLoginLocation usersessionsettings diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index a39b447cca..8a50ca146b 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1795,6 +1795,17 @@ + CmdLineLoginLocation + + Comment + Startup destination requested on command line + Persist + 0 + Type + String + Value + + ConnectAsGod Comment diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 613a23630f..3116dd4b00 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2597,20 +2597,16 @@ bool LLAppViewer::initConfiguration() // What can happen is that someone can use IE (or potentially // other browsers) and do the rough equivalent of command // injection and steal passwords. Phoenix. SL-55321 - if(clp.hasOption("url")) - { - LLStartUp::setStartSLURL(LLSLURL(clp.getOption("url")[0])); - if(LLStartUp::getStartSLURL().getType() == LLSLURL::LOCATION) - { - LLGridManager::getInstance()->setGridChoice(LLStartUp::getStartSLURL().getGrid()); - - } - } - else if(clp.hasOption("slurl")) - { - LLSLURL start_slurl(clp.getOption("slurl")[0]); + std::string CmdLineLoginLocation(gSavedSettings.getString("CmdLineLoginLocation")); + if(! CmdLineLoginLocation.empty()) + { + LLSLURL start_slurl(CmdLineLoginLocation); LLStartUp::setStartSLURL(start_slurl); - } + if(start_slurl.getType() == LLSLURL::LOCATION) + { + LLGridManager::getInstance()->setGridChoice(start_slurl.getGrid()); + } + } const LLControlVariable* skinfolder = gSavedSettings.getControl("SkinCurrent"); if(skinfolder && LLStringUtil::null != skinfolder->getValue().asString()) @@ -2753,9 +2749,8 @@ bool LLAppViewer::initConfiguration() LL_DEBUGS("AppInit")<<"set start from NextLoginLocation: "<