From 6a1d9e8da13ed09fa8334db8763854c908742587 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Sat, 2 Feb 2008 16:43:57 +0000 Subject: Thank you very much daTwitch for your first contribution to the C# simulator. This is the beginnings of support for storage of region owner in the MySQLManager table and the use of "owner_uuid". --- OpenSim/Framework/Data.MySQL/MySQLManager.cs | 41 +++++++++++++++++++--- OpenSim/Grid/GridServer/GridManager.cs | 13 +++++++ .../Region/Communications/OGS1/OGS1GridServices.cs | 17 ++++++++- 3 files changed, 65 insertions(+), 6 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Data.MySQL/MySQLManager.cs b/OpenSim/Framework/Data.MySQL/MySQLManager.cs index 15ccf5f..eb94cbd 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLManager.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLManager.cs @@ -331,6 +331,20 @@ namespace OpenSim.Framework.Data.MySQL { retval.regionMapTextureID = LLUUID.Zero; } + + // Added by daTwitch + // part of an initial brutish effort to provide accurate information (as per the xml region spec) + // wrt the ownership of a given region + // the (very bad) assumption is that this value is being read and handled inconsistently or + // not at all. Current strategy is to put the code in place to support the validity of this information + // and to roll forward debugging any issues from that point + // + // this particular section of the mod attempts to supply a value from the region table to the caller of 'readSimRow()' + // for the UUID of the region's owner (master avatar) + // + retval.owner_uuid = (string) reader["owner_uuid"]; + // + // end of daTwitch's mods to this file } else { @@ -625,18 +639,32 @@ namespace OpenSim.Framework.Data.MySQL sql += "regions (regionHandle, regionName, uuid, regionRecvKey, regionSecret, regionSendKey, regionDataURI, "; sql += "serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, "; + + // Added by daTwitch + // part of an initial brutish effort to provide accurate information (as per the xml region spec) + // wrt the ownership of a given region + // the (very bad) assumption is that this value is being read and handled inconsistently or + // not at all. Current strategy is to put the code in place to support the validity of this information + // and to roll forward debugging any issues from that point + // + // this particular section of the mod attempts to implement the commit of a supplied value + // server for the UUID of the region's owner (master avatar). It consists of the addition of the column and value to the relevant sql, + // as well as the related parameterization sql += - "regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture, serverHttpPort, serverRemotingPort) VALUES "; + "regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture, serverHttpPort, serverRemotingPort, owner_uuid) VALUES "; + // daTwitch + sql += "(?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)"; - + "?regionAssetSendKey, ?regionUserURI, ?regionUserRecvKey, ?regionUserSendKey, ?regionMapTexture, ?serverHttpPort, ?serverRemotingPort, ?owner_uuid)"; + // daTwitch if (GRID_ONLY_UPDATE_NECESSARY_DATA) { - sql += "ON DUPLICATE KEY UPDATE serverIP = ?serverIP, serverPort = ?serverPort, serverURI = ?serverURI;"; + sql += "ON DUPLICATE KEY UPDATE serverIP = ?serverIP, serverPort = ?serverPort, serverURI = ?serverURI, owner_uuid - ?owner_uuid;"; + // daTwitch } else { @@ -671,6 +699,9 @@ namespace OpenSim.Framework.Data.MySQL parameters["?regionMapTexture"] = regiondata.regionMapTextureID.ToString(); parameters["?serverHttpPort"] = regiondata.httpPort.ToString(); parameters["?serverRemotingPort"] = regiondata.remotingPort.ToString(); + parameters["?owner_uuid"] = regiondata.owner_uuid.ToString(); + // daTwitch + bool returnval = false; try @@ -694,4 +725,4 @@ namespace OpenSim.Framework.Data.MySQL return returnval; } } -} \ No newline at end of file +} diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs index b4b91bb..541e06e 100644 --- a/OpenSim/Grid/GridServer/GridManager.cs +++ b/OpenSim/Grid/GridServer/GridManager.cs @@ -282,6 +282,19 @@ namespace OpenSim.Grid.GridServer TheSim.regionLocZ = 0; TheSim.regionMapTextureID = new LLUUID((string)requestData["map-image-id"]); + // Added by daTwitch + // part of an initial brutish effort to provide accurate information (as per the xml region spec) + // wrt the ownership of a given region + // the (very bad) assumption is that this value is being read and handled inconsistently or + // not at all. Current strategy is to put the code in place to support the validity of this information + // and to roll forward debugging any issues from that point + // + // this particular section of the mod attempts to receive a value from the region's xml file by way of + // OSG1GridServices for the region's owner + // + TheSim.owner_uuid = (string)requestData["master_avatar_uuid"]; + // end of daTwitch's mods to this file + try { TheSim.regionRecvKey = (string)requestData["recvkey"]; diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index 8429d00..1576bf3 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs @@ -110,6 +110,21 @@ namespace OpenSim.Region.Communications.OGS1 GridParams["remoting_port"] = NetworkServersInfo.RemotingListenerPort.ToString(); GridParams["map-image-id"] = regionInfo.EstateSettings.terrainImageID.ToString(); + + // Added by daTwitch + // part of an initial brutish effort to provide accurate information (as per the xml region spec) + // wrt the ownership of a given region + // the (very bad) assumption is that this value is being read and handled inconsistently or + // not at all. Current strategy is to put the code in place to support the validity of this information + // and to roll forward debugging any issues from that point + // + // this particular section of the mod attempts to supply a value from the region's xml file to the grid + // server for the UUID of the region's owner (master avatar) + // + GridParams["master_avatar_uuid"] = regionInfo.MasterAvatarAssignedUUID.ToString(); + // end of daTwitch's addition to this file + + // Package into an XMLRPC Request ArrayList SendParams = new ArrayList(); SendParams.Add(GridParams); @@ -1297,4 +1312,4 @@ namespace OpenSim.Region.Communications.OGS1 } } -} \ No newline at end of file +} -- cgit v1.1