diff options
Diffstat (limited to 'OpenSim/Framework/Communications/Cache')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | 23 |
2 files changed, 24 insertions, 1 deletions
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs index 32c235a..98ec287 100644 --- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs +++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | |||
@@ -65,7 +65,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
65 | private readonly CommunicationsManager m_commsManager; | 65 | private readonly CommunicationsManager m_commsManager; |
66 | 66 | ||
67 | public UserProfileData UserProfile { get { return m_userProfile; } } | 67 | public UserProfileData UserProfile { get { return m_userProfile; } } |
68 | private readonly UserProfileData m_userProfile; | 68 | protected internal UserProfileData m_userProfile; |
69 | 69 | ||
70 | /// <summary> | 70 | /// <summary> |
71 | /// Have we received the user's inventory from the inventory service? | 71 | /// Have we received the user's inventory from the inventory service? |
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index 714e279..36fe6e3 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | |||
@@ -169,6 +169,29 @@ namespace OpenSim.Framework.Communications.Cache | |||
169 | } | 169 | } |
170 | 170 | ||
171 | /// <summary> | 171 | /// <summary> |
172 | /// Update an existing profile | ||
173 | /// </summary> | ||
174 | /// <param name="userProfile"></param> | ||
175 | /// <returns>true if a user profile was found to update, false otherwise</returns> | ||
176 | public bool UpdateProfile(UserProfileData userProfile) | ||
177 | { | ||
178 | lock (m_userProfilesById) | ||
179 | { | ||
180 | CachedUserInfo userInfo = GetUserDetails(userProfile.ID); | ||
181 | |||
182 | if (userInfo != null) | ||
183 | { | ||
184 | userInfo.m_userProfile = userProfile; | ||
185 | m_commsManager.UserService.UpdateUserProfile(userProfile); | ||
186 | |||
187 | return true; | ||
188 | } | ||
189 | } | ||
190 | |||
191 | return false; | ||
192 | } | ||
193 | |||
194 | /// <summary> | ||
172 | /// Populate caches with the given user profile | 195 | /// Populate caches with the given user profile |
173 | /// </summary> | 196 | /// </summary> |
174 | /// <param name="userProfile"></param> | 197 | /// <param name="userProfile"></param> |