From 4183cef4094364d28fd4497fdb4332ff4be34914 Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Wed, 5 May 2010 21:22:29 -0400 Subject: * Fixes LandDataSerializerTests on Windows by stripping CR from the serialization result since the reference serialization has LF only. * Added a bool result and then an Assert.That(result) because resharper was having a hard time with the equality compare in Assert.That. --- .../Serialization/Tests/LandDataSerializerTests.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs b/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs index 14e0462..70e87b3 100644 --- a/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs +++ b/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs @@ -96,15 +96,19 @@ namespace OpenSim.Framework.Serialization.Tests [Test] public void LandDataSerializerSerializeTest() { - string serialized = LandDataSerializer.Serialize(this.land); + string serialized = LandDataSerializer.Serialize(this.land).Replace("\r\n", "\n"); Assert.That(serialized.Length > 0, "Serialize(LandData) returned empty string"); - Assert.That(serialized == LandDataSerializerTest.preSerialized, - "result of Serialize(LandData) does not match expected result"); - string serializedWithParcelAccessList = LandDataSerializer.Serialize(this.landWithParcelAccessList); - Assert.That(serializedWithParcelAccessList.Length > 0, + // adding a simple boolean variable because resharper nUnit integration doesn't like this + // XML data in the Assert.That statement. Not sure why. + bool result = (serialized == preSerialized); + Assert.That(result, "result of Serialize LandData does not match expected result"); + + string serializedWithParcelAccessList = LandDataSerializer.Serialize(this.landWithParcelAccessList).Replace("\r\n", "\n"); + Assert.That(serializedWithParcelAccessList.Length > 0, "Serialize(LandData) returned empty string for LandData object with ParcelAccessList"); - Assert.That(serializedWithParcelAccessList == LandDataSerializerTest.preSerializedWithParcelAccessList, + result = (serializedWithParcelAccessList == preSerializedWithParcelAccessList); + Assert.That(result, "result of Serialize(LandData) does not match expected result (pre-serialized with parcel access list"); } -- cgit v1.1 From 53594e599e7f10bed441007f29a08d23e41e9188 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 5 May 2010 21:12:13 -0700 Subject: * Fixes Library bugs in grid mode. Partly a missing check and partly a missing configuration. * Made previous Robust config changes consistent in Robust.HG.ini.example --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 17 ++++++++++++++++- OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | 4 ++-- bin/Robust.HG.ini.example | 2 ++ bin/Robust.ini.example | 2 +- bin/config-include/GridHypergrid.ini | 5 +++++ 5 files changed, 26 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 20760b2..60f730d 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -1154,6 +1154,21 @@ namespace OpenSim.Region.Framework.Scenes if (folder == null) return; + // TODO: This code for looking in the folder for the library should be folded somewhere else + // so that this class doesn't have to know the details (and so that multiple libraries, etc. + // can be handled transparently). + InventoryFolderImpl fold = null; + if (LibraryService != null && LibraryService.LibraryRootFolder != null) + { + if ((fold = LibraryService.LibraryRootFolder.FindFolder(folder.ID)) != null) + { + client.SendInventoryFolderDetails( + fold.Owner, folder.ID, fold.RequestListOfItems(), + fold.RequestListOfFolders(), fold.Version, fetchFolders, fetchItems); + return; + } + } + // Fetch the folder contents InventoryCollection contents = InventoryService.GetFolderContent(client.AgentId, folder.ID); @@ -1164,7 +1179,7 @@ namespace OpenSim.Region.Framework.Scenes //m_log.DebugFormat("[AGENT INVENTORY]: Sending inventory folder contents ({0} nodes) for \"{1}\" to {2} {3}", // contents.Folders.Count + contents.Items.Count, containingFolder.Name, client.FirstName, client.LastName); - if (containingFolder != null) + if (containingFolder != null && containingFolder != null) client.SendInventoryFolderDetails(client.AgentId, folder.ID, contents.Items, contents.Folders, containingFolder.Version, fetchFolders, fetchItems); } diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index bc10230..e25b1f1 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs @@ -513,8 +513,8 @@ namespace OpenSim.Region.Framework.Scenes { // FIXME MAYBE: We're not handling sortOrder! - // TODO: This code for looking in the folder for the library should be folded back into the - // CachedUserInfo so that this class doesn't have to know the details (and so that multiple libraries, etc. + // TODO: This code for looking in the folder for the library should be folded somewhere else + // so that this class doesn't have to know the details (and so that multiple libraries, etc. // can be handled transparently). InventoryFolderImpl fold = null; if (LibraryService != null && LibraryService.LibraryRootFolder != null) diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example index 489b66f..d8145af 100644 --- a/bin/Robust.HG.ini.example +++ b/bin/Robust.HG.ini.example @@ -125,6 +125,8 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003 FriendsService = "OpenSim.Services.FriendsService.dll:FriendsService" WelcomeMessage = "Welcome, Avatar!" + AllowRemoteSetLoginLevel = "false" + ; Defaults for the users, if none is specified in the useraccounts table entry (ServiceURLs) ; CHANGE THIS HomeURI = "http://127.0.0.1:8002" diff --git a/bin/Robust.ini.example b/bin/Robust.ini.example index 2679523..ae3a53c 100644 --- a/bin/Robust.ini.example +++ b/bin/Robust.ini.example @@ -126,7 +126,7 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003 FriendsService = "OpenSim.Services.FriendsService.dll:FriendsService" WelcomeMessage = "Welcome, Avatar!" - AllowRemoteSetLoginLevel = "false"; + AllowRemoteSetLoginLevel = "false" [GridInfoService] diff --git a/bin/config-include/GridHypergrid.ini b/bin/config-include/GridHypergrid.ini index 051a87e..1e24f88 100644 --- a/bin/config-include/GridHypergrid.ini +++ b/bin/config-include/GridHypergrid.ini @@ -40,5 +40,10 @@ AllowHypergridMapSearch = true +[LibraryService] + LocalServiceModule = "OpenSim.Services.InventoryService.dll:LibraryService" + LibraryName = "OpenSim Library" + DefaultLibrary = "./inventory/Libraries.xml" + [Friends] Connector = "OpenSim.Services.Connectors.dll:FriendsServicesConnector" -- cgit v1.1