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