diff options
author | Justin Clarke Casey | 2008-08-01 19:24:48 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-08-01 19:24:48 +0000 |
commit | 10e0df0a2d757fbdfe76b6c60d8939fd17c42451 (patch) | |
tree | cb814f714fd643869f1e776a08fd4cebd0b235f5 /OpenSim/Region/Environment | |
parent | * Drop cached inventory from the local region when a user crosses out into a ... (diff) | |
download | opensim-SC-10e0df0a2d757fbdfe76b6c60d8939fd17c42451.zip opensim-SC-10e0df0a2d757fbdfe76b6c60d8939fd17c42451.tar.gz opensim-SC-10e0df0a2d757fbdfe76b6c60d8939fd17c42451.tar.bz2 opensim-SC-10e0df0a2d757fbdfe76b6c60d8939fd17c42451.tar.xz |
* 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 profile
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 29 |
1 files changed, 8 insertions, 21 deletions
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 | } |