aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/UserManagerBase.cs
diff options
context:
space:
mode:
authordiva2009-06-10 13:18:32 +0000
committerdiva2009-06-10 13:18:32 +0000
commit0f367bd7bbc5d22d4834e1eb0f1671381485143e (patch)
treeeeb4290f1146601f8fd97dc164e0a7f247a2fafb /OpenSim/Framework/Communications/UserManagerBase.cs
parentFrom: Alan Webb <alan_webb@us.ibm.com> (diff)
downloadopensim-SC_OLD-0f367bd7bbc5d22d4834e1eb0f1671381485143e.zip
opensim-SC_OLD-0f367bd7bbc5d22d4834e1eb0f1671381485143e.tar.gz
opensim-SC_OLD-0f367bd7bbc5d22d4834e1eb0f1671381485143e.tar.bz2
opensim-SC_OLD-0f367bd7bbc5d22d4834e1eb0f1671381485143e.tar.xz
Heart surgery no.2: the inventory service hooks.
Several improvements in the connectors themselves. Several improvements in configurations. Needed to add a hack in IUserService and UserManagerBase, to be removed when that service is refactored.
Diffstat (limited to 'OpenSim/Framework/Communications/UserManagerBase.cs')
-rw-r--r--OpenSim/Framework/Communications/UserManagerBase.cs26
1 files changed, 25 insertions, 1 deletions
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs
index c3aaa4b..898239d 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -37,6 +37,7 @@ using OpenMetaverse.StructuredData;
37using OpenSim.Data; 37using OpenSim.Data;
38using OpenSim.Framework.Communications; 38using OpenSim.Framework.Communications;
39using OpenSim.Framework.Statistics; 39using OpenSim.Framework.Statistics;
40using OpenSim.Services.Interfaces;
40 41
41namespace OpenSim.Framework.Communications 42namespace OpenSim.Framework.Communications
42{ 43{
@@ -54,6 +55,7 @@ namespace OpenSim.Framework.Communications
54 private List<IUserDataPlugin> m_plugins = new List<IUserDataPlugin>(); 55 private List<IUserDataPlugin> m_plugins = new List<IUserDataPlugin>();
55 56
56 protected CommunicationsManager m_commsManager; 57 protected CommunicationsManager m_commsManager;
58 protected IInventoryService m_InventoryService;
57 59
58 /// <summary> 60 /// <summary>
59 /// Constructor 61 /// Constructor
@@ -64,6 +66,11 @@ namespace OpenSim.Framework.Communications
64 m_commsManager = commsManager; 66 m_commsManager = commsManager;
65 } 67 }
66 68
69 public virtual void SetInventoryService(IInventoryService invService)
70 {
71 m_InventoryService = invService;
72 }
73
67 /// <summary> 74 /// <summary>
68 /// Add a new user data plugin - plugins will be requested in the order they were added. 75 /// Add a new user data plugin - plugins will be requested in the order they were added.
69 /// </summary> 76 /// </summary>
@@ -676,7 +683,24 @@ namespace OpenSim.Framework.Communications
676 } 683 }
677 else 684 else
678 { 685 {
679 m_commsManager.InterServiceInventoryService.CreateNewUserInventory(userProf.ID); 686 //
687 // WARNING: This is a horrible hack
688 // The purpose here is to avoid touching the user server at this point.
689 // There are dragons there that I can't deal with right now.
690 // diva 06/09/09
691 //
692 if (m_InventoryService != null)
693 {
694 // local service (standalone)
695 m_log.Debug("[USERSTORAGE]: using IInventoryService to create user's inventory");
696 m_InventoryService.CreateUserInventory(userProf.ID);
697 }
698 else
699 {
700 // used by the user server
701 m_log.Debug("[USERSTORAGE]: using m_commsManager.InterServiceInventoryService to create user's inventory");
702 m_commsManager.InterServiceInventoryService.CreateNewUserInventory(userProf.ID);
703 }
680 704
681 return userProf.ID; 705 return userProf.ID;
682 } 706 }