diff options
Made things consistent between LocalInventoryServiceConnector and RemoteXInventoryServiceConnector on GetFolderContent.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs index bd01bb9..8f1f257 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs | |||
@@ -46,10 +46,22 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
46 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 46 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
47 | 47 | ||
48 | private bool m_Enabled = false; | 48 | private bool m_Enabled = false; |
49 | private bool m_Initialized = false; | 49 | private Scene m_Scene; |
50 | // private Scene m_Scene; | ||
51 | private XInventoryServicesConnector m_RemoteConnector; | 50 | private XInventoryServicesConnector m_RemoteConnector; |
52 | 51 | ||
52 | private IUserManagement m_UserManager; | ||
53 | private IUserManagement UserManager | ||
54 | { | ||
55 | get | ||
56 | { | ||
57 | if (m_UserManager == null) | ||
58 | { | ||
59 | m_UserManager = m_Scene.RequestModuleInterface<IUserManagement>(); | ||
60 | } | ||
61 | return m_UserManager; | ||
62 | } | ||
63 | } | ||
64 | |||
53 | public Type ReplaceableInterface | 65 | public Type ReplaceableInterface |
54 | { | 66 | { |
55 | get { return null; } | 67 | get { return null; } |
@@ -114,12 +126,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
114 | if (!m_Enabled) | 126 | if (!m_Enabled) |
115 | return; | 127 | return; |
116 | 128 | ||
117 | if (!m_Initialized) | ||
118 | { | ||
119 | m_Initialized = true; | ||
120 | } | ||
121 | |||
122 | scene.RegisterModuleInterface<IInventoryService>(this); | 129 | scene.RegisterModuleInterface<IInventoryService>(this); |
130 | |||
131 | if (m_Scene == null) | ||
132 | m_Scene = scene; | ||
123 | } | 133 | } |
124 | 134 | ||
125 | public void RemoveRegion(Scene scene) | 135 | public void RemoveRegion(Scene scene) |
@@ -173,7 +183,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
173 | 183 | ||
174 | public InventoryCollection GetFolderContent(UUID userID, UUID folderID) | 184 | public InventoryCollection GetFolderContent(UUID userID, UUID folderID) |
175 | { | 185 | { |
176 | return m_RemoteConnector.GetFolderContent(userID, folderID); | 186 | InventoryCollection invCol = m_RemoteConnector.GetFolderContent(userID, folderID); |
187 | Util.FireAndForget(delegate | ||
188 | { | ||
189 | if (UserManager != null) | ||
190 | foreach (InventoryItemBase item in invCol.Items) | ||
191 | UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData); | ||
192 | }); | ||
193 | |||
194 | return invCol; | ||
177 | } | 195 | } |
178 | 196 | ||
179 | public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID) | 197 | public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID) |