* correct bug from last commit - for now don't drop cached user profile when an agent is downgraded to a child agent
* since upgrading to a root agent doesn't currently re-retrieve the user profile0.6.0-stable
parent
43b2ff1d11
commit
10e0df0a2d
|
@ -65,6 +65,8 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
/// <param name="userID"></param>
|
||||
public void AddNewUser(IClientAPI remoteClient)
|
||||
{
|
||||
m_log.DebugFormat("[USER CACHE]: Adding user profile for {0} {1}", remoteClient.Name, remoteClient.AgentId);
|
||||
|
||||
// Potential fix - Multithreading issue.
|
||||
lock (m_userProfiles)
|
||||
{
|
||||
|
@ -92,6 +94,8 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
/// <param name="userID"></param>
|
||||
public void AddNewUser(LLUUID userID)
|
||||
{
|
||||
m_log.DebugFormat("[USER CACHE]: Adding user profile for {0}", userID);
|
||||
|
||||
// Potential fix - Multithreading issue.
|
||||
lock (m_userProfiles)
|
||||
{
|
||||
|
|
|
@ -1950,15 +1950,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
m_scene.RemoveCapsHandler(UUID);
|
||||
newpos = newpos + (vel);
|
||||
|
||||
bool crossingToRemoteRegion = neighbourRegion.ExternalHostName != m_scene.RegionInfo.ExternalHostName;
|
||||
if (crossingToRemoteRegion)
|
||||
{
|
||||
m_scene.CommsManager.UserProfileCacheService.RemoveUser(UUID);
|
||||
}
|
||||
else
|
||||
{
|
||||
CachedUserInfo userInfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(UUID);
|
||||
|
||||
if (userInfo != null)
|
||||
{
|
||||
userInfo.DropInventory();
|
||||
|
@ -1967,7 +1959,6 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
{
|
||||
m_log.WarnFormat("[SCENE PRESENCE]: No cached user info found for {0} {1} on leaving region", Name, UUID);
|
||||
}
|
||||
}
|
||||
|
||||
bool crossingSuccessful =
|
||||
m_scene.InformNeighbourOfCrossing(neighbourHandle, m_controllingClient.AgentId, newpos,
|
||||
|
@ -1995,11 +1986,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
else
|
||||
{
|
||||
// Restore the user structures that we needed to delete before asking the receiving region to complete the crossing
|
||||
if (crossingToRemoteRegion)
|
||||
m_scene.CommsManager.UserProfileCacheService.AddNewUser(m_controllingClient);
|
||||
|
||||
m_scene.CommsManager.UserProfileCacheService.RequestInventoryForUser(UUID);
|
||||
|
||||
m_scene.AddCapsHandler(UUID);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue