mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 18:55:58 +08:00
Thanks, lulurun, for a patch that addresses inventory problems that occur
occasionally, but are fixed on restart (issue 1919). This patch introduces the following changes: 1. when a user teleports out of Region A, remove that user's profile from the Region A user profile cache 2. when a user crosses between regions out of Region A, remove that user's profile from the Region A user profile cache 3. the user profile cache's session ID member can now be set (written), and is updated each time a connection with a new avatar is established (ie: a new avatar enters the region) 4. when a region server looks up a user profile and a cache miss occurs, fetch the user profile from the user server first instead of immediately returning null
This commit is contained in:
@@ -2015,7 +2015,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
"[SCENE]: Adding new {0} agent {1} {2} in {3}",
|
||||
(child ? "child" : "root"), client.Name, client.AgentId, RegionInfo.RegionName);
|
||||
|
||||
CommsManager.UserProfileCacheService.AddNewUser(client);
|
||||
CommsManager.UserProfileCacheService.AddNewUser(client.AgentId);
|
||||
|
||||
CreateAndAddScenePresence(client, child);
|
||||
}
|
||||
@@ -2455,6 +2455,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
agent.circuitcode, agent.AgentID, RegionInfo.RegionName);
|
||||
|
||||
m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent);
|
||||
// rewrite session_id
|
||||
CachedUserInfo userinfo = CommsManager.UserProfileCacheService.GetUserDetails(agent.AgentID);
|
||||
userinfo.SessionID = agent.SessionID;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -627,6 +627,11 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
SendCloseChildAgentConnections(avatar.UUID,avatar.GetKnownRegionList());
|
||||
}
|
||||
// if (teleport success) // seems to be always success here
|
||||
// the user may change thier profile information in other region,
|
||||
// so the userinfo in UserProfileCache is not reliable any more, delete it
|
||||
m_commsProvider.UserProfileCacheService.RemoveUser(avatar.UUID);
|
||||
m_log.InfoFormat("User {0} is going to another region, profile cache removed", avatar.UUID);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1989,6 +1989,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
m_scene.SendKillObject(m_localId);
|
||||
m_scene.NotifyMyCoarseLocationChange();
|
||||
// the user may change thier profile information in other region,
|
||||
// so the userinfo in UserProfileCache is not reliable any more, delete it
|
||||
m_scene.CommsManager.UserProfileCacheService.RemoveUser(UUID);
|
||||
m_log.InfoFormat("User {0} is going to another region, profile cache removed", UUID);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user