Fix unnecessary duplicate AddGrid requests and AddGrid errors in OpenSim

This commit is contained in:
Hecklezz
2026-06-14 21:05:43 +10:00
parent 76e5fa786f
commit e0c5069492
5 changed files with 28 additions and 21 deletions
+24 -17
View File
@@ -74,15 +74,18 @@ void gridDownloadError(const LLSD& aData, LLGridManager* mOwner, GridEntry* mDat
}
else if (LLGridManager::TRYLEGACY == mState) // we did TRYLEGACY and faild
{
LLSD args;
args["GRID"] = mData->grid[GRID_VALUE];
// Could not add [GRID] to the grid list.
std::string reason_dialog = "Server didn't provide grid info: ";
reason_dialog.append(mData->last_http_error);
reason_dialog.append("\nPlease check if the loginuri is correct and");
args["REASON"] = reason_dialog;
//[REASON] contact support of [GRID].
LLNotificationsUtil::add("CantAddGrid", args);
if (!mData->grid.has("FLAG_TEMPORARY"))
{
LLSD args;
args["GRID"] = mData->grid[GRID_VALUE];
// Could not add [GRID] to the grid list.
std::string reason_dialog = "Server didn't provide grid info: ";
reason_dialog.append(mData->last_http_error);
reason_dialog.append("\nPlease check if the loginuri is correct and");
args["REASON"] = reason_dialog;
//[REASON] contact support of [GRID].
LLNotificationsUtil::add("CantAddGrid", args);
}
LL_WARNS() << "No legacy login page. Giving up for " << mData->grid[GRID_VALUE] << LL_ENDL;
mOwner->addGrid(mData, LLGridManager::FAIL);
@@ -1327,15 +1330,19 @@ std::string LLGridManager::getSLURLBase(const std::string& grid)
//<AW opensim>
else
{
LL_DEBUGS("GridManager") << "Trying to fetch info for:" << grid << LL_ENDL;
GridEntry* grid_entry = new GridEntry;
grid_entry->set_current = false;
grid_entry->grid = LLSD::emptyMap();
grid_entry->grid[GRID_VALUE] = grid;
if (!mFetchedGridInfo.contains(grid))
{
LL_DEBUGS("GridManager") << "Trying to fetch info for:" << grid << LL_ENDL;
GridEntry* grid_entry = new GridEntry;
grid_entry->set_current = false;
grid_entry->grid = LLSD::emptyMap();
grid_entry->grid[GRID_VALUE] = grid;
mFetchedGridInfo.insert(grid);
// add the grid with the additional values, or update the
// existing grid if it exists with the given values
addGrid(grid_entry, FETCHTEMP);
// add the grid with the additional values, or update the
// existing grid if it exists with the given values
addGrid(grid_entry, FETCHTEMP);
}
// deal with hand edited entries
std::string grid_norm = grid;
+2
View File
@@ -258,6 +258,8 @@ private:
S32 mClassifiedFee;
S32 mDirectoryFee;
std::unordered_set<std::string> mFetchedGridInfo;
protected:
void updateIsInProductionGrid();
-2
View File
@@ -650,8 +650,6 @@ void LLNavigationBar::onLocationSelection()
std::string current_grid = LFSimFeatureHandler::instance().hyperGridURL();
std::string gatekeeper = LLGridManager::getInstance()->getGatekeeper(grid);
LL_INFOS("Hecklezz") << "grid: " << grid << ", current_grid: " << current_grid << ", gatekeeper: " << gatekeeper << LL_ENDL;
// Requesting region information from the server is only required when changing grid
if (slurl.isValid() && grid != current_grid)
{
+1 -1
View File
@@ -344,7 +344,7 @@ void LLTeleportHistory::dump() const
line << i << ": " << mItems[i].mTitle;
line << " REGION_ID: " << mItems[i].mRegionID;
line << ", pos: " << mItems[i].mGlobalPos;
line << ", slurl: " << mItems[i].mSLURL.asString(); // <FS:TJ/> Fix Teleport and Location History for OpenSim
line << ", slurl: " << mItems[i].mSLURL.getSLURLString(); // <FS:TJ/> Fix Teleport and Location History for OpenSim
LL_INFOS() << line.str() << LL_ENDL;
}
}
+1 -1
View File
@@ -287,7 +287,7 @@ void LLTeleportHistoryStorage::dump() const
line << i << ": " << mItems[i].mTitle;
line << " global pos: " << mItems[i].mGlobalPos;
line << " date: " << mItems[i].mDate;
line << " slurl: " << mItems[i].mSLURL.asString(); // <FS:TJ/> Fix Teleport and Location History for OpenSim
line << " slurl: " << mItems[i].mSLURL.getSLURLString(); // <FS:TJ/> Fix Teleport and Location History for OpenSim
LL_INFOS() << line.str() << LL_ENDL;
}