From 2ccb8f71183b0a50bbabc9252656a39cc3c0ba8e Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sat, 14 Jul 2007 22:35:47 +0000 Subject: * Excelsior! --- OpenSim/Framework/Data.MySQL/MySQLManager.cs | 2 +- OpenSim/Grid/GridServer/GridManager.cs | 6 ++++++ OpenSim/Grid/UserServer/UserManager.cs | 6 ++++++ OpenSim/Region/Application/OpenSimMain.cs | 7 +++++++ OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | 2 ++ 5 files changed, 22 insertions(+), 1 deletion(-) diff --git a/OpenSim/Framework/Data.MySQL/MySQLManager.cs b/OpenSim/Framework/Data.MySQL/MySQLManager.cs index 7ad10fb..ab7f277 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLManager.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLManager.cs @@ -545,7 +545,7 @@ namespace OpenSim.Framework.Data.MySQL { string sql = "REPLACE INTO regions (regionHandle, regionName, uuid, regionRecvKey, regionSecret, regionSendKey, regionDataURI, "; sql += "serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, "; - sql += "regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture, ?serverHttpPort, ?serverRemotingPort) VALUES "; + sql += "regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture, serverHttpPort, serverRemotingPort) VALUES "; sql += "(?regionHandle, ?regionName, ?uuid, ?regionRecvKey, ?regionSecret, ?regionSendKey, ?regionDataURI, "; sql += "?serverIP, ?serverPort, ?serverURI, ?locX, ?locY, ?locZ, ?eastOverrideHandle, ?westOverrideHandle, ?southOverrideHandle, ?northOverrideHandle, ?regionAssetURI, ?regionAssetRecvKey, "; diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs index d2cb6c2..64b51b4 100644 --- a/OpenSim/Grid/GridServer/GridManager.cs +++ b/OpenSim/Grid/GridServer/GridManager.cs @@ -659,12 +659,18 @@ namespace OpenSim.Grid.GridServer TheSim.serverURI = "http://" + TheSim.serverIP + ":" + TheSim.serverPort + "/"; bool requirePublic = false; + bool requireValid = true; if (requirePublic && (TheSim.serverIP.StartsWith("172.16") || TheSim.serverIP.StartsWith("192.168") || TheSim.serverIP.StartsWith("10.") || TheSim.serverIP.StartsWith("0.") || TheSim.serverIP.StartsWith("255."))) { return "ERROR! Servers must register with public addresses."; } + if (requireValid && (TheSim.serverIP.StartsWith("0."))) + { + return "ERROR! 0.*.*.* Addresses are invalid, please check your server config and try again"; + } + try { diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index 6fae0a8..ca0cdc3 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs @@ -30,6 +30,7 @@ using System.Collections; using Nwc.XmlRpc; using OpenSim.Framework.Data; using OpenSim.Framework.UserManagement; +using OpenSim.Framework.Utilities; namespace OpenSim.Grid.UserServer { @@ -63,6 +64,10 @@ namespace OpenSim.Grid.UserServer response.RegionX = SimInfo.regionLocX; response.RegionY = SimInfo.regionLocX; + //Not sure if the + "/CAPS/" should in fact be +"CAPS/" depending if there is already a / as part of httpServerURI + string capsPath = Util.GetRandomCapsPath(); + response.SeedCapability = SimInfo.httpServerURI + "CAPS/" + capsPath + "0000/"; + // Notify the target of an incoming user Console.WriteLine("Notifying " + SimInfo.regionName + " (" + SimInfo.serverURI+ ")"); @@ -78,6 +83,7 @@ namespace OpenSim.Grid.UserServer SimParams["startpos_y"] = theUser.currentAgent.currentPos.Y.ToString(); SimParams["startpos_z"] = theUser.currentAgent.currentPos.Z.ToString(); SimParams["regionhandle"] = theUser.currentAgent.currentHandle.ToString(); + SimParams["caps_path"] = capsPath; ArrayList SendParams = new ArrayList(); SendParams.Add(SimParams); diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 4384906..acf09eb 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -229,9 +229,16 @@ namespace OpenSim UserProfileData masterAvatar = commsManager.UserServer.SetupMasterUser(LocalWorld.RegionInfo.MasterAvatarFirstName, LocalWorld.RegionInfo.MasterAvatarLastName, LocalWorld.RegionInfo.MasterAvatarSandboxPassword); if (masterAvatar != null) { + m_log.Notice("Parcels - Found master avatar [" + masterAvatar.UUID.ToStringHyphenated() + "]"); LocalWorld.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID; LocalWorld.localStorage.LoadParcels((ILocalStorageParcelReceiver)LocalWorld.ParcelManager); } + else + { + m_log.Notice("Parcels - No master avatar found, using null."); + LocalWorld.RegionInfo.MasterAvatarAssignedUUID = libsecondlife.LLUUID.Zero; + LocalWorld.localStorage.LoadParcels((ILocalStorageParcelReceiver)LocalWorld.ParcelManager); + } LocalWorld.StartTimer(); } diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index d32976f..2a73538 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs @@ -265,6 +265,8 @@ namespace OpenSim.Region.Communications.OGS1 agentData.lastname = (string)requestData["lastname"]; agentData.AgentID = new LLUUID((string)requestData["agent_id"]); agentData.circuitcode = Convert.ToUInt32(requestData["circuit_code"]); + agentData.CapsPath = (string)requestData["caps_path"]; + if (requestData.ContainsKey("child_agent") && requestData["child_agent"].Equals("1")) { agentData.child = true; -- cgit v1.1