From f59f4e476dbbf9dca32419ecf69ab17cc99cb2f6 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sat, 12 Jan 2008 19:28:50 +0000 Subject: [PATCH] * Made it so that if you don't specify a key, the defaults will not be assumed. * If you wish to turn off key authentication, set the values to "" (null) in the grid config, and do the same in clients. --- OpenSim/Grid/GridServer/GridManager.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs index 6af0767be3..1e21d9ec1c 100644 --- a/OpenSim/Grid/GridServer/GridManager.cs +++ b/OpenSim/Grid/GridServer/GridManager.cs @@ -262,10 +262,10 @@ namespace OpenSim.Grid.GridServer TheSim = new RegionProfileData(); - TheSim.regionRecvKey = config.SimRecvKey; - TheSim.regionSendKey = config.SimSendKey; + TheSim.regionRecvKey = String.Empty; + TheSim.regionSendKey = String.Empty; TheSim.regionSecret = config.SimRecvKey; - TheSim.regionDataURI = ""; + TheSim.regionDataURI = String.Empty; TheSim.regionAssetURI = config.DefaultAssetServer; TheSim.regionAssetRecvKey = config.AssetRecvKey; TheSim.regionAssetSendKey = config.AssetSendKey; @@ -289,7 +289,6 @@ namespace OpenSim.Grid.GridServer } catch (KeyNotFoundException) { } - TheSim.regionHandle = Helpers.UIntsToLong((TheSim.regionLocX * 256), (TheSim.regionLocY * 256)); TheSim.serverURI = "http://" + TheSim.serverIP + ":" + TheSim.serverPort + "/"; @@ -303,7 +302,9 @@ namespace OpenSim.Grid.GridServer OldSim = getRegion(TheSim.regionHandle); if (OldSim == null || OldSim.UUID == TheSim.UUID) { - if (OldSim == null || (OldSim.regionRecvKey == TheSim.regionRecvKey && + if ((OldSim == null && TheSim.regionRecvKey == config.SimSendKey && + TheSim.regionRecvKey == config.SimRecvKey) || + (OldSim.regionRecvKey == TheSim.regionRecvKey && OldSim.regionSendKey == TheSim.regionSendKey)) { MainLog.Instance.Verbose("GRID", "Adding region " + TheSim.regionLocX + " , " + TheSim.regionLocY + " , " +