From 694c8ab588b1d9a94c1cdba5e05ef4e0492f0354 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 11 Jun 2010 22:08:43 +0100 Subject: Remove the lastmap stuff from the map module, also remove a bunch of comments that no longer reflect actual conditions --- .../CoreModules/World/WorldMap/WorldMapModule.cs | 28 +--------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index c6fb18d..0e849e5 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs @@ -1002,41 +1002,15 @@ namespace OpenSim.Region.CoreModules.World.WorldMap public void RegenerateMaptile(byte[] data) { - // Overwrites the local Asset cache with new maptile data - // Assets are single write, this causes the asset server to ignore this update, - // but the local asset cache does not - - // this is on purpose! The net result of this is the region always has the most up to date - // map tile while protecting the (grid) asset database from bloat caused by a new asset each - // time a mapimage is generated! - UUID lastMapRegionUUID = m_scene.RegionInfo.RegionSettings.TerrainImageID; - int lastMapRefresh = 0; - int twoDays = 172800; -// int RefreshSeconds = twoDays; - - try - { - lastMapRefresh = Convert.ToInt32(m_scene.RegionInfo.lastMapRefresh); - } - catch (ArgumentException) - { - } - catch (FormatException) - { - } - catch (OverflowException) - { - } - m_log.Debug("[MAPTILE]: STORING MAPTILE IMAGE"); m_scene.RegionInfo.RegionSettings.TerrainImageID = UUID.Random(); AssetBase asset = new AssetBase( m_scene.RegionInfo.RegionSettings.TerrainImageID, - "terrainImage_" + m_scene.RegionInfo.RegionID.ToString() + "_" + lastMapRefresh.ToString(), + "terrainImage_" + m_scene.RegionInfo.RegionID.ToString(), (sbyte)AssetType.Texture, m_scene.RegionInfo.RegionID.ToString()); asset.Data = data; -- cgit v1.1 From 0dce4f1997c57cbdf6bc1f322182c318d3838e40 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 11 Jun 2010 22:11:33 +0100 Subject: Revert "Allow IInventoryService.GetFolder(folderId, userId) as well as GetFolder(InventoryFolderBase folder)" This reverts commit 3525195bc9b5fdfd9799411edd452981ef1f4ebd. --- .../Inventory/Archiver/Tests/InventoryArchiverTests.cs | 4 ++-- .../Framework/Library/LocalInventoryService.cs | 6 ++---- .../Inventory/BaseInventoryConnector.cs | 2 -- .../ServiceConnectorsOut/Inventory/HGInventoryBroker.cs | 15 +++++---------- .../Inventory/LocalInventoryServiceConnector.cs | 5 ----- .../Inventory/RemoteInventoryServiceConnector.cs | 5 ----- .../Inventory/RemoteXInventoryServiceConnector.cs | 17 ++++++----------- .../Inventory/QuickAndDirtyInventoryServiceConnector.cs | 5 ----- .../Connectors/Inventory/XInventoryConnector.cs | 5 ----- .../SimianGrid/SimianInventoryServiceConnector.cs | 7 +------ OpenSim/Services/Interfaces/IInventoryService.cs | 8 -------- OpenSim/Services/InventoryService/InventoryService.cs | 17 ++++++----------- OpenSim/Services/InventoryService/XInventoryService.cs | 5 ----- OpenSim/Tests/Common/Mock/MockInventoryService.cs | 5 ----- 14 files changed, 22 insertions(+), 84 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index d003d2d..00bd27a 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs @@ -575,9 +575,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests itemArchivePath, scene.InventoryService.GetRootFolder(ua1.PrincipalID), new Dictionary(), new List()); - InventoryFolderBase folder1Post = scene.InventoryService.GetFolder(folder1.ID, ua1.PrincipalID); + InventoryFolderBase folder1Post + = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, ua1.PrincipalID, folder1ExistingName); Assert.That(folder1Post.ID, Is.EqualTo(folder1.ID)); - /* InventoryFolderBase folder2 = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1Post, "b"); diff --git a/OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs b/OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs index 112ccd8..49589fd 100644 --- a/OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs +++ b/OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs @@ -1,4 +1,4 @@ -/* +/* * Copyright (c) Contributors, http://opensimulator.org/ * See CONTRIBUTORS.TXT for a full list of copyright holders. * @@ -229,14 +229,12 @@ namespace OpenSim.Region.CoreModules.Framework.Library /// public InventoryItemBase GetItem(InventoryItemBase item) { return null; } - public InventoryFolderBase GetFolder(UUID folderId, UUID userId) { return null; } - /// /// Get a folder, given by its UUID /// /// /// - public InventoryFolderBase GetFolder(InventoryFolderBase folder) { return null; } + public InventoryFolderBase GetFolder(InventoryFolderBase folder) { return null; } /// /// Does the given user have an inventory structure? diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/BaseInventoryConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/BaseInventoryConnector.cs index 5b13d58..1e51187 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/BaseInventoryConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/BaseInventoryConnector.cs @@ -205,8 +205,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory public abstract InventoryItemBase GetItem(InventoryItemBase item); - public abstract InventoryFolderBase GetFolder(UUID folderId, UUID userId); - public abstract InventoryFolderBase GetFolder(InventoryFolderBase folder); /// diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs index fc30347..e09db15 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs @@ -1,4 +1,4 @@ -/* +/* * Copyright (c) Contributors, http://opensimulator.org/ * See CONTRIBUTORS.TXT for a full list of copyright holders. * @@ -470,7 +470,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory return connector.DeleteItems(ownerID, itemIDs); } - public InventoryItemBase GetItem(InventoryItemBase item) + public InventoryItemBase GetItem(InventoryItemBase item) { if (item == null) return null; @@ -486,12 +486,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory return connector.GetItem(item); } - public InventoryFolderBase GetFolder(UUID folderId, UUID userId) - { - return GetFolder(new InventoryFolderBase(folderId, userId)); - } - - public InventoryFolderBase GetFolder(InventoryFolderBase folder) + public InventoryFolderBase GetFolder(InventoryFolderBase folder) { if (folder == null) return null; @@ -508,12 +503,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory return connector.GetFolder(folder); } - public bool HasInventoryForUser(UUID userID) + public bool HasInventoryForUser(UUID userID) { return false; } - public List GetActiveGestures(UUID userId) + public List GetActiveGestures(UUID userId) { return new List(); } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs index 76be791..22bd04c 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs @@ -267,11 +267,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory return item; } - public InventoryFolderBase GetFolder(UUID folderId, UUID userId) - { - return GetFolder(new InventoryFolderBase(folderId, userId)); - } - public InventoryFolderBase GetFolder(InventoryFolderBase folder) { return m_InventoryService.GetFolder(folder); diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs index 6d43280..aa3b30d 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs @@ -307,11 +307,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory return m_RemoteConnector.QueryItem(item.Owner.ToString(), item, sessionID); } - public override InventoryFolderBase GetFolder(UUID folderId, UUID userId) - { - return GetFolder(new InventoryFolderBase(folderId, userId)); - } - public override InventoryFolderBase GetFolder(InventoryFolderBase folder) { if (folder == null) diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs index b1e21a1..277060d 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs @@ -250,7 +250,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory } - public bool DeleteItems(UUID ownerID, List itemIDs) + public bool DeleteItems(UUID ownerID, List itemIDs) { if (itemIDs == null) return false; @@ -260,7 +260,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory return m_RemoteConnector.DeleteItems(ownerID, itemIDs); } - public InventoryItemBase GetItem(InventoryItemBase item) + public InventoryItemBase GetItem(InventoryItemBase item) { m_log.DebugFormat("[XINVENTORY CONNECTOR]: GetItem {0}", item.ID); if (item == null) @@ -271,12 +271,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory return m_RemoteConnector.GetItem(item); } - public InventoryFolderBase GetFolder(UUID folderId, UUID userId) - { - return GetFolder(new InventoryFolderBase(folderId, userId)); - } - - public InventoryFolderBase GetFolder(InventoryFolderBase folder) + public InventoryFolderBase GetFolder(InventoryFolderBase folder) { m_log.DebugFormat("[XINVENTORY CONNECTOR]: GetFolder {0}", folder.ID); if (folder == null) @@ -285,17 +280,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory return m_RemoteConnector.GetFolder(folder); } - public bool HasInventoryForUser(UUID userID) + public bool HasInventoryForUser(UUID userID) { return false; } - public List GetActiveGestures(UUID userId) + public List GetActiveGestures(UUID userId) { return new List(); } - public int GetAssetPermissions(UUID userID, UUID assetID) + public int GetAssetPermissions(UUID userID, UUID assetID) { return m_RemoteConnector.GetAssetPermissions(userID, assetID); } diff --git a/OpenSim/Services/Connectors/Inventory/QuickAndDirtyInventoryServiceConnector.cs b/OpenSim/Services/Connectors/Inventory/QuickAndDirtyInventoryServiceConnector.cs index 5a23687..a7aa138 100644 --- a/OpenSim/Services/Connectors/Inventory/QuickAndDirtyInventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/QuickAndDirtyInventoryServiceConnector.cs @@ -171,11 +171,6 @@ namespace OpenSim.Services.Connectors { return null; } - - public InventoryFolderBase GetFolder(UUID folderId, UUID userId) - { - return null; - } public InventoryFolderBase GetFolder(InventoryFolderBase folder) { diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs index e7acb59..e25e7eb 100644 --- a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs @@ -431,11 +431,6 @@ namespace OpenSim.Services.Connectors return null; } - public InventoryFolderBase GetFolder(UUID folderId, UUID userId) - { - return GetFolder(new InventoryFolderBase(folderId, userId)); - } - public InventoryFolderBase GetFolder(InventoryFolderBase folder) { try diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs index 6bf43d5..dc68259 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs @@ -1,4 +1,4 @@ -/* +/* * Copyright (c) Contributors, http://opensimulator.org/ * See CONTRIBUTORS.TXT for a full list of copyright holders. * @@ -314,11 +314,6 @@ namespace OpenSim.Services.Connectors.SimianGrid m_log.Warn("[SIMIAN INVENTORY CONNECTOR]: Item " + item.ID + " owned by " + item.Owner + " not found"); return null; } - - public InventoryFolderBase GetFolder(UUID folderId, UUID userId) - { - return GetFolder(new InventoryFolderBase(folderId, userId)); - } /// /// Get a folder, given by its UUID diff --git a/OpenSim/Services/Interfaces/IInventoryService.cs b/OpenSim/Services/Interfaces/IInventoryService.cs index b0ffd8f..1b78fb3 100644 --- a/OpenSim/Services/Interfaces/IInventoryService.cs +++ b/OpenSim/Services/Interfaces/IInventoryService.cs @@ -170,14 +170,6 @@ namespace OpenSim.Services.Interfaces InventoryItemBase GetItem(InventoryItemBase item); /// - /// Get a folder. - /// - /// - /// - /// - InventoryFolderBase GetFolder(UUID folderId, UUID userId); - - /// /// Get a folder, given by its UUID /// /// diff --git a/OpenSim/Services/InventoryService/InventoryService.cs b/OpenSim/Services/InventoryService/InventoryService.cs index 9f1c4a4..fbcd663 100644 --- a/OpenSim/Services/InventoryService/InventoryService.cs +++ b/OpenSim/Services/InventoryService/InventoryService.cs @@ -439,20 +439,15 @@ namespace OpenSim.Services.InventoryService m_log.DebugFormat("[INVENTORY SERVICE]: GetItem failed to find item {0}", item.ID); return null; } - - public virtual InventoryFolderBase GetFolder(UUID folderId, UUID userId) - { - InventoryFolderBase result = m_Database.getInventoryFolder(folderId); - if (result != null) - return result; - - m_log.DebugFormat("[INVENTORY SERVICE]: GetFolder failed to find folder {0}", folderId); - return null; - } public virtual InventoryFolderBase GetFolder(InventoryFolderBase folder) { - return GetFolder(folder.ID, folder.Owner); + InventoryFolderBase result = m_Database.getInventoryFolder(folder.ID); + if (result != null) + return result; + + m_log.DebugFormat("[INVENTORY SERVICE]: GetFolder failed to find folder {0}", folder.ID); + return null; } public virtual bool DeleteFolders(UUID ownerID, List folderIDs) diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs index 00aadc5..af831fd 100644 --- a/OpenSim/Services/InventoryService/XInventoryService.cs +++ b/OpenSim/Services/InventoryService/XInventoryService.cs @@ -368,11 +368,6 @@ namespace OpenSim.Services.InventoryService return ConvertToOpenSim(items[0]); } - - public virtual InventoryFolderBase GetFolder(UUID folderId, UUID userId) - { - return GetFolder(new InventoryFolderBase(folderId, userId)); - } public virtual InventoryFolderBase GetFolder(InventoryFolderBase folder) { diff --git a/OpenSim/Tests/Common/Mock/MockInventoryService.cs b/OpenSim/Tests/Common/Mock/MockInventoryService.cs index fc27487..1ea4bc1 100644 --- a/OpenSim/Tests/Common/Mock/MockInventoryService.cs +++ b/OpenSim/Tests/Common/Mock/MockInventoryService.cs @@ -162,11 +162,6 @@ namespace OpenSim.Tests.Common.Mock { return null; } - - public InventoryFolderBase GetFolder(UUID folderId, UUID userId) - { - return null; - } public InventoryFolderBase GetFolder(InventoryFolderBase folder) { -- cgit v1.1