diff options
author | lbsa71 | 2007-12-27 21:41:48 +0000 |
---|---|---|
committer | lbsa71 | 2007-12-27 21:41:48 +0000 |
commit | efd90b56b761219af6425b1c7a2cdd3b6ffb4de2 (patch) | |
tree | bf5b897e1e3c13211e3e2fc61d30508b94c928c0 /OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | |
parent | * removed always true if (diff) | |
download | opensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.zip opensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.gz opensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.bz2 opensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.xz |
* Optimized usings
* shortened references
* Removed redundant 'this'
* Normalized EOF
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index 47f970e..14670fd 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | |||
@@ -130,7 +130,8 @@ namespace OpenSim.Framework.Communications.Cache | |||
130 | } | 130 | } |
131 | } | 131 | } |
132 | 132 | ||
133 | public void HandleUpdateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort type, string name, LLUUID parentID) | 133 | public void HandleUpdateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort type, string name, |
134 | LLUUID parentID) | ||
134 | { | 135 | { |
135 | CachedUserInfo userProfile; | 136 | CachedUserInfo userProfile; |
136 | 137 | ||
@@ -143,7 +144,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
143 | baseFolder.folderID = folderID; | 144 | baseFolder.folderID = folderID; |
144 | baseFolder.name = name; | 145 | baseFolder.name = name; |
145 | baseFolder.parentID = parentID; | 146 | baseFolder.parentID = parentID; |
146 | baseFolder.type = (short)type; | 147 | baseFolder.type = (short) type; |
147 | baseFolder.version = userProfile.RootFolder.version; | 148 | baseFolder.version = userProfile.RootFolder.version; |
148 | m_parent.InventoryService.AddNewInventoryFolder(remoteClient.AgentId, baseFolder); | 149 | m_parent.InventoryService.AddNewInventoryFolder(remoteClient.AgentId, baseFolder); |
149 | } | 150 | } |
@@ -180,12 +181,12 @@ namespace OpenSim.Framework.Communications.Cache | |||
180 | bool fetchFolders, bool fetchItems, int sortOrder) | 181 | bool fetchFolders, bool fetchItems, int sortOrder) |
181 | { | 182 | { |
182 | // XXX We're not handling sortOrder yet! | 183 | // XXX We're not handling sortOrder yet! |
183 | 184 | ||
184 | InventoryFolderImpl fold = null; | 185 | InventoryFolderImpl fold = null; |
185 | if (folderID == libraryRoot.folderID) | 186 | if (folderID == libraryRoot.folderID) |
186 | { | 187 | { |
187 | remoteClient.SendInventoryFolderDetails( | 188 | remoteClient.SendInventoryFolderDetails( |
188 | libraryRoot.agentID, libraryRoot.folderID, libraryRoot.RequestListOfItems(), | 189 | libraryRoot.agentID, libraryRoot.folderID, libraryRoot.RequestListOfItems(), |
189 | libraryRoot.RequestListOfFolders(), fetchFolders, fetchItems); | 190 | libraryRoot.RequestListOfFolders(), fetchFolders, fetchItems); |
190 | 191 | ||
191 | return; | 192 | return; |
@@ -194,7 +195,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
194 | if ((fold = libraryRoot.HasSubFolder(folderID)) != null) | 195 | if ((fold = libraryRoot.HasSubFolder(folderID)) != null) |
195 | { | 196 | { |
196 | remoteClient.SendInventoryFolderDetails( | 197 | remoteClient.SendInventoryFolderDetails( |
197 | libraryRoot.agentID, folderID, fold.RequestListOfItems(), | 198 | libraryRoot.agentID, folderID, fold.RequestListOfItems(), |
198 | fold.RequestListOfFolders(), fetchFolders, fetchItems); | 199 | fold.RequestListOfFolders(), fetchFolders, fetchItems); |
199 | 200 | ||
200 | return; | 201 | return; |
@@ -209,9 +210,9 @@ namespace OpenSim.Framework.Communications.Cache | |||
209 | { | 210 | { |
210 | remoteClient.SendInventoryFolderDetails( | 211 | remoteClient.SendInventoryFolderDetails( |
211 | remoteClient.AgentId, folderID, userProfile.RootFolder.RequestListOfItems(), | 212 | remoteClient.AgentId, folderID, userProfile.RootFolder.RequestListOfItems(), |
212 | userProfile.RootFolder.RequestListOfFolders(), | 213 | userProfile.RootFolder.RequestListOfFolders(), |
213 | fetchFolders, fetchItems); | 214 | fetchFolders, fetchItems); |
214 | 215 | ||
215 | return; | 216 | return; |
216 | } | 217 | } |
217 | else | 218 | else |
@@ -219,9 +220,9 @@ namespace OpenSim.Framework.Communications.Cache | |||
219 | if ((fold = userProfile.RootFolder.HasSubFolder(folderID)) != null) | 220 | if ((fold = userProfile.RootFolder.HasSubFolder(folderID)) != null) |
220 | { | 221 | { |
221 | remoteClient.SendInventoryFolderDetails( | 222 | remoteClient.SendInventoryFolderDetails( |
222 | remoteClient.AgentId, folderID, fold.RequestListOfItems(), | 223 | remoteClient.AgentId, folderID, fold.RequestListOfItems(), |
223 | fold.RequestListOfFolders(), fetchFolders, fetchItems); | 224 | fold.RequestListOfFolders(), fetchFolders, fetchItems); |
224 | 225 | ||
225 | return; | 226 | return; |
226 | } | 227 | } |
227 | } | 228 | } |
@@ -230,20 +231,20 @@ namespace OpenSim.Framework.Communications.Cache | |||
230 | { | 231 | { |
231 | MainLog.Instance.Error( | 232 | MainLog.Instance.Error( |
232 | "INVENTORYCACHE", "Could not find root folder for user {0}", remoteClient.Name); | 233 | "INVENTORYCACHE", "Could not find root folder for user {0}", remoteClient.Name); |
233 | 234 | ||
234 | return; | 235 | return; |
235 | } | 236 | } |
236 | } | 237 | } |
237 | else | 238 | else |
238 | { | 239 | { |
239 | MainLog.Instance.Error( | 240 | MainLog.Instance.Error( |
240 | "INVENTORYCACHE", | 241 | "INVENTORYCACHE", |
241 | "Could not find user profile for {0} for folder {1}", | 242 | "Could not find user profile for {0} for folder {1}", |
242 | remoteClient.Name, folderID); | 243 | remoteClient.Name, folderID); |
243 | 244 | ||
244 | return; | 245 | return; |
245 | } | 246 | } |
246 | 247 | ||
247 | // If we've reached this point then we couldn't find the folder, even though the client thinks | 248 | // If we've reached this point then we couldn't find the folder, even though the client thinks |
248 | // it exists | 249 | // it exists |
249 | MainLog.Instance.Error( | 250 | MainLog.Instance.Error( |
@@ -262,8 +263,8 @@ namespace OpenSim.Framework.Communications.Cache | |||
262 | InventoryFolderImpl subFolder = userProfile.RootFolder.HasSubFolder(folderID); | 263 | InventoryFolderImpl subFolder = userProfile.RootFolder.HasSubFolder(folderID); |
263 | if (subFolder != null) | 264 | if (subFolder != null) |
264 | { | 265 | { |
265 | List<InventoryItemBase> items=subFolder.RequestListOfItems(); | 266 | List<InventoryItemBase> items = subFolder.RequestListOfItems(); |
266 | foreach(InventoryItemBase item in items) | 267 | foreach (InventoryItemBase item in items) |
267 | { | 268 | { |
268 | userProfile.DeleteItem(remoteClient.AgentId, item); | 269 | userProfile.DeleteItem(remoteClient.AgentId, item); |
269 | } | 270 | } |
@@ -300,4 +301,4 @@ namespace OpenSim.Framework.Communications.Cache | |||
300 | m_parent.InventoryService.RequestInventoryForUser(userID, userInfo.FolderReceive, userInfo.ItemReceive); | 301 | m_parent.InventoryService.RequestInventoryForUser(userID, userInfo.FolderReceive, userInfo.ItemReceive); |
301 | } | 302 | } |
302 | } | 303 | } |
303 | } | 304 | } \ No newline at end of file |