From 43c270b5367a7bdc8f685213488fb4f3437ab89b Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 17 Nov 2010 17:54:32 +0100 Subject: Fix gesture and viewer preview sounds not playing --- .../Region/CoreModules/World/Sound/SoundModule.cs | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/CoreModules/World') diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs index abd28c8..8df44fe 100644 --- a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs +++ b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs @@ -106,14 +106,20 @@ namespace OpenSim.Region.CoreModules.World.Sound { SceneObjectPart part = m_scene.GetSceneObjectPart(objectID); if (part == null) - return; - - SceneObjectGroup grp = part.ParentGroup; - - if (grp.IsAttachment && grp.GetAttachmentPoint() > 30) { - objectID = ownerID; - parentID = ownerID; + ScenePresence sp; + if (!m_scene.TryGetScenePresence(objectID, out sp)) + return; + } + else + { + SceneObjectGroup grp = part.ParentGroup; + + if (grp.IsAttachment && grp.GetAttachmentPoint() > 30) + { + objectID = ownerID; + parentID = ownerID; + } } m_scene.ForEachScenePresence(delegate(ScenePresence sp) -- cgit v1.1 From 2c7be7130ea3ebca59b4d6d071267adcae55cb96 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 20 Nov 2010 02:32:12 +0000 Subject: Bump oar version to 1.0 from 0.5 If oar contents are being changed such that older versions of opensim can't load them, then the major version must be increased This also locks version parameters to either 1.0 or 0.4, so that arbitrary 'versions' cannot be saved Also closes save stream properly in the event of an error Version 1.0 OARs are currently incompatible with OpenSim 0.7.0.2 and earlier. However, you can still save compatible version 0.4 OARs by specifing --version=0 on the save oar command line e.g. save oar --version=0 oars/test.oar --- .../Archiver/ArchiveWriteRequestPreparation.cs | 202 ++++++++++++--------- 1 file changed, 119 insertions(+), 83 deletions(-) (limited to 'OpenSim/Region/CoreModules/World') diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs index 0567a82..3eb797b 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs @@ -49,7 +49,17 @@ namespace OpenSim.Region.CoreModules.World.Archiver public class ArchiveWriteRequestPreparation { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - + + /// + /// The minimum major version of OAR that we can write. + /// + public static int MIN_MAJOR_VERSION = 0; + + /// + /// The maximum major version of OAR that we can write. + /// + public static int MAX_MAJOR_VERSION = 1; + protected Scene m_scene; protected Stream m_saveStream; protected Guid m_requestId; @@ -101,110 +111,136 @@ namespace OpenSim.Region.CoreModules.World.Archiver /// if there was an io problem with creating the file public void ArchiveRegion(Dictionary options) { - Dictionary assetUuids = new Dictionary(); - - EntityBase[] entities = m_scene.GetEntities(); - List sceneObjects = new List(); - - /* - foreach (ILandObject lo in m_scene.LandChannel.AllParcels()) + try + { + Dictionary assetUuids = new Dictionary(); + + EntityBase[] entities = m_scene.GetEntities(); + List sceneObjects = new List(); + + /* + foreach (ILandObject lo in m_scene.LandChannel.AllParcels()) + { + if (name == lo.LandData.Name) + { + // This is the parcel we want + } + } + */ + + // Filter entities so that we only have scene objects. + // FIXME: Would be nicer to have this as a proper list in SceneGraph, since lots of methods + // end up having to do this + foreach (EntityBase entity in entities) { - if (name == lo.LandData.Name) + if (entity is SceneObjectGroup) { - // This is the parcel we want + SceneObjectGroup sceneObject = (SceneObjectGroup)entity; + + if (!sceneObject.IsDeleted && !sceneObject.IsAttachment) + sceneObjects.Add((SceneObjectGroup)entity); } } - */ - - // Filter entities so that we only have scene objects. - // FIXME: Would be nicer to have this as a proper list in SceneGraph, since lots of methods - // end up having to do this - foreach (EntityBase entity in entities) - { - if (entity is SceneObjectGroup) + + UuidGatherer assetGatherer = new UuidGatherer(m_scene.AssetService); + + foreach (SceneObjectGroup sceneObject in sceneObjects) { - SceneObjectGroup sceneObject = (SceneObjectGroup)entity; - - if (!sceneObject.IsDeleted && !sceneObject.IsAttachment) - sceneObjects.Add((SceneObjectGroup)entity); + assetGatherer.GatherAssetUuids(sceneObject, assetUuids); } + + m_log.DebugFormat( + "[ARCHIVER]: {0} scene objects to serialize requiring save of {1} assets", + sceneObjects.Count, assetUuids.Count); + + // Make sure that we also request terrain texture assets + RegionSettings regionSettings = m_scene.RegionInfo.RegionSettings; + + if (regionSettings.TerrainTexture1 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_1) + assetUuids[regionSettings.TerrainTexture1] = AssetType.Texture; + + if (regionSettings.TerrainTexture2 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_2) + assetUuids[regionSettings.TerrainTexture2] = AssetType.Texture; + + if (regionSettings.TerrainTexture3 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_3) + assetUuids[regionSettings.TerrainTexture3] = AssetType.Texture; + + if (regionSettings.TerrainTexture4 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_4) + assetUuids[regionSettings.TerrainTexture4] = AssetType.Texture; + + TarArchiveWriter archiveWriter = new TarArchiveWriter(m_saveStream); + + // Asynchronously request all the assets required to perform this archive operation + ArchiveWriteRequestExecution awre + = new ArchiveWriteRequestExecution( + sceneObjects, + m_scene.RequestModuleInterface(), + m_scene.RequestModuleInterface(), + m_scene, + archiveWriter, + m_requestId, + options); + + m_log.InfoFormat("[ARCHIVER]: Creating archive file. This may take some time."); + + // Write out control file. This has to be done first so that subsequent loaders will see this file first + // XXX: I know this is a weak way of doing it since external non-OAR aware tar executables will not do this + archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, CreateControlFile(options)); + m_log.InfoFormat("[ARCHIVER]: Added control file to archive."); + + new AssetsRequest( + new AssetsArchiver(archiveWriter), assetUuids, + m_scene.AssetService, awre.ReceivedAllAssets).Execute(); } - - UuidGatherer assetGatherer = new UuidGatherer(m_scene.AssetService); - - foreach (SceneObjectGroup sceneObject in sceneObjects) + finally { - assetGatherer.GatherAssetUuids(sceneObject, assetUuids); - } - - m_log.DebugFormat( - "[ARCHIVER]: {0} scene objects to serialize requiring save of {1} assets", - sceneObjects.Count, assetUuids.Count); - - // Make sure that we also request terrain texture assets - RegionSettings regionSettings = m_scene.RegionInfo.RegionSettings; - - if (regionSettings.TerrainTexture1 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_1) - assetUuids[regionSettings.TerrainTexture1] = AssetType.Texture; - - if (regionSettings.TerrainTexture2 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_2) - assetUuids[regionSettings.TerrainTexture2] = AssetType.Texture; - - if (regionSettings.TerrainTexture3 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_3) - assetUuids[regionSettings.TerrainTexture3] = AssetType.Texture; - - if (regionSettings.TerrainTexture4 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_4) - assetUuids[regionSettings.TerrainTexture4] = AssetType.Texture; - - TarArchiveWriter archiveWriter = new TarArchiveWriter(m_saveStream); - - // Asynchronously request all the assets required to perform this archive operation - ArchiveWriteRequestExecution awre - = new ArchiveWriteRequestExecution( - sceneObjects, - m_scene.RequestModuleInterface(), - m_scene.RequestModuleInterface(), - m_scene, - archiveWriter, - m_requestId, - options); - - m_log.InfoFormat("[ARCHIVER]: Creating archive file. This may take some time."); - - // Write out control file. This has to be done first so that subsequent loaders will see this file first - // XXX: I know this is a weak way of doing it since external non-OAR aware tar executables will not do this - archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p2ControlFile(options)); - m_log.InfoFormat("[ARCHIVER]: Added control file to archive."); - - new AssetsRequest( - new AssetsArchiver(archiveWriter), assetUuids, - m_scene.AssetService, awre.ReceivedAllAssets).Execute(); + m_saveStream.Close(); + } } - + /// /// Create the control file for the most up to date archive /// /// - public static string Create0p2ControlFile(Dictionary options) + public static string CreateControlFile(Dictionary options) { - int majorVersion = 0, minorVersion = 5; + int majorVersion = MAX_MAJOR_VERSION, minorVersion = 0; if (options.ContainsKey("version")) { - minorVersion = 0; string[] parts = options["version"].ToString().Split('.'); if (parts.Length >= 1) - majorVersion = Int32.Parse(parts[0]); - if (parts.Length >= 2) - minorVersion = Int32.Parse(parts[1]); + { + majorVersion = Int32.Parse(parts[0]); + + if (parts.Length >= 2) + minorVersion = Int32.Parse(parts[1]); + } } - m_log.InfoFormat("[ARCHIVER]: Creating version {0}.{1} OAR", majorVersion, minorVersion); -// if (majorVersion == 1) -// { -// m_log.WarnFormat("[ARCHIVER]: Please be aware that version 1.0 OARs are not compatible with OpenSim 0.7.0.2 and earlier. Please use the --version=0 option if you want to produce a compatible OAR"); -// } + if (majorVersion < MIN_MAJOR_VERSION || majorVersion > MAX_MAJOR_VERSION) + { + throw new Exception( + string.Format( + "OAR version number for save must be between {0} and {1}", + MIN_MAJOR_VERSION, MAX_MAJOR_VERSION)); + } + else if (majorVersion == MAX_MAJOR_VERSION) + { + // Force 1.0 + minorVersion = 0; + } + else if (majorVersion == MIN_MAJOR_VERSION) + { + // Force 0.4 + minorVersion = 4; + } + m_log.InfoFormat("[ARCHIVER]: Creating version {0}.{1} OAR", majorVersion, minorVersion); + if (majorVersion == 1) + { + m_log.WarnFormat("[ARCHIVER]: Please be aware that version 1.0 OARs are not compatible with OpenSim 0.7.0.2 and earlier. Please use the --version=0 option if you want to produce a compatible OAR"); + } StringWriter sw = new StringWriter(); XmlTextWriter xtw = new XmlTextWriter(sw); -- cgit v1.1 From 1087d6042b9a271b5132a00c9a256dd65b2dcfde Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 20 Nov 2010 02:43:38 +0000 Subject: correct build break. for some reason, xbuild didn't rebuild test dlls --- OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/CoreModules/World') diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs index 04bdc4f..ade0e11 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs @@ -230,7 +230,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests // upset load tar.WriteDir(ArchiveConstants.TERRAINS_PATH); - tar.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, ArchiveWriteRequestPreparation.Create0p2ControlFile(new Dictionary())); + tar.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, ArchiveWriteRequestPreparation.CreateControlFile(new Dictionary())); SceneObjectPart part1 = CreateSceneObjectPart1(); SceneObjectGroup object1 = new SceneObjectGroup(part1); @@ -329,7 +329,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream); tar.WriteDir(ArchiveConstants.TERRAINS_PATH); - tar.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, ArchiveWriteRequestPreparation.Create0p2ControlFile(new Dictionary())); + tar.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, ArchiveWriteRequestPreparation.CreateControlFile(new Dictionary())); RegionSettings rs = new RegionSettings(); rs.AgentLimit = 17; -- cgit v1.1 From d7bca3d8e8f62e938da9fada95f7336710900f4a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 20 Nov 2010 02:59:21 +0000 Subject: Fix unit tests and save problems (note; contrary to previous commits, saving 0.4 OARs is actually broken since serialized objects in inventories are not yet converted properly). Firstly, if you can save a version 1.0 OAR then you can load it too. Secondly, closing the save stream even on success before assets/objects are saved is a bad idea --- OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | 2 +- .../CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs | 3 ++- OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/CoreModules/World') diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 117b2fd..d5d4468 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs @@ -56,7 +56,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver /// The maximum major version of OAR that we can read. Minor versions shouldn't need a max number since version /// bumps here should be compatible. /// - public static int MAX_MAJOR_VERSION = 0; + public static int MAX_MAJOR_VERSION = 1; protected Scene m_scene; protected Stream m_loadStream; diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs index 3eb797b..b987b5a 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs @@ -192,9 +192,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver new AssetsArchiver(archiveWriter), assetUuids, m_scene.AssetService, awre.ReceivedAllAssets).Execute(); } - finally + catch (Exception) { m_saveStream.Close(); + throw; } } diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs index ade0e11..991bb0f 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs @@ -128,7 +128,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests public void TestSaveOarV0_2() { TestHelper.InMethod(); - //log4net.Config.XmlConfigurator.Configure(); +// log4net.Config.XmlConfigurator.Configure(); SceneObjectPart part1 = CreateSceneObjectPart1(); SceneObjectGroup sog1 = new SceneObjectGroup(part1); -- cgit v1.1 From a88bcbb1187ddb452379f857f4a8fefd66db1b5c Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 20 Nov 2010 03:01:47 +0000 Subject: Knock V0_2 decals off archive tests since they're misleading --- .../CoreModules/World/Archiver/Tests/ArchiverTests.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/CoreModules/World') diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs index 991bb0f..04b6e3d 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs @@ -122,10 +122,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests } /// - /// Test saving a V0.2 OpenSim Region Archive. + /// Test saving an OpenSim Region Archive. /// [Test] - public void TestSaveOarV0_2() + public void TestSaveOar() { TestHelper.InMethod(); // log4net.Config.XmlConfigurator.Configure(); @@ -212,10 +212,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests } /// - /// Test loading a V0.2 OpenSim Region Archive. + /// Test loading an OpenSim Region Archive. /// [Test] - public void TestLoadOarV0_2() + public void TestLoadOar() { TestHelper.InMethod(); // log4net.Config.XmlConfigurator.Configure(); @@ -317,10 +317,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests } /// - /// Test loading the region settings of a V0.2 OpenSim Region Archive. + /// Test loading the region settings of an OpenSim Region Archive. /// [Test] - public void TestLoadOarV0_2RegionSettings() + public void TestLoadOarRegionSettings() { TestHelper.InMethod(); //log4net.Config.XmlConfigurator.Configure(); @@ -409,10 +409,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests } /// - /// Test merging a V0.2 OpenSim Region Archive into an existing scene + /// Test merging an OpenSim Region Archive into an existing scene /// //[Test] - public void TestMergeOarV0_2() + public void TestMergeOar() { TestHelper.InMethod(); //XmlConfigurator.Configure(); -- cgit v1.1 From 6a9ae9e7cb71d79e9ec06cf25009e8bf45850dd1 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 21 Nov 2010 13:16:52 -0800 Subject: Global creator information working on MySQL DB and on load/save OARs. Creator name properly shown on the viewer as first.last @authority. New option added to save oar -profile=url. Migration on RegionStore making CreatorID be 255 chars. Moved Handling of user UUID -> name requests to a new module UserManagement/UserManagementModule. --- .../World/Archiver/ArchiveReadRequest.cs | 21 +++++++++++++++++++-- .../CoreModules/World/Archiver/ArchiverModule.cs | 1 + .../World/Estate/EstateManagementModule.cs | 8 +++++++- 3 files changed, 27 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/CoreModules/World') diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index d5d4468..b7fa799 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs @@ -78,6 +78,19 @@ namespace OpenSim.Region.CoreModules.World.Archiver /// private IDictionary m_validUserUuids = new Dictionary(); + private IUserManagement m_UserMan; + private IUserManagement UserManager + { + get + { + if (m_UserMan == null) + { + m_UserMan = m_scene.RequestModuleInterface(); + } + return m_UserMan; + } + } + public ArchiveReadRequest(Scene scene, string loadPath, bool merge, bool skipAssets, Guid requestId) { m_scene = scene; @@ -251,8 +264,12 @@ namespace OpenSim.Region.CoreModules.World.Archiver foreach (SceneObjectPart part in sceneObject.Parts) { - if (!ResolveUserUuid(part.CreatorID)) - part.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner; + if (part.CreatorData == null || part.CreatorData == string.Empty) + { + if (!ResolveUserUuid(part.CreatorID)) + part.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner; + } + UserManager.AddUser(part.CreatorID, part.CreatorData); if (!ResolveUserUuid(part.OwnerID)) part.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs index e0ad71e..358d0a7 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs @@ -126,6 +126,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver OptionSet ops = new OptionSet(); ops.Add("v|version=", delegate(string v) { options["version"] = v; }); + ops.Add("p|profile=", delegate(string v) { options["profile"] = v; }); List mainParams = ops.Parse(cmdparams); diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 6844c60..622fc08 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs @@ -771,8 +771,14 @@ namespace OpenSim.Region.CoreModules.World.Estate for (int i = 0; i < uuidarr.Length; i++) { // string lookupname = m_scene.CommsManager.UUIDNameRequestString(uuidarr[i]); - m_scene.GetUserName(uuidarr[i]); + + IUserManagement userManager = m_scene.RequestModuleInterface(); + string userName = "Unkown User"; + if (userManager != null) + userName = userManager.GetUserName(uuidarr[i]); + // we drop it. It gets cached though... so we're ready for the next request. + // diva commnent 11/21/2010: uh?!? wft? } } #endregion -- cgit v1.1 From c617d658dda92ad97de678d477a98c3df0659303 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 21 Nov 2010 17:19:24 -0800 Subject: Added creator info across the board -- TaskInventoryItems and InventoryItems themselves. Tested. Seems to be working, main tests pass. Nothing done for IARs or HG transfers yet -- this only works for OARs for the time being. New migration in inventory table in order to make CreatorID varchar(255). --- .../Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | 10 +++++++--- .../Region/CoreModules/World/Objects/BuySell/BuySellModule.cs | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/CoreModules/World') diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index b7fa799..3238a81 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs @@ -269,7 +269,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver if (!ResolveUserUuid(part.CreatorID)) part.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner; } - UserManager.AddUser(part.CreatorID, part.CreatorData); + if (UserManager != null) + UserManager.AddUser(part.CreatorID, part.CreatorData); if (!ResolveUserUuid(part.OwnerID)) part.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; @@ -293,10 +294,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver { kvp.Value.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; } - if (!ResolveUserUuid(kvp.Value.CreatorID)) + if (kvp.Value.CreatorData == null || kvp.Value.CreatorData == string.Empty) { - kvp.Value.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner; + if (!ResolveUserUuid(kvp.Value.CreatorID)) + kvp.Value.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner; } + if (UserManager != null) + UserManager.AddUser(kvp.Value.CreatorID, kvp.Value.CreatorData); } } } diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs index c06ccb2..568ba19 100644 --- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs @@ -189,6 +189,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell InventoryItemBase item = new InventoryItemBase(); item.CreatorId = part.CreatorID.ToString(); + item.CreatorData = part.CreatorData; item.ID = UUID.Random(); item.Owner = remoteClient.AgentId; -- cgit v1.1