diff options
Merge branch 'master' into vehicles
Diffstat (limited to 'OpenSim/Framework/Communications/Cache')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | 10 | ||||
-rw-r--r-- | OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | 38 |
2 files changed, 24 insertions, 24 deletions
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs index 238810a..aa71536 100644 --- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs +++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | |||
@@ -55,7 +55,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
55 | /// Stores user profile and inventory data received from backend services for a particular user. | 55 | /// Stores user profile and inventory data received from backend services for a particular user. |
56 | /// </summary> | 56 | /// </summary> |
57 | public class CachedUserInfo | 57 | public class CachedUserInfo |
58 | { | 58 | { |
59 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 59 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
60 | 60 | ||
61 | //// <value> | 61 | //// <value> |
@@ -190,7 +190,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
190 | resolvedFolders.Add(folder); | 190 | resolvedFolders.Add(folder); |
191 | resolvedFolderDictionary[folder.ID] = folder; | 191 | resolvedFolderDictionary[folder.ID] = folder; |
192 | parentFolder.AddChildFolder(folder); | 192 | parentFolder.AddChildFolder(folder); |
193 | } | 193 | } |
194 | } | 194 | } |
195 | } // foreach (folder in pendingCategorizationFolders[parentFolder.ID]) | 195 | } // foreach (folder in pendingCategorizationFolders[parentFolder.ID]) |
196 | 196 | ||
@@ -219,7 +219,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
219 | /// <summary> | 219 | /// <summary> |
220 | /// Fetch inventory for this user. | 220 | /// Fetch inventory for this user. |
221 | /// </summary> | 221 | /// </summary> |
222 | /// This has to be executed as a separate step once user information is retreived. | 222 | /// This has to be executed as a separate step once user information is retreived. |
223 | /// This will occur synchronously if the inventory service is in the same process as this class, and | 223 | /// This will occur synchronously if the inventory service is in the same process as this class, and |
224 | /// asynchronously otherwise. | 224 | /// asynchronously otherwise. |
225 | public void FetchInventory() | 225 | public void FetchInventory() |
@@ -422,7 +422,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
422 | /// | 422 | /// |
423 | /// FIXME: We call add new inventory folder because in the data layer, we happen to use an SQL REPLACE | 423 | /// FIXME: We call add new inventory folder because in the data layer, we happen to use an SQL REPLACE |
424 | /// so this will work to rename an existing folder. Needless to say, to rely on this is very confusing, | 424 | /// so this will work to rename an existing folder. Needless to say, to rely on this is very confusing, |
425 | /// and needs to be changed. | 425 | /// and needs to be changed. |
426 | /// | 426 | /// |
427 | /// <param name="folderID"></param> | 427 | /// <param name="folderID"></param> |
428 | /// <param name="type"></param> | 428 | /// <param name="type"></param> |
@@ -500,7 +500,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
500 | InventoryFolderImpl oldParentFolder = RootFolder.FindFolder(folder.ParentID); | 500 | InventoryFolderImpl oldParentFolder = RootFolder.FindFolder(folder.ParentID); |
501 | 501 | ||
502 | if (oldParentFolder != null) | 502 | if (oldParentFolder != null) |
503 | { | 503 | { |
504 | oldParentFolder.RemoveChildFolder(folderID); | 504 | oldParentFolder.RemoveChildFolder(folderID); |
505 | parentFolder.AddChildFolder(folder); | 505 | parentFolder.AddChildFolder(folder); |
506 | } | 506 | } |
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index 7f1c7e9..9e12d948 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | |||
@@ -60,7 +60,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
60 | /// User profiles indexed by name | 60 | /// User profiles indexed by name |
61 | /// </summary> | 61 | /// </summary> |
62 | private readonly Dictionary<string, CachedUserInfo> m_userProfilesByName | 62 | private readonly Dictionary<string, CachedUserInfo> m_userProfilesByName |
63 | = new Dictionary<string, CachedUserInfo>(); | 63 | = new Dictionary<string, CachedUserInfo>(); |
64 | 64 | ||
65 | /// <summary> | 65 | /// <summary> |
66 | /// The root library folder. | 66 | /// The root library folder. |
@@ -123,35 +123,35 @@ namespace OpenSim.Framework.Communications.Cache | |||
123 | /// <summary> | 123 | /// <summary> |
124 | /// Get details of the given user. | 124 | /// Get details of the given user. |
125 | /// </summary> | 125 | /// </summary> |
126 | /// If the user isn't in cache then the user is requested from the profile service. | 126 | /// If the user isn't in cache then the user is requested from the profile service. |
127 | /// <param name="userID"></param> | 127 | /// <param name="userID"></param> |
128 | /// <returns>null if no user details are found</returns> | 128 | /// <returns>null if no user details are found</returns> |
129 | public CachedUserInfo GetUserDetails(string fname, string lname) | 129 | public CachedUserInfo GetUserDetails(string fname, string lname) |
130 | { | 130 | { |
131 | lock (m_userProfilesByName) | 131 | lock (m_userProfilesByName) |
132 | { | 132 | { |
133 | CachedUserInfo userInfo; | 133 | CachedUserInfo userInfo; |
134 | 134 | ||
135 | if (m_userProfilesByName.TryGetValue(string.Format(NAME_FORMAT, fname, lname), out userInfo)) | 135 | if (m_userProfilesByName.TryGetValue(string.Format(NAME_FORMAT, fname, lname), out userInfo)) |
136 | { | 136 | { |
137 | return userInfo; | 137 | return userInfo; |
138 | } | 138 | } |
139 | else | 139 | else |
140 | { | 140 | { |
141 | UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(fname, lname); | 141 | UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(fname, lname); |
142 | 142 | ||
143 | if (userProfile != null) | 143 | if (userProfile != null) |
144 | return AddToCaches(userProfile); | 144 | return AddToCaches(userProfile); |
145 | else | 145 | else |
146 | return null; | 146 | return null; |
147 | } | 147 | } |
148 | } | 148 | } |
149 | } | 149 | } |
150 | 150 | ||
151 | /// <summary> | 151 | /// <summary> |
152 | /// Get details of the given user. | 152 | /// Get details of the given user. |
153 | /// </summary> | 153 | /// </summary> |
154 | /// If the user isn't in cache then the user is requested from the profile service. | 154 | /// If the user isn't in cache then the user is requested from the profile service. |
155 | /// <param name="userID"></param> | 155 | /// <param name="userID"></param> |
156 | /// <returns>null if no user details are found</returns> | 156 | /// <returns>null if no user details are found</returns> |
157 | public CachedUserInfo GetUserDetails(UUID userID) | 157 | public CachedUserInfo GetUserDetails(UUID userID) |
@@ -185,20 +185,20 @@ namespace OpenSim.Framework.Communications.Cache | |||
185 | // probably by making sure that the update doesn't use the UserCacheInfo.UserProfile directly (possibly via | 185 | // probably by making sure that the update doesn't use the UserCacheInfo.UserProfile directly (possibly via |
186 | // returning a read only class from the cache). | 186 | // returning a read only class from the cache). |
187 | // public bool StoreProfile(UserProfileData userProfile) | 187 | // public bool StoreProfile(UserProfileData userProfile) |
188 | // { | 188 | // { |
189 | // lock (m_userProfilesById) | 189 | // lock (m_userProfilesById) |
190 | // { | 190 | // { |
191 | // CachedUserInfo userInfo = GetUserDetails(userProfile.ID); | 191 | // CachedUserInfo userInfo = GetUserDetails(userProfile.ID); |
192 | // | 192 | // |
193 | // if (userInfo != null) | 193 | // if (userInfo != null) |
194 | // { | 194 | // { |
195 | // userInfo.m_userProfile = userProfile; | 195 | // userInfo.m_userProfile = userProfile; |
196 | // m_commsManager.UserService.UpdateUserProfile(userProfile); | 196 | // m_commsManager.UserService.UpdateUserProfile(userProfile); |
197 | // | 197 | // |
198 | // return true; | 198 | // return true; |
199 | // } | 199 | // } |
200 | // } | 200 | // } |
201 | // | 201 | // |
202 | // return false; | 202 | // return false; |
203 | // } | 203 | // } |
204 | 204 | ||
@@ -220,7 +220,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
220 | } | 220 | } |
221 | } | 221 | } |
222 | 222 | ||
223 | return createdUserInfo; | 223 | return createdUserInfo; |
224 | } | 224 | } |
225 | 225 | ||
226 | /// <summary> | 226 | /// <summary> |
@@ -234,7 +234,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
234 | { | 234 | { |
235 | if (m_userProfilesById.ContainsKey(userId)) | 235 | if (m_userProfilesById.ContainsKey(userId)) |
236 | { | 236 | { |
237 | CachedUserInfo userInfo = m_userProfilesById[userId]; | 237 | CachedUserInfo userInfo = m_userProfilesById[userId]; |
238 | m_userProfilesById.Remove(userId); | 238 | m_userProfilesById.Remove(userId); |
239 | 239 | ||
240 | lock (m_userProfilesByName) | 240 | lock (m_userProfilesByName) |
@@ -244,7 +244,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
244 | 244 | ||
245 | return true; | 245 | return true; |
246 | } | 246 | } |
247 | } | 247 | } |
248 | 248 | ||
249 | return false; | 249 | return false; |
250 | } | 250 | } |