Doing session lookup in the right way.
parent
332d1b5f2f
commit
70d7c97e94
|
@ -393,7 +393,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
|||
{
|
||||
if (item == null)
|
||||
return null;
|
||||
|
||||
m_log.DebugFormat("[HG INVENTORY CONNECTOR]: GetItem {0} for user {1}", item.ID, item.Owner);
|
||||
if (IsLocalGridUser(item.Owner))
|
||||
return m_GridService.GetItem(item);
|
||||
else
|
||||
|
@ -445,10 +445,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
|||
|
||||
private UUID GetSessionID(UUID userID)
|
||||
{
|
||||
ScenePresence sp = m_Scene.GetScenePresence(userID);
|
||||
if (sp != null)
|
||||
return sp.ControllingClient.SessionId;
|
||||
CachedUserInfo uinfo = m_UserProfileService.GetUserDetails(userID);
|
||||
if (uinfo != null)
|
||||
return uinfo.SessionID;
|
||||
|
||||
m_log.DebugFormat("[HG INVENTORY CONNECTOR]: user profile for {0} not found", userID);
|
||||
return UUID.Zero;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ using System.Reflection;
|
|||
using Nini.Config;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Statistics;
|
||||
using OpenSim.Framework.Communications.Cache;
|
||||
using OpenSim.Services.Connectors;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
|
@ -313,11 +314,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
|||
|
||||
private UUID GetSessionID(UUID userID)
|
||||
{
|
||||
ScenePresence sp = m_Scene.GetScenePresence(userID);
|
||||
if (sp != null)
|
||||
return sp.ControllingClient.SessionId;
|
||||
|
||||
CachedUserInfo uinfo = m_Scene.CommsManager.UserProfileCacheService.GetUserDetails(userID);
|
||||
if (uinfo != null)
|
||||
return uinfo.SessionID;
|
||||
m_log.DebugFormat("[INVENTORY CONNECTOR]: user profile for {0} not found", userID);
|
||||
return UUID.Zero;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue