aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs18
-rw-r--r--OpenSim/Region/Communications/Local/CommunicationsLocal.cs23
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs6
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs9
4 files changed, 45 insertions, 11 deletions
diff --git a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs
index f5789b7..5c2fe33 100644
--- a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs
+++ b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs
@@ -25,9 +25,12 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System.Collections.Generic;
29using OpenSim.Data;
28using OpenSim.Framework; 30using OpenSim.Framework;
29using OpenSim.Framework.Communications; 31using OpenSim.Framework.Communications;
30using OpenSim.Framework.Communications.Cache; 32using OpenSim.Framework.Communications.Cache;
33using OpenSim.Framework.Communications.Osp;
31using OpenSim.Framework.Servers; 34using OpenSim.Framework.Servers;
32using OpenSim.Framework.Servers.HttpServer; 35using OpenSim.Framework.Servers.HttpServer;
33using OpenSim.Region.Communications.Local; 36using OpenSim.Region.Communications.Local;
@@ -42,7 +45,6 @@ namespace OpenSim.Region.Communications.Hypergrid
42 NetworkServersInfo serversInfo, 45 NetworkServersInfo serversInfo,
43 BaseHttpServer httpServer, 46 BaseHttpServer httpServer,
44 IAssetCache assetCache, 47 IAssetCache assetCache,
45 LocalInventoryService inventoryService,
46 HGGridServices gridService, 48 HGGridServices gridService,
47 LibraryRootFolder libraryRootFolder, 49 LibraryRootFolder libraryRootFolder,
48 bool dumpAssetsToFile) 50 bool dumpAssetsToFile)
@@ -52,10 +54,24 @@ namespace OpenSim.Region.Communications.Hypergrid
52 new LocalUserServices( 54 new LocalUserServices(
53 serversInfo.DefaultHomeLocX, serversInfo.DefaultHomeLocY, this); 55 serversInfo.DefaultHomeLocX, serversInfo.DefaultHomeLocY, this);
54 localUserService.AddPlugin(configSettings.StandaloneUserPlugin, configSettings.StandaloneUserSource); 56 localUserService.AddPlugin(configSettings.StandaloneUserPlugin, configSettings.StandaloneUserSource);
57
58 HGInventoryServiceClient inventoryService
59 = new HGInventoryServiceClient(serversInfo.InventoryURL, null, false);
60 List<IInventoryDataPlugin> plugins
61 = DataPluginFactory.LoadDataPlugins<IInventoryDataPlugin>(
62 configSettings.StandaloneInventoryPlugin,
63 configSettings.StandaloneInventorySource);
64
65 foreach (IInventoryDataPlugin plugin in plugins)
66 {
67 // Using the OSP wrapper plugin should be made configurable at some point
68 inventoryService.AddPlugin(new OspInventoryWrapperPlugin(plugin, this));
69 }
55 70
56 AddInventoryService(inventoryService); 71 AddInventoryService(inventoryService);
57 m_defaultInventoryHost = inventoryService.Host; 72 m_defaultInventoryHost = inventoryService.Host;
58 m_interServiceInventoryService = inventoryService; 73 m_interServiceInventoryService = inventoryService;
74 inventoryService.UserProfileCache = UserProfileCacheService;
59 75
60 m_assetCache = assetCache; 76 m_assetCache = assetCache;
61 // Let's swap to always be secure access to inventory 77 // Let's swap to always be secure access to inventory
diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
index acb7496..60feee1 100644
--- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
+++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
@@ -25,9 +25,12 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System.Collections.Generic;
29using OpenSim.Data;
28using OpenSim.Framework; 30using OpenSim.Framework;
29using OpenSim.Framework.Communications; 31using OpenSim.Framework.Communications;
30using OpenSim.Framework.Communications.Cache; 32using OpenSim.Framework.Communications.Cache;
33using OpenSim.Framework.Communications.Osp;
31using OpenSim.Framework.Servers.HttpServer; 34using OpenSim.Framework.Servers.HttpServer;
32 35
33namespace OpenSim.Region.Communications.Local 36namespace OpenSim.Region.Communications.Local
@@ -39,12 +42,22 @@ namespace OpenSim.Region.Communications.Local
39 NetworkServersInfo serversInfo, 42 NetworkServersInfo serversInfo,
40 BaseHttpServer httpServer, 43 BaseHttpServer httpServer,
41 IAssetCache assetCache, 44 IAssetCache assetCache,
42 LocalInventoryService inventoryService,
43 IGridServices gridService,
44 LibraryRootFolder libraryRootFolder, 45 LibraryRootFolder libraryRootFolder,
45 bool dumpAssetsToFile) 46 bool dumpAssetsToFile)
46 : base(serversInfo, httpServer, assetCache, dumpAssetsToFile, libraryRootFolder) 47 : base(serversInfo, httpServer, assetCache, dumpAssetsToFile, libraryRootFolder)
47 { 48 {
49 LocalInventoryService inventoryService = new LocalInventoryService();
50 List<IInventoryDataPlugin> plugins
51 = DataPluginFactory.LoadDataPlugins<IInventoryDataPlugin>(
52 configSettings.StandaloneInventoryPlugin,
53 configSettings.StandaloneInventorySource);
54
55 foreach (IInventoryDataPlugin plugin in plugins)
56 {
57 // Using the OSP wrapper plugin for database plugins should be made configurable at some point
58 inventoryService.AddPlugin(new OspInventoryWrapperPlugin(plugin, this));
59 }
60
48 AddInventoryService(inventoryService); 61 AddInventoryService(inventoryService);
49 m_defaultInventoryHost = inventoryService.Host; 62 m_defaultInventoryHost = inventoryService.Host;
50 m_interServiceInventoryService = inventoryService; 63 m_interServiceInventoryService = inventoryService;
@@ -58,8 +71,10 @@ namespace OpenSim.Region.Communications.Local
58 m_userAdminService = lus; 71 m_userAdminService = lus;
59 m_avatarService = lus; 72 m_avatarService = lus;
60 m_messageService = lus; 73 m_messageService = lus;
61 74
62 m_gridService = gridService; 75 m_gridService = new LocalBackEndServices();
76
77 //LocalLoginService loginService = CreateLoginService(libraryRootFolder, inventoryService, userService, backendService);
63 } 78 }
64 } 79 }
65} 80}
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
index bf3097a..b0c1d0b 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
@@ -157,9 +157,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
157 // Don't use the item ID that's in the file 157 // Don't use the item ID that's in the file
158 item.ID = UUID.Random(); 158 item.ID = UUID.Random();
159 159
160 string ospResolvedId = OspResolver.ResolveOspa(item.CreatorId, m_commsManager); 160 UUID ospResolvedId = OspResolver.ResolveOspa(item.CreatorId, m_commsManager);
161 if (null != ospResolvedId) 161 if (UUID.Zero != ospResolvedId)
162 item.CreatorId = ospResolvedId; 162 item.CreatorIdAsUuid = ospResolvedId;
163 163
164 item.Owner = m_userInfo.UserProfile.ID; 164 item.Owner = m_userInfo.UserProfile.ID;
165 165
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
index 274e329..4c6045a 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
@@ -253,7 +253,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
253 = scene.CommsManager.UserProfileCacheService.GetUserDetails(userFirstName, userLastName); 253 = scene.CommsManager.UserProfileCacheService.GetUserDetails(userFirstName, userLastName);
254 InventoryItemBase foundItem = userInfo.RootFolder.FindItemByPath(itemName); 254 InventoryItemBase foundItem = userInfo.RootFolder.FindItemByPath(itemName);
255 255
256 Assert.That(foundItem.CreatorId, Is.EqualTo(user2Uuid.ToString())); 256 Assert.That(foundItem.CreatorId, Is.EqualTo(item1.CreatorId));
257 Assert.That(foundItem.CreatorIdAsUuid, Is.EqualTo(user2Uuid));
257 Assert.That(foundItem.Owner, Is.EqualTo(userUuid)); 258 Assert.That(foundItem.Owner, Is.EqualTo(userUuid));
258 259
259 Console.WriteLine("Successfully completed {0}", MethodBase.GetCurrentMethod()); 260 Console.WriteLine("Successfully completed {0}", MethodBase.GetCurrentMethod());
@@ -321,8 +322,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
321 = scene.CommsManager.UserProfileCacheService.GetUserDetails(userFirstName, userLastName); 322 = scene.CommsManager.UserProfileCacheService.GetUserDetails(userFirstName, userLastName);
322 InventoryItemBase foundItem = userInfo.RootFolder.FindItemByPath(itemName); 323 InventoryItemBase foundItem = userInfo.RootFolder.FindItemByPath(itemName);
323 324
324 Assert.That(foundItem.CreatorId, Is.EqualTo(user2Profile.ID.ToString())); 325 Assert.That(foundItem.CreatorId, Is.EqualTo(item1.CreatorId));
325 Assert.That(foundItem.Owner, Is.EqualTo(userUuid)); 326 Assert.That(
327 foundItem.CreatorIdAsUuid, Is.EqualTo(OspResolver.HashName(user2FirstName + " " + user2LastName)));
328 Assert.That(foundItem.Owner, Is.EqualTo(userUuid));
326 329
327 Console.WriteLine("### Successfully completed {0} ###", MethodBase.GetCurrentMethod()); 330 Console.WriteLine("### Successfully completed {0} ###", MethodBase.GetCurrentMethod());
328 } 331 }