From 544627c79cceb59f4172ddbcef0fcfd992e62003 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 17 Jun 2010 03:03:55 +0100 Subject: [PATCH 01/18] Force newly connecting remote consoles to display a prompt --- OpenSim/Framework/Console/RemoteConsole.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/OpenSim/Framework/Console/RemoteConsole.cs b/OpenSim/Framework/Console/RemoteConsole.cs index a46a6cb86f..c038aaca5c 100644 --- a/OpenSim/Framework/Console/RemoteConsole.cs +++ b/OpenSim/Framework/Console/RemoteConsole.cs @@ -44,6 +44,7 @@ namespace OpenSim.Framework.Console { public int last; public long lastLineSeen; + public bool newConnection = true; } // A console that uses REST interfaces @@ -424,6 +425,12 @@ namespace OpenSim.Framework.Console XmlElement rootElement = xmldoc.CreateElement("", "ConsoleSession", ""); + if (c.newConnection) + { + c.newConnection = false; + Output("+++" + DefaultPrompt); + } + lock (m_Scrollback) { long startLine = m_LineNumber - m_Scrollback.Count; From 51d30fd34a950e0cd71d61ce0666a6d1e90bf233 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 17 Jun 2010 17:43:40 +0100 Subject: [PATCH 02/18] Set command timeout to infinity on migrations --- OpenSim/Data/MySQL/MySQLMigrations.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/OpenSim/Data/MySQL/MySQLMigrations.cs b/OpenSim/Data/MySQL/MySQLMigrations.cs index 81a0e837ea..4ad0e9bd25 100644 --- a/OpenSim/Data/MySQL/MySQLMigrations.cs +++ b/OpenSim/Data/MySQL/MySQLMigrations.cs @@ -75,6 +75,7 @@ namespace OpenSim.Data.MySQL { throw new Exception(sql); }; + scr.CommandTimeout = 0; scr.Execute(); } } From e3432b8f63a8fc17e506033fe4e1c568c8f88b9a Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 17 Jun 2010 17:48:34 +0100 Subject: [PATCH 03/18] Revert "Set command timeout to infinity on migrations" This reverts commit 51d30fd34a950e0cd71d61ce0666a6d1e90bf233. --- OpenSim/Data/MySQL/MySQLMigrations.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/OpenSim/Data/MySQL/MySQLMigrations.cs b/OpenSim/Data/MySQL/MySQLMigrations.cs index 4ad0e9bd25..81a0e837ea 100644 --- a/OpenSim/Data/MySQL/MySQLMigrations.cs +++ b/OpenSim/Data/MySQL/MySQLMigrations.cs @@ -75,7 +75,6 @@ namespace OpenSim.Data.MySQL { throw new Exception(sql); }; - scr.CommandTimeout = 0; scr.Execute(); } } From cf4721a92d3b0f9f3660406eca91ef76b230682a Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 18 Jun 2010 16:33:34 +0100 Subject: [PATCH 04/18] in IAR utils, return all folders that match a particular path rather than just the first one --- .../Archiver/InventoryArchiveReadRequest.cs | 13 ++++--- .../Archiver/InventoryArchiveUtils.cs | 35 +++++++++++-------- .../Archiver/InventoryArchiveWriteRequest.cs | 5 +-- .../Archiver/Tests/InventoryArchiverTests.cs | 10 +++--- 4 files changed, 36 insertions(+), 27 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs index b4f1ed6205..29e992e27f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs @@ -100,18 +100,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver List loadedNodes = new List(); - InventoryFolderBase rootDestinationFolder + List folderCandidates = InventoryArchiveUtils.FindFolderByPath( m_scene.InventoryService, m_userInfo.PrincipalID, m_invPath); - if (null == rootDestinationFolder) + if (folderCandidates.Count == 0) { // Possibly provide an option later on to automatically create this folder if it does not exist m_log.ErrorFormat("[INVENTORY ARCHIVER]: Inventory path {0} does not exist", m_invPath); return loadedNodes; } - + + InventoryFolderBase rootDestinationFolder = folderCandidates[0]; archive = new TarArchiveReader(m_loadStream); // In order to load identically named folders, we need to keep track of the folders that we have already @@ -246,6 +247,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver ref string archivePath, Dictionary resolvedFolders) { + m_log.DebugFormat("[INVENTORY ARCHIVER]: Resolving destination folder {0}", archivePath); + string originalArchivePath = archivePath; InventoryFolderBase destFolder = null; @@ -256,8 +259,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver { if (resolvedFolders.ContainsKey(archivePath)) { -// m_log.DebugFormat( -// "[INVENTORY ARCHIVER]: Found previously created folder from archive path {0}", archivePath); + m_log.DebugFormat( + "[INVENTORY ARCHIVER]: Found previously created folder from archive path {0}", archivePath); destFolder = resolvedFolders[archivePath]; } else diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs index 47b18d85d4..ca339683ed 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs @@ -55,8 +55,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver /// /// This method does not handle paths that contain multiple delimitors /// - /// FIXME: We do not yet handle situations where folders have the same name. We could handle this by some - /// XPath like expression + /// FIXME: We have no way of distinguishing folders with the same path /// /// FIXME: Delimitors which occur in names themselves are not currently escapable. /// @@ -70,14 +69,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver /// The path to the required folder. /// It this is empty or consists only of the PATH_DELIMTER then this folder itself is returned. /// - /// null if the folder is not found - public static InventoryFolderBase FindFolderByPath( + /// An empty list if the folder is not found, otherwise a list of all folders that match the name + public static List FindFolderByPath( IInventoryService inventoryService, UUID userId, string path) { InventoryFolderBase rootFolder = inventoryService.GetRootFolder(userId); if (null == rootFolder) - return null; + return new List(); return FindFolderByPath(inventoryService, rootFolder, path); } @@ -88,8 +87,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver /// /// This method does not handle paths that contain multiple delimitors /// - /// FIXME: We do not yet handle situations where folders have the same name. We could handle this by some - /// XPath like expression + /// FIXME: We have no way of distinguishing folders with the same path. /// /// FIXME: Delimitors which occur in names themselves are not currently escapable. /// @@ -103,17 +101,25 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver /// The path to the required folder. /// It this is empty or consists only of the PATH_DELIMTER then this folder itself is returned. /// - /// null if the folder is not found - public static InventoryFolderBase FindFolderByPath( + /// An empty list if the folder is not found, otherwise a list of all folders that match the name + public static List FindFolderByPath( IInventoryService inventoryService, InventoryFolderBase startFolder, string path) { + List foundFolders = new List(); + if (path == string.Empty) - return startFolder; + { + foundFolders.Add(startFolder); + return foundFolders; + } path = path.Trim(); if (path == PATH_DELIMITER.ToString()) - return startFolder; + { + foundFolders.Add(startFolder); + return foundFolders; + } string[] components = SplitEscapedPath(path); components[0] = UnescapePath(components[0]); @@ -127,14 +133,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver if (folder.Name == components[0]) { if (components.Length > 1) - return FindFolderByPath(inventoryService, folder, components[1]); + foundFolders.AddRange(FindFolderByPath(inventoryService, folder, components[1])); else - return folder; + foundFolders.Add(folder); } } - // We didn't find a folder with the right name - return null; + return foundFolders; } /// diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index 8f3f65b0b6..2c2724e74c 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs @@ -249,9 +249,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver else { m_invPath = m_invPath.Remove(m_invPath.LastIndexOf(InventoryFolderImpl.PATH_DELIMITER)); - inventoryFolder + List candidateFolders = InventoryArchiveUtils.FindFolderByPath(m_scene.InventoryService, rootFolder, m_invPath); - //inventoryFolder = m_userInfo.RootFolder.FindFolderByPath(m_invPath); + if (candidateFolders.Count > 0) + inventoryFolder = candidateFolders[0]; } // The path may point to an item instead diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index 00bd27aaba..6bf1219c7f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs @@ -117,7 +117,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests item1.AssetID = asset1.FullID; item1.ID = item1Id; InventoryFolderBase objsFolder - = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, userId, "Objects"); + = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, userId, "Objects")[0]; item1.Folder = objsFolder.ID; scene.AddInventoryItem(userId, item1); @@ -327,7 +327,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests item1.AssetID = asset1.FullID; item1.ID = item1Id; InventoryFolderBase objsFolder - = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, userId, "Objects"); + = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, userId, "Objects")[0]; item1.Folder = objsFolder.ID; scene.AddInventoryItem(userId, item1); @@ -535,9 +535,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests foldersCreated, nodesLoaded); InventoryFolderBase folder1 - = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, ua1.PrincipalID, "a"); + = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, ua1.PrincipalID, "a")[0]; Assert.That(folder1, Is.Not.Null, "Could not find folder a"); - InventoryFolderBase folder2 = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, "b"); + InventoryFolderBase folder2 = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, "b")[0]; Assert.That(folder2, Is.Not.Null, "Could not find folder b"); } @@ -576,7 +576,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests new Dictionary(), new List()); InventoryFolderBase folder1Post - = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, ua1.PrincipalID, folder1ExistingName); + = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, ua1.PrincipalID, folder1ExistingName)[0]; Assert.That(folder1Post.ID, Is.EqualTo(folder1.ID)); /* InventoryFolderBase folder2 From 11a35d8cdaac00ac563c2f44fdb28342ca95e142 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 18 Jun 2010 17:10:16 +0100 Subject: [PATCH 05/18] change TestPartExistingIarPath() to check appropriate folder creation change some names in InventoryArchiveReadRequest in an effort to make the code more comprehendable --- .../Archiver/InventoryArchiveReadRequest.cs | 39 +++++++++++-------- .../Archiver/Tests/InventoryArchiverTests.cs | 38 +++++++++++------- 2 files changed, 45 insertions(+), 32 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs index 29e992e27f..94c6ef9052 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs @@ -189,7 +189,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver /// /// Replicate the inventory paths in the archive to the user's inventory as necessary. /// - /// The item archive path to replicate + /// The item archive path to replicate /// The root folder for the inventory load /// /// The folders that we have resolved so far for a given archive path. @@ -200,24 +200,24 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver /// /// The last user inventory folder created or found for the archive path public InventoryFolderBase ReplicateArchivePathToUserInventory( - string archivePath, + string iarPath, InventoryFolderBase rootDestFolder, Dictionary resolvedFolders, List loadedNodes) { - string originalArchivePath = archivePath; + string iarPathExisting = iarPath; // m_log.DebugFormat( // "[INVENTORY ARCHIVER]: Loading folder {0} {1}", rootDestFolder.Name, rootDestFolder.ID); - InventoryFolderBase destFolder = ResolveDestinationFolder(rootDestFolder, ref archivePath, resolvedFolders); + InventoryFolderBase destFolder = ResolveDestinationFolder(rootDestFolder, ref iarPathExisting, resolvedFolders); -// m_log.DebugFormat( -// "[INVENTORY ARCHIVER]: originalArchivePath [{0}], section already loaded [{1}]", -// originalArchivePath, archivePath); + m_log.DebugFormat( + "[INVENTORY ARCHIVER]: originalArchivePath [{0}], section already loaded [{1}]", + iarPath, iarPathExisting); - string archivePathSectionToCreate = originalArchivePath.Substring(archivePath.Length); - CreateFoldersForPath(destFolder, archivePathSectionToCreate, resolvedFolders, loadedNodes); + string iarPathToCreate = iarPath.Substring(iarPathExisting.Length); + CreateFoldersForPath(destFolder, iarPathExisting, iarPathToCreate, resolvedFolders, loadedNodes); return destFolder; } @@ -297,8 +297,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver /// /// The root folder from which the creation will take place. /// - /// - /// The path to create + /// + /// the part of the iar path that already exists + /// + /// + /// The path to replicate in the user's inventory from iar /// /// /// The folders that we have resolved so far for a given archive path. @@ -307,11 +310,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver /// Track the inventory nodes created. /// protected void CreateFoldersForPath( - InventoryFolderBase destFolder, string path, Dictionary resolvedFolders, + InventoryFolderBase destFolder, + string iarPathExisting, + string iarPathToReplicate, + Dictionary resolvedFolders, List loadedNodes) { - string pathCreated = ""; - string[] rawDirsToCreate = path.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries); + string[] rawDirsToCreate = iarPathToReplicate.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries); int i = 0; while (i < rawDirsToCreate.Length) @@ -343,9 +348,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver m_scene.InventoryService.AddFolder(destFolder); // Record that we have now created this folder - pathCreated += rawDirsToCreate[i] + "/"; - m_log.DebugFormat("[INVENTORY ARCHIVER]: Created folder {0} from IAR", pathCreated); - resolvedFolders[pathCreated] = destFolder; + iarPathExisting += rawDirsToCreate[i] + "/"; + m_log.DebugFormat("[INVENTORY ARCHIVER]: Created folder {0} from IAR", iarPathExisting); + resolvedFolders[iarPathExisting] = destFolder; if (0 == i) loadedNodes.Add(destFolder); diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index 6bf1219c7f..85afbf9e25 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs @@ -279,7 +279,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests public void TestIarV0_1WithEscapedChars() { TestHelper.InMethod(); -// log4net.Config.XmlConfigurator.Configure(); + log4net.Config.XmlConfigurator.Configure(); string itemName = "You & you are a mean/man/"; string humanEscapedItemName = @"You & you are a mean\/man\/"; @@ -542,7 +542,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests } /// - /// Test replication of a partly existing archive path to the user's inventory. + /// Test replication of a partly existing archive path to the user's inventory. This should create + /// a duplicate path without the merge option. /// [Test] public void TestPartExistingIarPath() @@ -555,7 +556,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests string folder1ExistingName = "a"; string folder2Name = "b"; - string itemName = "c.lsl"; InventoryFolderBase folder1 = UserInventoryTestUtils.CreateInventoryFolder( @@ -563,28 +563,36 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random()); string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random()); - string itemArchiveName = InventoryArchiveWriteRequest.CreateArchiveItemName(itemName, UUID.Random()); string itemArchivePath = string.Format( - "{0}{1}{2}{3}", - ArchiveConstants.INVENTORY_PATH, folder1ArchiveName, folder2ArchiveName, itemArchiveName); + "{0}{1}{2}", + ArchiveConstants.INVENTORY_PATH, folder1ArchiveName, folder2ArchiveName); new InventoryArchiveReadRequest(scene, ua1, null, (Stream)null) .ReplicateArchivePathToUserInventory( itemArchivePath, scene.InventoryService.GetRootFolder(ua1.PrincipalID), new Dictionary(), new List()); - InventoryFolderBase folder1Post - = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, ua1.PrincipalID, folder1ExistingName)[0]; - Assert.That(folder1Post.ID, Is.EqualTo(folder1.ID)); - /* - InventoryFolderBase folder2 + List folder1PostCandidates + = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, ua1.PrincipalID, folder1ExistingName); + Assert.That(folder1PostCandidates.Count, Is.EqualTo(2)); + + // FIXME: Temporarily, we're going to do something messy to make sure we pick up the created folder. + InventoryFolderBase folder1Post = null; + foreach (InventoryFolderBase folder in folder1PostCandidates) + { + if (folder.ID != folder1.ID) + { + folder1Post = folder; + break; + } + } +// Assert.That(folder1Post.ID, Is.EqualTo(folder1.ID)); + + List folder2PostCandidates = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1Post, "b"); - Assert.That(folder2, Is.Not.Null); - InventoryItemBase item = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, folder2, itemName); - Assert.That(item, Is.Not.Null); - */ + Assert.That(folder2PostCandidates.Count, Is.EqualTo(1)); } } } \ No newline at end of file From 71c8bbaf2c768167e377e86ae7137a86c0bb36d0 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 18 Jun 2010 17:37:28 +0100 Subject: [PATCH 06/18] Fix problem where iar load would duplicate huge number of folders This was http://opensimulator.org/mantis/view.php?id=4770 Extend unit tests to check for this scenario too --- .../Archiver/InventoryArchiveReadRequest.cs | 6 +- .../Archiver/Tests/InventoryArchiverTests.cs | 75 ++++++++++++------- .../Common/Mock/TestInventoryDataPlugin.cs | 12 +-- 3 files changed, 58 insertions(+), 35 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs index 94c6ef9052..9996074860 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs @@ -246,9 +246,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver InventoryFolderBase rootDestFolder, ref string archivePath, Dictionary resolvedFolders) - { - m_log.DebugFormat("[INVENTORY ARCHIVER]: Resolving destination folder {0}", archivePath); - + { string originalArchivePath = archivePath; InventoryFolderBase destFolder = null; @@ -257,6 +255,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver { while (null == destFolder && archivePath.Length > 0) { + m_log.DebugFormat("[INVENTORY ARCHIVER]: Trying to resolve destination folder {0}", archivePath); + if (resolvedFolders.ContainsKey(archivePath)) { m_log.DebugFormat( diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index 85afbf9e25..5130fa5522 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs @@ -279,7 +279,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests public void TestIarV0_1WithEscapedChars() { TestHelper.InMethod(); - log4net.Config.XmlConfigurator.Configure(); +// log4net.Config.XmlConfigurator.Configure(); string itemName = "You & you are a mean/man/"; string humanEscapedItemName = @"You & you are a mean\/man\/"; @@ -508,7 +508,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests public void TestNewIarPath() { TestHelper.InMethod(); - //log4net.Config.XmlConfigurator.Configure(); +// log4net.Config.XmlConfigurator.Configure(); Scene scene = SceneSetupHelpers.SetupScene("inventory"); UserAccount ua1 = UserProfileTestUtils.CreateUserWithInventory(scene); @@ -516,29 +516,55 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests Dictionary foldersCreated = new Dictionary(); List nodesLoaded = new List(); - string folder1Name = "a"; - string folder2Name = "b"; - string itemName = "c.lsl"; + string folder1Name = "1"; + string folder2aName = "2a"; + string folder2bName = "2b"; string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1Name, UUID.Random()); - string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random()); - string itemArchiveName = InventoryArchiveWriteRequest.CreateArchiveItemName(itemName, UUID.Random()); + string folder2aArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2aName, UUID.Random()); + string folder2bArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2bName, UUID.Random()); - string itemArchivePath - = string.Format( - "{0}{1}{2}{3}", - ArchiveConstants.INVENTORY_PATH, folder1ArchiveName, folder2ArchiveName, itemArchiveName); + string iarPath1 = string.Join("", new string[] { folder1ArchiveName, folder2aArchiveName }); + string iarPath2 = string.Join("", new string[] { folder1ArchiveName, folder2bArchiveName }); - new InventoryArchiveReadRequest(scene, ua1, null, (Stream)null) - .ReplicateArchivePathToUserInventory( - itemArchivePath, scene.InventoryService.GetRootFolder(ua1.PrincipalID), - foldersCreated, nodesLoaded); - - InventoryFolderBase folder1 - = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, ua1.PrincipalID, "a")[0]; - Assert.That(folder1, Is.Not.Null, "Could not find folder a"); - InventoryFolderBase folder2 = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, "b")[0]; - Assert.That(folder2, Is.Not.Null, "Could not find folder b"); + { + // Test replication of path1 + new InventoryArchiveReadRequest(scene, ua1, null, (Stream)null) + .ReplicateArchivePathToUserInventory( + iarPath1, scene.InventoryService.GetRootFolder(ua1.PrincipalID), + foldersCreated, nodesLoaded); + + List folder1Candidates + = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, ua1.PrincipalID, folder1Name); + Assert.That(folder1Candidates.Count, Is.EqualTo(1)); + + InventoryFolderBase folder1 = folder1Candidates[0]; + List folder2aCandidates + = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, folder2aName); + Assert.That(folder2aCandidates.Count, Is.EqualTo(1)); + } + + { + // Test replication of path2 + new InventoryArchiveReadRequest(scene, ua1, null, (Stream)null) + .ReplicateArchivePathToUserInventory( + iarPath2, scene.InventoryService.GetRootFolder(ua1.PrincipalID), + foldersCreated, nodesLoaded); + + List folder1Candidates + = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, ua1.PrincipalID, folder1Name); + Assert.That(folder1Candidates.Count, Is.EqualTo(1)); + + InventoryFolderBase folder1 = folder1Candidates[0]; + + List folder2aCandidates + = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, folder2aName); + Assert.That(folder2aCandidates.Count, Is.EqualTo(1)); + + List folder2bCandidates + = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, folder2bName); + Assert.That(folder2bCandidates.Count, Is.EqualTo(1)); + } } /// @@ -564,11 +590,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random()); string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random()); - string itemArchivePath - = string.Format( - "{0}{1}{2}", - ArchiveConstants.INVENTORY_PATH, folder1ArchiveName, folder2ArchiveName); - + string itemArchivePath = string.Join("", new string[] { folder1ArchiveName, folder2ArchiveName }); + new InventoryArchiveReadRequest(scene, ua1, null, (Stream)null) .ReplicateArchivePathToUserInventory( itemArchivePath, scene.InventoryService.GetRootFolder(ua1.PrincipalID), diff --git a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs index 0c7ebca19b..fecb73f351 100644 --- a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs +++ b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs @@ -84,7 +84,7 @@ namespace OpenSim.Tests.Common.Mock public List getInventoryInFolder(UUID folderID) { - m_log.DebugFormat("[MOCK INV DB]: Getting items in folder {0}", folderID); +// m_log.DebugFormat("[MOCK INV DB]: Getting items in folder {0}", folderID); List items = new List(); @@ -101,7 +101,7 @@ namespace OpenSim.Tests.Common.Mock public InventoryFolderBase getUserRootFolder(UUID user) { - m_log.DebugFormat("[MOCK INV DB]: Looking for root folder for {0}", user); +// m_log.DebugFormat("[MOCK INV DB]: Looking for root folder for {0}", user); InventoryFolderBase folder = null; m_rootFolders.TryGetValue(user, out folder); @@ -141,8 +141,8 @@ namespace OpenSim.Tests.Common.Mock if (folder.ParentID == UUID.Zero) { - m_log.DebugFormat( - "[MOCK INV DB]: Adding root folder {0} {1} for {2}", folder.Name, folder.ID, folder.Owner); +// m_log.DebugFormat( +// "[MOCK INV DB]: Adding root folder {0} {1} for {2}", folder.Name, folder.ID, folder.Owner); m_rootFolders[folder.Owner] = folder; } } @@ -166,8 +166,8 @@ namespace OpenSim.Tests.Common.Mock public void addInventoryItem(InventoryItemBase item) { - m_log.DebugFormat( - "[MOCK INV DB]: Adding inventory item {0} {1} in {2}", item.Name, item.ID, item.Folder); +// m_log.DebugFormat( +// "[MOCK INV DB]: Adding inventory item {0} {1} in {2}", item.Name, item.ID, item.Folder); m_items[item.ID] = item; } From 47d5f90629bcdaff596a4cc65c0624b421ce99df Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 18 Jun 2010 19:49:14 +0100 Subject: [PATCH 07/18] Remove an error in meshing error reporting. Now doesn't double-bomb anymore on a bad sculpt --- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index a9e9f5cd1b..100f98dc39 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -1778,7 +1778,7 @@ namespace OpenSim.Region.Physics.OdePlugin } catch(Exception e) { - m_log.ErrorFormat("[PHYSICS]: Exception while meshing prim {0}."); + m_log.ErrorFormat("[PHYSICS]: Exception while meshing prim {0}.", primName); m_log.Debug(e.ToString()); mesh = null; } From ed01e9162d1ae0a39b4fcf7e238c975efddfc95b Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey Date: Fri, 18 Jun 2010 23:07:51 +0100 Subject: [PATCH 08/18] Change Opensim.Servers.exe comment at top of Robust.HG.ini to Robust.exe This addresses http://opensimulator.org/mantis/view.php?id=4772 Thanks to aiaustin for pointing this out --- bin/Robust.HG.ini.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example index 9830d389af..39228eb1d6 100644 --- a/bin/Robust.HG.ini.example +++ b/bin/Robust.HG.ini.example @@ -1,7 +1,7 @@ ;; Configurations for enabling HG1.5 ;; ;; Run -;; $ OpenSim.Server.exe -inifile OpenSim.Server.HG.ini +;; $ Robust.exe -inifile Robust.HG.ini ;; HG1.5 handlers are: OpenSim.Server.Handlers.dll:GatekeeperService ;; OpenSim.Server.Handlers.dll:UserAgentService From de84da9e7b794433dc8ada0767f51c28f5d9efc0 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 18 Jun 2010 23:20:32 +0100 Subject: [PATCH 09/18] eliminate SimianGrid [Groups] section from GridCommon.ini.example as per Nebadon this is only used by SimianGrid and is now in SimianGrid.ini --- bin/config-include/GridCommon.ini.example | 8 -------- 1 file changed, 8 deletions(-) diff --git a/bin/config-include/GridCommon.ini.example b/bin/config-include/GridCommon.ini.example index 88ac5e2dbf..a19591bfaa 100644 --- a/bin/config-include/GridCommon.ini.example +++ b/bin/config-include/GridCommon.ini.example @@ -8,7 +8,6 @@ ; AssetServerURI = "http://myassetserver.com:8003" - [InventoryService] ; ; change this to your grid-wide inventory server @@ -58,13 +57,6 @@ ; FriendsServerURI = "http://mygridserver.com:8003" -[Groups] - ; - ; change this to your grid-wide groups server - ; - GroupsServerURI = "http://mygridserver.com:82/Grid/" - - [Modules] ;; Choose 0 or 1 cache modules, and the corresponding config file, if it exists. ;; Copy the config .example file into your own .ini file and change configs there From 514732595bdeb75a94a232b2f49ad11684ff7f6f Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 18 Jun 2010 23:38:40 +0100 Subject: [PATCH 10/18] minor: try and make the explanations for the AllowScriptCrossing and TrustBinaries settings in OpenSim.ini.example clearer --- bin/OpenSim.ini.example | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 0bc3d87833..aab1a58754 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -80,14 +80,16 @@ PhysicalPrimMax = 10 ; (I think this was moved to the Regions.ini!) ClampPrimSize = false - ; Region crossing + ; Allow scripts to cross region boundaries. These are recompiled on the new region. AllowScriptCrossing = false + + ; Allow compiled script binary code to cross region boundaries. ; If you set this to "true", any region that can teleport to you can ; inject ARBITRARY BINARY CODE into your system. Use at your own risk. ; YOU HAVE BEEN WARNED!!! TrustBinaries = false - ; Combine all contiguous regions into one large region + ; Combine all contiguous regions into one large megaregion ; Order your regions from South to North, West to East in your regions.ini and then set this to true ; Warning! Don't use this with regions that have existing content!, This will likely break them CombineContiguousRegions = false From 8fc3745e1905c9c8881eac9c09da9754e4fa8265 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Sat, 19 Jun 2010 01:23:52 +0100 Subject: [PATCH 11/18] Overhaul basic README.txt for new estate setup options on first run. Also make some minor changes for clarity. --- README.txt | 58 ++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 41 insertions(+), 17 deletions(-) diff --git a/README.txt b/README.txt index e19e58ecad..190fc46d35 100644 --- a/README.txt +++ b/README.txt @@ -1,6 +1,8 @@ Welcome to OpenSim! +================ === OVERVIEW === +================ OpenSim is a BSD Licensed Open Source project to develop a functioning virtual worlds server platform capable of supporting multiple clients @@ -10,16 +12,19 @@ C#, and can run under Mono or the Microsoft .NET runtimes. This is considered an alpha release. Some stuff works, a lot doesn't. If it breaks, you get to keep *both* pieces. +========================= === Compiling OpenSim === +========================= Please see BUILDING.txt if you downloaded a source distribution and need to build OpenSim before running it. +================================== === Running OpenSim on Windows === +================================== We recommend that you run OpenSim from a command prompt on Windows in order -to capture any errors, though you can also run it by double-clicking -bin/OpenSim.exe +to capture any errors. To run OpenSim from a command prompt @@ -28,7 +33,9 @@ To run OpenSim from a command prompt Now see the "Configuring OpenSim" section +================================ === Running OpenSim on Linux === +================================ You will need Mono >= 2.4.2 to run OpenSim. On some Linux distributions you may need to install additional packages. See http://opensimulator.org/wiki/Dependencies @@ -37,48 +44,64 @@ for more information. To run OpenSim, from the unpacked distribution type: * cd bin - * mono ./OpenSim.exe + * mono OpenSim.exe Now see the "Configuring OpenSim" section +=========================== === Configuring OpenSim === +=========================== When OpenSim starts for the first time, you will be prompted with a series of questions that look something like: [09-17 03:54:40] DEFAULT REGION CONFIG: Simulator Name [OpenSim Test]: -At each of these you must provide you own value or just hit enter to -take the default (in this case "OpenSim Test"). +For all the options except simulator name, you can safely hit enter to accept +the default if you want to connect using a client on the same machine or over +your local network. -YOUR SIM WILL NOT BE STARTED UNTIL YOU ANSWER ALL QUESTIONS +You will then be asked "Do you wish to join an existing estate?". If you're +starting OpenSim for the first time then answer no (which is the default) and +provide an estate name. + +Shortly afterwards, you will then be asked to enter an estate owner first name, +last name, password and e-mail (which can be left blank). Do not forget these +details, since initially only this account will be able to manage your region +in-world. You can also use these details to perform your first login. Once you are presented with a prompt that looks like: - Region# : + Region (My region name) # You have successfully started OpenSim. -Before you can log in you will need to create a user account if you didn't already create -your user as the "Master Avatar" during the region configuration stage. You can do -this by running the "create user" command on the OpenSim console. This will -ask you a series of questions such as first name, last name and password. +If you want to create another user account to login rather than the estate +account, then type "craete user" on the OpenSim console and follow the prompts. Helpful resources: * http://opensimulator.org/wiki/Configuration * http://opensimulator.org/wiki/Configuring_Regions * http://opensimulator.org/wiki/Mysql-config +================================== === Connecting to your OpenSim === +================================== -By default your sim will be running on http://127.0.0.1:9000. To use -your OpenSim add -loginuri http://127.0.0.1:9000 to your second life -client (running on the same machine as your OpenSim). To login, use the -same avatar details that you gave to the "create user" console command. +By default your sim will be available for login on port 9000. You can login by +adding -loginuri http://127.0.0.1:9000 to the command that starts Second Life +(e.g. in the Target: box of the client icon properties on Windows). You can +also login using the network IP address of the machine running OpenSim (e.g. +http://192.168.1.2:9000) +To login, use the avatar details that you gave for your estate ownership or the +one you set up using the "create user" command. + +=================== === Bug reports === +=================== -In the likely event of bugs biting you (err, your OpenSim) we +In the very likely event of bugs biting you (err, your OpenSim) we encourage you to see whether the problem has already been reported on the OpenSim mantis system. You can find the OpenSim mantis system at @@ -97,11 +120,12 @@ mantis"). Useful information to include: mono --debug OpenSim.exe +=================================== === More Information on OpenSim === +=================================== More extensive information on building, running, and configuring OpenSim, as well as how to report bugs, and participate in the OpenSim project can always be found at http://opensimulator.org. Thanks for trying OpenSim, we hope it is a pleasant experience. - \ No newline at end of file From ad62ca6babaf1e4c0e1e8aa384d87d26dee7c7bf Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Sat, 19 Jun 2010 01:27:46 +0100 Subject: [PATCH 12/18] minor: correct a spelling mistake --- README.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.txt b/README.txt index 190fc46d35..14109bea1c 100644 --- a/README.txt +++ b/README.txt @@ -77,7 +77,7 @@ Once you are presented with a prompt that looks like: You have successfully started OpenSim. If you want to create another user account to login rather than the estate -account, then type "craete user" on the OpenSim console and follow the prompts. +account, then type "create user" on the OpenSim console and follow the prompts. Helpful resources: * http://opensimulator.org/wiki/Configuration From 954906f0bdc3ff395cd567281e22b5608b805aac Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Sat, 19 Jun 2010 01:52:13 +0100 Subject: [PATCH 13/18] remove link to wiki mysql-config since the page was out-of-date and actively misleading --- README.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/README.txt b/README.txt index 14109bea1c..18784be11d 100644 --- a/README.txt +++ b/README.txt @@ -82,7 +82,6 @@ account, then type "create user" on the OpenSim console and follow the prompts. Helpful resources: * http://opensimulator.org/wiki/Configuration * http://opensimulator.org/wiki/Configuring_Regions - * http://opensimulator.org/wiki/Mysql-config ================================== === Connecting to your OpenSim === From db046f1fbacf3b41b145f965cc1861df04d7aa6f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 19 Jun 2010 08:51:07 -0700 Subject: [PATCH 14/18] Reinstated the behavior of AddPrimShape as it was as of December. Trying to fix mantis #4777 --- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 100f98dc39..7fd59a0ebf 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -1781,6 +1781,7 @@ namespace OpenSim.Region.Physics.OdePlugin m_log.ErrorFormat("[PHYSICS]: Exception while meshing prim {0}.", primName); m_log.Debug(e.ToString()); mesh = null; + return null; } } From f0f684161eaf7481076cff63e794e01f654d627c Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 19 Jun 2010 08:51:07 -0700 Subject: [PATCH 15/18] Reinstated the behavior of AddPrimShape *exactly* as it was as of December. Trying to fix mantis #4777 --- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 100f98dc39..f84c5053c9 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -1772,16 +1772,7 @@ namespace OpenSim.Region.Physics.OdePlugin if (needsMeshing(pbs)) { - try - { - mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical); - } - catch(Exception e) - { - m_log.ErrorFormat("[PHYSICS]: Exception while meshing prim {0}.", primName); - m_log.Debug(e.ToString()); - mesh = null; - } + mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical); } result = AddPrim(primName, position, size, rotation, mesh, pbs, isPhysical); From 9b410f5e94b2969fbd1004560eae567d1c950666 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 19 Jun 2010 09:25:36 -0700 Subject: [PATCH 16/18] Reverting my last two commits, putting back Melanie's exception handler. Doesn't solve #4777. --- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index f84c5053c9..100f98dc39 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -1772,7 +1772,16 @@ namespace OpenSim.Region.Physics.OdePlugin if (needsMeshing(pbs)) { - mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical); + try + { + mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical); + } + catch(Exception e) + { + m_log.ErrorFormat("[PHYSICS]: Exception while meshing prim {0}.", primName); + m_log.Debug(e.ToString()); + mesh = null; + } } result = AddPrim(primName, position, size, rotation, mesh, pbs, isPhysical); From 1e7ce6dbced67350214f921566f39a3d1413e9bb Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 19 Jun 2010 09:44:02 -0700 Subject: [PATCH 17/18] Hunting for the problem in #4777 --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 4 ++++ OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 1 + 2 files changed, 5 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 38b2dc2f68..59fd805bb3 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -1487,6 +1487,10 @@ namespace OpenSim.Region.Framework.Scenes DoPhysicsPropertyUpdate(RigidBody, true); PhysActor.SetVolumeDetect(VolumeDetectActive ? 1 : 0); } + else + { + m_log.DebugFormat("[SPEW]: physics actor is null for {0} with parent {1}", UUID, this.ParentGroup.UUID); + } } } } diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 100f98dc39..7fd59a0ebf 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -1781,6 +1781,7 @@ namespace OpenSim.Region.Physics.OdePlugin m_log.ErrorFormat("[PHYSICS]: Exception while meshing prim {0}.", primName); m_log.Debug(e.ToString()); mesh = null; + return null; } } From 24a68e36fb07e4366c8f9f680bcbbf85ac92b2f3 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 19 Jun 2010 12:32:36 -0700 Subject: [PATCH 18/18] Bug fix: wrong name of requester in local friendship offer. --- OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index 80982fd577..5552be7648 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs @@ -503,7 +503,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends UUID principalID = new UUID(im.fromAgentID); UUID friendID = new UUID(im.toAgentID); - m_log.DebugFormat("[FRIENDS]: {0} offered friendship to {1}", principalID, friendID); + m_log.DebugFormat("[FRIENDS]: {0} ({1}) offered friendship to {2}", principalID, im.fromAgentName, friendID); // This user wants to be friends with the other user. // Let's add the relation backwards, in case the other is not online @@ -521,6 +521,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends im.imSessionID = im.fromAgentID; // Try the local sim + UserAccount account = UserAccountService.GetUserAccount(Scene.RegionInfo.ScopeID, agentID); + im.fromAgentName = (account == null) ? "Unknown" : account.FirstName + " " + account.LastName; + if (LocalFriendshipOffered(friendID, im)) return;