aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs23
1 files changed, 4 insertions, 19 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs
index 3580c27..575a190 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs
@@ -49,7 +49,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
49 private bool m_Enabled = false; 49 private bool m_Enabled = false;
50 private bool m_Initialized = false; 50 private bool m_Initialized = false;
51 private Scene m_Scene; 51 private Scene m_Scene;
52 private UserProfileCacheService m_UserProfileService;
53 private InventoryServicesConnector m_RemoteConnector; 52 private InventoryServicesConnector m_RemoteConnector;
54 53
55 public Type ReplaceableInterface 54 public Type ReplaceableInterface
@@ -114,8 +113,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
114 113
115 if (!m_Initialized) 114 if (!m_Initialized)
116 { 115 {
117 // ugh!
118 scene.CommsManager.UserProfileCacheService.SetInventoryService(this);
119 m_Initialized = true; 116 m_Initialized = true;
120 } 117 }
121 118
@@ -133,10 +130,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
133 130
134 public void RegionLoaded(Scene scene) 131 public void RegionLoaded(Scene scene)
135 { 132 {
136 m_UserProfileService = m_Scene.CommsManager.UserProfileCacheService;
137 if (m_UserProfileService != null)
138 m_log.Debug("[XXXX] Set m_UserProfileService in " + m_Scene.RegionInfo.RegionName);
139
140 if (!m_Enabled) 133 if (!m_Enabled)
141 return; 134 return;
142 135
@@ -344,21 +337,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
344 337
345 private UUID GetSessionID(UUID userID) 338 private UUID GetSessionID(UUID userID)
346 { 339 {
347 //if (m_Scene == null) 340 ScenePresence sp = null;
348 //{ 341 if (m_Scene.TryGetAvatar(userID, out sp))
349 // m_log.Debug("[INVENTORY CONNECTOR]: OOPS! scene is null");
350 //}
351
352 if (m_UserProfileService == null)
353 { 342 {
354 //m_log.Debug("[INVENTORY CONNECTOR]: OOPS! UserProfileCacheService is null"); 343 return sp.ControllingClient.SessionId;
355 return UUID.Zero;
356 } 344 }
357 345
358 CachedUserInfo uinfo = m_UserProfileService.GetUserDetails(userID); 346 m_log.DebugFormat("[INVENTORY CONNECTOR]: scene presence for {0} not found", userID);
359 if (uinfo != null)
360 return uinfo.SessionID;
361 m_log.DebugFormat("[INVENTORY CONNECTOR]: user profile for {0} not found", userID);
362 return UUID.Zero; 347 return UUID.Zero;
363 348
364 } 349 }