diff options
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut')
2 files changed, 46 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs index ab6be50..c7244c8 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs | |||
@@ -49,6 +49,21 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
49 | 49 | ||
50 | private IInventoryService m_InventoryService; | 50 | private IInventoryService m_InventoryService; |
51 | 51 | ||
52 | private Scene m_Scene; | ||
53 | |||
54 | private IUserManagement m_UserManager; | ||
55 | private IUserManagement UserManager | ||
56 | { | ||
57 | get | ||
58 | { | ||
59 | if (m_UserManager == null) | ||
60 | { | ||
61 | m_UserManager = m_Scene.RequestModuleInterface<IUserManagement>(); | ||
62 | } | ||
63 | return m_UserManager; | ||
64 | } | ||
65 | } | ||
66 | |||
52 | private bool m_Enabled = false; | 67 | private bool m_Enabled = false; |
53 | 68 | ||
54 | public Type ReplaceableInterface | 69 | public Type ReplaceableInterface |
@@ -115,6 +130,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
115 | return; | 130 | return; |
116 | 131 | ||
117 | scene.RegisterModuleInterface<IInventoryService>(this); | 132 | scene.RegisterModuleInterface<IInventoryService>(this); |
133 | |||
134 | if (m_Scene == null) | ||
135 | m_Scene = scene; | ||
118 | } | 136 | } |
119 | 137 | ||
120 | public void RemoveRegion(Scene scene) | 138 | public void RemoveRegion(Scene scene) |
@@ -163,7 +181,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
163 | 181 | ||
164 | public InventoryCollection GetFolderContent(UUID userID, UUID folderID) | 182 | public InventoryCollection GetFolderContent(UUID userID, UUID folderID) |
165 | { | 183 | { |
166 | return m_InventoryService.GetFolderContent(userID, folderID); | 184 | InventoryCollection invCol = m_InventoryService.GetFolderContent(userID, folderID); |
185 | if (UserManager != null) | ||
186 | foreach (InventoryItemBase item in invCol.Items) | ||
187 | UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData); | ||
188 | |||
189 | return invCol; | ||
167 | } | 190 | } |
168 | 191 | ||
169 | public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID) | 192 | public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID) |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs index 17d80c7..9213132 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs | |||
@@ -47,9 +47,23 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
47 | 47 | ||
48 | private bool m_Enabled = false; | 48 | private bool m_Enabled = false; |
49 | private bool m_Initialized = false; | 49 | private bool m_Initialized = false; |
50 | // private Scene m_Scene; | 50 | private Scene m_Scene; |
51 | private InventoryServicesConnector m_RemoteConnector; | 51 | private InventoryServicesConnector m_RemoteConnector; |
52 | 52 | ||
53 | private IUserManagement m_UserManager; | ||
54 | private IUserManagement UserManager | ||
55 | { | ||
56 | get | ||
57 | { | ||
58 | if (m_UserManager == null) | ||
59 | { | ||
60 | m_UserManager = m_Scene.RequestModuleInterface<IUserManagement>(); | ||
61 | } | ||
62 | return m_UserManager; | ||
63 | } | ||
64 | } | ||
65 | |||
66 | |||
53 | public Type ReplaceableInterface | 67 | public Type ReplaceableInterface |
54 | { | 68 | { |
55 | get { return null; } | 69 | get { return null; } |
@@ -116,6 +130,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
116 | 130 | ||
117 | scene.RegisterModuleInterface<IInventoryService>(this); | 131 | scene.RegisterModuleInterface<IInventoryService>(this); |
118 | m_cache.AddRegion(scene); | 132 | m_cache.AddRegion(scene); |
133 | |||
134 | if (m_Scene == null) | ||
135 | m_Scene = scene; | ||
119 | } | 136 | } |
120 | 137 | ||
121 | public void RemoveRegion(Scene scene) | 138 | public void RemoveRegion(Scene scene) |
@@ -186,7 +203,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
186 | UUID sessionID = GetSessionID(userID); | 203 | UUID sessionID = GetSessionID(userID); |
187 | try | 204 | try |
188 | { | 205 | { |
189 | return m_RemoteConnector.GetFolderContent(userID.ToString(), folderID, sessionID); | 206 | InventoryCollection invCol = m_RemoteConnector.GetFolderContent(userID.ToString(), folderID, sessionID); |
207 | foreach (InventoryItemBase item in invCol.Items) | ||
208 | UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData); | ||
209 | return invCol; | ||
190 | } | 210 | } |
191 | catch (Exception e) | 211 | catch (Exception e) |
192 | { | 212 | { |