From 34c77159f7dea117eb69fe013b09f2719b12e612 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 9 Jul 2013 08:39:22 -0700 Subject: CHOP-963: Make update service query url depend on the grid rather than settings --- indra/newview/llviewernetwork.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'indra/newview/llviewernetwork.cpp') diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp index 97f4c3e5fe..371b00b173 100755 --- a/indra/newview/llviewernetwork.cpp +++ b/indra/newview/llviewernetwork.cpp @@ -43,6 +43,8 @@ const std::string GRID_LABEL_VALUE = "label"; const std::string GRID_ID_VALUE = "grid_login_id"; /// the url for the login cgi script const std::string GRID_LOGIN_URI_VALUE = "login_uri"; +/// url base for update queries +const std::string GRID_UPDATE_SERVICE_URL = "update_query_url_base"; /// const std::string GRID_HELPER_URI_VALUE = "helper_uri"; /// the splash page url @@ -63,6 +65,8 @@ const std::string DEFAULT_LOGIN_PAGE = "http://viewer-login.agni.lindenlab.com/" const std::string MAIN_GRID_LOGIN_URI = "https://login.agni.lindenlab.com/cgi-bin/login.cgi"; +const std::string SL_UPDATE_QUERY_URL = "https://update.secondlife.com/update"; + const std::string MAIN_GRID_SLURL_BASE = "http://maps.secondlife.com/secondlife/"; const std::string SYSTEM_GRID_APP_SLURL_BASE = "secondlife:///app"; @@ -120,12 +124,14 @@ void LLGridManager::initialize(const std::string& grid_file) MAIN_GRID_LOGIN_URI, "https://secondlife.com/helpers/", DEFAULT_LOGIN_PAGE, + SL_UPDATE_QUERY_URL, "Agni"); addSystemGrid("Second Life Beta Test Grid (Aditi)", "util.aditi.lindenlab.com", "https://login.aditi.lindenlab.com/cgi-bin/login.cgi", "http://aditi-secondlife.webdev.lindenlab.com/helpers/", DEFAULT_LOGIN_PAGE, + SL_UPDATE_QUERY_URL, "Aditi"); LLSD other_grids; @@ -332,6 +338,7 @@ void LLGridManager::addSystemGrid(const std::string& label, const std::string& login_uri, const std::string& helper, const std::string& login_page, + const std::string& update_url_base, const std::string& login_id) { LLSD grid = LLSD::emptyMap(); @@ -341,6 +348,7 @@ void LLGridManager::addSystemGrid(const std::string& label, grid[GRID_LOGIN_URI_VALUE] = LLSD::emptyArray(); grid[GRID_LOGIN_URI_VALUE].append(login_uri); grid[GRID_LOGIN_PAGE_VALUE] = login_page; + grid[GRID_UPDATE_SERVICE_URL] = update_url_base; grid[GRID_IS_SYSTEM_GRID_VALUE] = true; grid[GRID_LOGIN_IDENTIFIER_TYPES] = LLSD::emptyArray(); grid[GRID_LOGIN_IDENTIFIER_TYPES].append(CRED_IDENTIFIER_TYPE_AGENT); @@ -537,6 +545,16 @@ std::string LLGridManager::getGridLoginID() return mGridList[mGrid][GRID_ID_VALUE]; } +std::string LLGridManager::getUpdateServiceURL() +{ + std::string update_url_base; + if ( mGridList[mGrid].has(GRID_UPDATE_SERVICE_URL) ) + { + update_url_base = mGridList[mGrid][GRID_UPDATE_SERVICE_URL].asString(); + } + return update_url_base; +} + void LLGridManager::updateIsInProductionGrid() { mIsInProductionGrid = false; -- cgit v1.2.3 From d2dd3be08b3d460054366a66481bcf3110005291 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Sat, 13 Jul 2013 15:03:39 -0400 Subject: CHOP-963: Add a new --update-service command line argument for QA use --- indra/newview/llviewernetwork.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewernetwork.cpp') diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp index 371b00b173..e7821d4b9e 100755 --- a/indra/newview/llviewernetwork.cpp +++ b/indra/newview/llviewernetwork.cpp @@ -547,11 +547,25 @@ std::string LLGridManager::getGridLoginID() std::string LLGridManager::getUpdateServiceURL() { - std::string update_url_base; - if ( mGridList[mGrid].has(GRID_UPDATE_SERVICE_URL) ) + std::string update_url_base = gSavedSettings.getString("CmdLineUpdateService");; + if ( !update_url_base.empty() ) + { + LL_INFOS2("UpdaterService","GridManager") + << "Update URL base overridden from command line: " << update_url_base + << LL_ENDL; + } + else if ( mGridList[mGrid].has(GRID_UPDATE_SERVICE_URL) ) { update_url_base = mGridList[mGrid][GRID_UPDATE_SERVICE_URL].asString(); } + else + { + LL_WARNS2("UpdaterService","GridManager") + << "The grid property '" << GRID_UPDATE_SERVICE_URL + << "' is not defined for the grid '" << mGrid << "'" + << LL_ENDL; + } + return update_url_base; } -- cgit v1.2.3