diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 29 |
2 files changed, 12 insertions, 21 deletions
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index 5045c97..c4a6b31 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | |||
@@ -65,6 +65,8 @@ namespace OpenSim.Framework.Communications.Cache | |||
65 | /// <param name="userID"></param> | 65 | /// <param name="userID"></param> |
66 | public void AddNewUser(IClientAPI remoteClient) | 66 | public void AddNewUser(IClientAPI remoteClient) |
67 | { | 67 | { |
68 | m_log.DebugFormat("[USER CACHE]: Adding user profile for {0} {1}", remoteClient.Name, remoteClient.AgentId); | ||
69 | |||
68 | // Potential fix - Multithreading issue. | 70 | // Potential fix - Multithreading issue. |
69 | lock (m_userProfiles) | 71 | lock (m_userProfiles) |
70 | { | 72 | { |
@@ -92,6 +94,8 @@ namespace OpenSim.Framework.Communications.Cache | |||
92 | /// <param name="userID"></param> | 94 | /// <param name="userID"></param> |
93 | public void AddNewUser(LLUUID userID) | 95 | public void AddNewUser(LLUUID userID) |
94 | { | 96 | { |
97 | m_log.DebugFormat("[USER CACHE]: Adding user profile for {0}", userID); | ||
98 | |||
95 | // Potential fix - Multithreading issue. | 99 | // Potential fix - Multithreading issue. |
96 | lock (m_userProfiles) | 100 | lock (m_userProfiles) |
97 | { | 101 | { |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index bb3d953..178d652 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -1948,26 +1948,17 @@ namespace OpenSim.Region.Environment.Scenes | |||
1948 | // This means we need to remove the current caps handler here and possibly compensate later, | 1948 | // This means we need to remove the current caps handler here and possibly compensate later, |
1949 | // in case both scenes are being hosted on the same region server. Messy | 1949 | // in case both scenes are being hosted on the same region server. Messy |
1950 | m_scene.RemoveCapsHandler(UUID); | 1950 | m_scene.RemoveCapsHandler(UUID); |
1951 | newpos = newpos + (vel); | 1951 | newpos = newpos + (vel); |
1952 | 1952 | ||
1953 | bool crossingToRemoteRegion = neighbourRegion.ExternalHostName != m_scene.RegionInfo.ExternalHostName; | 1953 | CachedUserInfo userInfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(UUID); |
1954 | if (crossingToRemoteRegion) | 1954 | if (userInfo != null) |
1955 | { | 1955 | { |
1956 | m_scene.CommsManager.UserProfileCacheService.RemoveUser(UUID); | 1956 | userInfo.DropInventory(); |
1957 | } | 1957 | } |
1958 | else | 1958 | else |
1959 | { | 1959 | { |
1960 | CachedUserInfo userInfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(UUID); | 1960 | m_log.WarnFormat("[SCENE PRESENCE]: No cached user info found for {0} {1} on leaving region", Name, UUID); |
1961 | 1961 | } | |
1962 | if (userInfo != null) | ||
1963 | { | ||
1964 | userInfo.DropInventory(); | ||
1965 | } | ||
1966 | else | ||
1967 | { | ||
1968 | m_log.WarnFormat("[SCENE PRESENCE]: No cached user info found for {0} {1} on leaving region", Name, UUID); | ||
1969 | } | ||
1970 | } | ||
1971 | 1962 | ||
1972 | bool crossingSuccessful = | 1963 | bool crossingSuccessful = |
1973 | m_scene.InformNeighbourOfCrossing(neighbourHandle, m_controllingClient.AgentId, newpos, | 1964 | m_scene.InformNeighbourOfCrossing(neighbourHandle, m_controllingClient.AgentId, newpos, |
@@ -1995,11 +1986,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1995 | else | 1986 | else |
1996 | { | 1987 | { |
1997 | // Restore the user structures that we needed to delete before asking the receiving region to complete the crossing | 1988 | // Restore the user structures that we needed to delete before asking the receiving region to complete the crossing |
1998 | if (crossingToRemoteRegion) | 1989 | m_scene.CommsManager.UserProfileCacheService.RequestInventoryForUser(UUID); |
1999 | m_scene.CommsManager.UserProfileCacheService.AddNewUser(m_controllingClient); | ||
2000 | |||
2001 | m_scene.CommsManager.UserProfileCacheService.RequestInventoryForUser(UUID); | ||
2002 | |||
2003 | m_scene.AddCapsHandler(UUID); | 1990 | m_scene.AddCapsHandler(UUID); |
2004 | } | 1991 | } |
2005 | } | 1992 | } |