From 156604e28e51d0a7e0c8018ce10eb517a9123ce4 Mon Sep 17 00:00:00 2001 From: diva Date: Thu, 11 Jun 2009 03:00:25 +0000 Subject: InterServiceInventoryService references *almost* completely removed from the simulator. Only a couple left, not important. Also updated the login tests -- Justin, this time I was able to fix this by myself :) --- .../Communications/Services/LoginService.cs | 27 ++++++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'OpenSim/Framework/Communications/Services/LoginService.cs') diff --git a/OpenSim/Framework/Communications/Services/LoginService.cs b/OpenSim/Framework/Communications/Services/LoginService.cs index 900a3d9..7eb98d7 100644 --- a/OpenSim/Framework/Communications/Services/LoginService.cs +++ b/OpenSim/Framework/Communications/Services/LoginService.cs @@ -41,6 +41,7 @@ using OpenMetaverse.StructuredData; using OpenSim.Framework; using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Statistics; +using OpenSim.Services.Interfaces; namespace OpenSim.Framework.Communications.Services { @@ -66,7 +67,9 @@ namespace OpenSim.Framework.Communications.Services /// /// Used by the login service to make requests to the inventory service. /// - protected IInterServiceInventoryServices m_inventoryService; + protected IInterServiceInventoryServices m_interInventoryService; + // Hack + protected IInventoryService m_InventoryService; /// /// Constructor @@ -1047,7 +1050,10 @@ namespace OpenSim.Framework.Communications.Services List gestures = null; try { - gestures = m_inventoryService.GetActiveGestures(theUser.ID); + if (m_InventoryService != null) + gestures = m_InventoryService.GetActiveGestures(theUser.ID); + else + gestures = m_interInventoryService.GetActiveGestures(theUser.ID); } catch (Exception e) { @@ -1076,7 +1082,15 @@ namespace OpenSim.Framework.Communications.Services /// This will be thrown if there is a problem with the inventory service protected InventoryData GetInventorySkeleton(UUID userID) { - List folders = m_inventoryService.GetInventorySkeleton(userID); + List folders = null; + if (m_InventoryService != null) + { + folders = m_InventoryService.GetInventorySkeleton(userID); + } + else + { + folders = m_interInventoryService.GetInventorySkeleton(userID); + } // If we have user auth but no inventory folders for some reason, create a new set of folders. if (folders == null || folders.Count == 0) @@ -1088,7 +1102,7 @@ namespace OpenSim.Framework.Communications.Services // tools are creating the user profile directly in the database without creating the inventory. At // this time we'll accomodate them by lazily creating the user inventory now if it doesn't already // exist. - if (!m_inventoryService.CreateNewUserInventory(userID)) + if ((m_interInventoryService != null) && !m_interInventoryService.CreateNewUserInventory(userID)) { throw new Exception( String.Format( @@ -1099,7 +1113,10 @@ namespace OpenSim.Framework.Communications.Services m_log.InfoFormat("[LOGIN]: A new inventory skeleton was successfully created for user {0}", userID); - folders = m_inventoryService.GetInventorySkeleton(userID); + if (m_InventoryService != null) + folders = m_InventoryService.GetInventorySkeleton(userID); + else + folders = m_interInventoryService.GetInventorySkeleton(userID); if (folders == null || folders.Count == 0) { -- cgit v1.1