From 8d8f42bc4438c90365eb37055486dc1a081f7377 Mon Sep 17 00:00:00 2001 From: Cinders <cinder@cinderblocks.biz> Date: Wed, 12 Aug 2015 12:36:03 -0600 Subject: [PATCH] Add grid uas if grid info has it sends it --- indra/newview/llviewernetwork.cpp | 20 ++++++++++++++++++++ indra/newview/llviewernetwork.h | 3 +++ 2 files changed, 23 insertions(+) diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp index ea6d2282a8..9e4abe3795 100755 --- a/indra/newview/llviewernetwork.cpp +++ b/indra/newview/llviewernetwork.cpp @@ -66,6 +66,8 @@ const std::string GRID_FORGOT_PASSWORD_URL = "password"; const std::string GRID_PLATFORM = "platform"; /// a grid's gatekeeper address const std::string GRID_GATEKEEPER = "gatekeeper"; +/// a grid's uas service address +const std::string GRID_UAS = "uas"; // defines slurl formats associated with various grids. // we need to continue to support existing forms, as slurls @@ -533,6 +535,11 @@ void LLGridManager::gridInfoResponderCallback(LLSD& grid, LLXMLNodePtr root_node grid[GRID_GATEKEEPER] = gatekeeper.authority(); LL_DEBUGS("GridManager") << "[\"gatekeeper\"]: " << grid[GRID_GATEKEEPER] << LL_ENDL; } + else if (node->hasName("uas")) + { + grid[GRID_UAS] = node->getTextContents(); + LL_DEBUGS("GridManager") << "[\"uas\"]: " << grid[GRID_UAS] << LL_ENDL; + } else if (node->hasName("platform")) { grid[GRID_PLATFORM] = node->getTextContents(); @@ -757,6 +764,19 @@ std::string LLGridManager::getGatekeeper(const std::string& grid) const return url; } +std::string LLGridManager::getUserAccountServiceURL(const std::string& grid) const +{ + std::string url = LLStringUtil::null; + std::string grid_name = getGrid(grid); + if (!grid_name.empty()) + { + url = mGridList[grid_name].has(GRID_UAS) + ? mGridList[grid_name][GRID_UAS].asString() + : LLStringUtil::null; + } + return url; +} + std::string LLGridManager::getHelperURI(const std::string& grid) const { std::string helper_uri; diff --git a/indra/newview/llviewernetwork.h b/indra/newview/llviewernetwork.h index 0a71a5b912..5626a1d8f5 100755 --- a/indra/newview/llviewernetwork.h +++ b/indra/newview/llviewernetwork.h @@ -131,6 +131,9 @@ class LLGridManager : public LLSingleton<LLGridManager> /// Get the hypergrid gatekeeper uri for the specified grid std::string getGatekeeper(const std::string& grid) const; + /// Get the uas service for the specified grid if available + std::string getUserAccountServiceURL(const std::string& grid) const; + /// Get the URI for webdev help functions for the specified grid std::string getHelperURI(const std::string& grid) const; -- GitLab