From 770d8b0d01d3dabeccded0df3a06058f6196d829 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 2 Jul 2012 11:14:13 -0400 Subject: improve logging of invalid grid definitions, prevent clashes with old viewers --- indra/newview/llviewernetwork.cpp | 30 +++++++++++----------------- indra/newview/llviewernetwork.h | 5 +++-- indra/newview/tests/lllogininstance_test.cpp | 3 ++- indra/newview/tests/llslurl_test.cpp | 4 ++-- indra/newview/tests/llviewernetwork_test.cpp | 8 ++++---- 5 files changed, 23 insertions(+), 27 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp index 0382d837fa..97f4c3e5fe 100644 --- a/indra/newview/llviewernetwork.cpp +++ b/indra/newview/llviewernetwork.cpp @@ -36,7 +36,7 @@ /// key used to store the grid, and the name attribute in the grid data -const std::string GRID_VALUE = "name"; +const std::string GRID_VALUE = "keyname"; /// the value displayed in the grid selector menu, and other human-oriented text const std::string GRID_LABEL_VALUE = "label"; /// the value used on the --grid command line argument @@ -154,15 +154,13 @@ void LLGridManager::initialize(const std::string& grid_file) { LL_WARNS("GridManager") << "Cannot override existing grid '" << key_name << "'; ignoring definition from '"< private: - /// Add a grid to the list of grids - void addGrid(LLSD& grid_info); + /// Add a grid to the list of grids + bool addGrid(LLSD& grid_info); + ///< @returns true if successfully added /// find the LLSD definition for a given grid void getGridInfo(const std::string& grid, LLSD &grid_info); diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index c9f49d9343..b7e81c4199 100644 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -114,8 +114,9 @@ LLGridManager::~LLGridManager() { } -void LLGridManager::addGrid(LLSD& grid_data) +bool LLGridManager::addGrid(LLSD& grid_data) { + return true; } LLGridManager::LLGridManager() : diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp index f995d8f0f5..09343ef227 100644 --- a/indra/newview/tests/llslurl_test.cpp +++ b/indra/newview/tests/llslurl_test.cpp @@ -93,7 +93,7 @@ const char *gSampleGridFile = " " " foobar/loginuri" " " - " namefoo.bar.com" + " keynamefoo.bar.com" " credential_typeagent" " grid_login_idFooBar" " " @@ -106,7 +106,7 @@ const char *gSampleGridFile = " " " mygrid/loginuri" " " - " namemy.grid.com" + " keynamemy.grid.com" " credential_typeagent" " grid_login_idMyGrid" " " diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp index 43d3b6522e..a1e97ea17e 100644 --- a/indra/newview/tests/llviewernetwork_test.cpp +++ b/indra/newview/tests/llviewernetwork_test.cpp @@ -95,13 +95,13 @@ const char *gSampleGridFile = " altgrid/myloginuri1" " altgrid/myloginuri2" " " - " namealtgrid.long.name" + " keynamealtgrid.long.name" " credential_typeagent" " grid_login_idAltGrid" " " " minimal.long.name" " " - " nameminimal.long.name" + " keynameminimal.long.name" " " " " @@ -115,7 +115,7 @@ const char *gSampleGridFile = " " " myloginuri" " " - " nameutil.agni.lindenlab.com " + " keynameutil.agni.lindenlab.com " " " " util.foobar.lindenlab.com" " " @@ -127,7 +127,7 @@ const char *gSampleGridFile = " " " myloginuri" " " - " nameutil.foobar.lindenlab.com" + " keynameutil.foobar.lindenlab.com" " " " " "" -- cgit v1.2.3