diff options
Diffstat (limited to '')
4 files changed, 41 insertions, 15 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs index c7244c8..6dd871f 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs | |||
@@ -182,9 +182,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
182 | public InventoryCollection GetFolderContent(UUID userID, UUID folderID) | 182 | public InventoryCollection GetFolderContent(UUID userID, UUID folderID) |
183 | { | 183 | { |
184 | InventoryCollection invCol = m_InventoryService.GetFolderContent(userID, folderID); | 184 | InventoryCollection invCol = m_InventoryService.GetFolderContent(userID, folderID); |
185 | if (UserManager != null) | 185 | Util.FireAndForget(delegate |
186 | foreach (InventoryItemBase item in invCol.Items) | 186 | { |
187 | UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData); | 187 | if (UserManager != null) |
188 | foreach (InventoryItemBase item in invCol.Items) | ||
189 | UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData); | ||
190 | }); | ||
188 | 191 | ||
189 | return invCol; | 192 | return invCol; |
190 | } | 193 | } |
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) |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs index a298b65..2cf02b5 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs | |||
@@ -41,6 +41,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
41 | public class LocalSimulationConnectorModule : ISharedRegionModule, ISimulationService | 41 | public class LocalSimulationConnectorModule : ISharedRegionModule, ISimulationService |
42 | { | 42 | { |
43 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 43 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
44 | // Version of this service | ||
45 | private const string m_Version = "SIMULATION/0.1"; | ||
46 | |||
44 | private List<Scene> m_sceneList = new List<Scene>(); | 47 | private List<Scene> m_sceneList = new List<Scene>(); |
45 | 48 | ||
46 | private IEntityTransferModule m_AgentTransferModule; | 49 | private IEntityTransferModule m_AgentTransferModule; |
@@ -257,9 +260,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
257 | return false; | 260 | return false; |
258 | } | 261 | } |
259 | 262 | ||
260 | public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string reason) | 263 | public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string version, out string reason) |
261 | { | 264 | { |
262 | reason = "Communications failure"; | 265 | reason = "Communications failure"; |
266 | version = m_Version; | ||
263 | if (destination == null) | 267 | if (destination == null) |
264 | return false; | 268 | return false; |
265 | 269 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs index 67f4d60..7858f2a 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs | |||
@@ -229,19 +229,20 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
229 | 229 | ||
230 | } | 230 | } |
231 | 231 | ||
232 | public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string reason) | 232 | public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string version, out string reason) |
233 | { | 233 | { |
234 | reason = "Communications failure"; | 234 | reason = "Communications failure"; |
235 | version = "Unknown"; | ||
235 | if (destination == null) | 236 | if (destination == null) |
236 | return false; | 237 | return false; |
237 | 238 | ||
238 | // Try local first | 239 | // Try local first |
239 | if (m_localBackend.QueryAccess(destination, id, position, out reason)) | 240 | if (m_localBackend.QueryAccess(destination, id, position, out version, out reason)) |
240 | return true; | 241 | return true; |
241 | 242 | ||
242 | // else do the remote thing | 243 | // else do the remote thing |
243 | if (!m_localBackend.IsLocalRegion(destination.RegionHandle)) | 244 | if (!m_localBackend.IsLocalRegion(destination.RegionHandle)) |
244 | return m_remoteConnector.QueryAccess(destination, id, position, out reason); | 245 | return m_remoteConnector.QueryAccess(destination, id, position, out version, out reason); |
245 | 246 | ||
246 | return false; | 247 | return false; |
247 | 248 | ||