diff options
author | Jeff Ames | 2009-11-23 11:26:06 +0900 |
---|---|---|
committer | Jeff Ames | 2009-11-23 11:26:06 +0900 |
commit | 9f5c2acd128828d220bf7e47bd4fe13d7a2a910b (patch) | |
tree | bb1a273746c4b2a466dd705537a2457f0474faa2 /OpenSim/Region/CoreModules/Avatar | |
parent | * Added missing lock to m_forcelist when AddForce is called. When a user dr... (diff) | |
download | opensim-SC-9f5c2acd128828d220bf7e47bd4fe13d7a2a910b.zip opensim-SC-9f5c2acd128828d220bf7e47bd4fe13d7a2a910b.tar.gz opensim-SC-9f5c2acd128828d220bf7e47bd4fe13d7a2a910b.tar.bz2 opensim-SC-9f5c2acd128828d220bf7e47bd4fe13d7a2a910b.tar.xz |
Formatting cleanup.
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
5 files changed, 18 insertions, 18 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index bb4e032..d6a82ef 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | |||
@@ -395,7 +395,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
395 | 395 | ||
396 | // if it leaves, we want to know, too | 396 | // if it leaves, we want to know, too |
397 | client.OnLogout += OnLogout; | 397 | client.OnLogout += OnLogout; |
398 | client.OnGrantUserRights += GrantUserFriendRights; | 398 | client.OnGrantUserRights += GrantUserFriendRights; |
399 | 399 | ||
400 | } | 400 | } |
401 | 401 | ||
@@ -1112,8 +1112,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
1112 | } | 1112 | } |
1113 | private void GrantUserFriendRights(IClientAPI remoteClient, UUID requester, UUID target, int rights) | 1113 | private void GrantUserFriendRights(IClientAPI remoteClient, UUID requester, UUID target, int rights) |
1114 | { | 1114 | { |
1115 | ((Scene)remoteClient.Scene).CommsManager.UpdateUserFriendPerms(requester, target, (uint)rights); | 1115 | ((Scene)remoteClient.Scene).CommsManager.UpdateUserFriendPerms(requester, target, (uint)rights); |
1116 | } | 1116 | } |
1117 | 1117 | ||
1118 | public List<FriendListItem> GetUserFriends(UUID agentID) | 1118 | public List<FriendListItem> GetUserFriends(UUID agentID) |
1119 | { | 1119 | { |
@@ -1126,6 +1126,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
1126 | 1126 | ||
1127 | return fl; | 1127 | return fl; |
1128 | } | 1128 | } |
1129 | } | 1129 | } |
1130 | #endregion | 1130 | #endregion |
1131 | } | 1131 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs index aafcfa2..9e76d79 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs | |||
@@ -136,7 +136,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
136 | successfulAssetRestores); | 136 | successfulAssetRestores); |
137 | } | 137 | } |
138 | else if (filePath.StartsWith(ArchiveConstants.INVENTORY_PATH)) | 138 | else if (filePath.StartsWith(ArchiveConstants.INVENTORY_PATH)) |
139 | { | 139 | { |
140 | InventoryFolderBase foundFolder | 140 | InventoryFolderBase foundFolder |
141 | = ReplicateArchivePathToUserInventory( | 141 | = ReplicateArchivePathToUserInventory( |
142 | filePath, TarArchiveReader.TarEntryType.TYPE_DIRECTORY == entryType, | 142 | filePath, TarArchiveReader.TarEntryType.TYPE_DIRECTORY == entryType, |
@@ -254,7 +254,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
254 | 254 | ||
255 | string newFolderName = rawDirsToCreate[i].Remove(identicalNameIdentifierIndex); | 255 | string newFolderName = rawDirsToCreate[i].Remove(identicalNameIdentifierIndex); |
256 | 256 | ||
257 | newFolderName = InventoryArchiveUtils.UnescapeArchivePath(newFolderName); | 257 | newFolderName = InventoryArchiveUtils.UnescapeArchivePath(newFolderName); |
258 | UUID newFolderId = UUID.Random(); | 258 | UUID newFolderId = UUID.Random(); |
259 | 259 | ||
260 | // Asset type has to be Unknown here rather than Folder, otherwise the created folder can't be | 260 | // Asset type has to be Unknown here rather than Folder, otherwise the created folder can't be |
@@ -352,7 +352,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
352 | item.Folder = loadFolder.ID; | 352 | item.Folder = loadFolder.ID; |
353 | 353 | ||
354 | //m_userInfo.AddItem(item); | 354 | //m_userInfo.AddItem(item); |
355 | m_scene.InventoryService.AddItem(item); | 355 | m_scene.InventoryService.AddItem(item); |
356 | 356 | ||
357 | return item; | 357 | return item; |
358 | } | 358 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs index 247cee4..47b18d8 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs | |||
@@ -116,7 +116,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
116 | return startFolder; | 116 | return startFolder; |
117 | 117 | ||
118 | string[] components = SplitEscapedPath(path); | 118 | string[] components = SplitEscapedPath(path); |
119 | components[0] = UnescapePath(components[0]); | 119 | components[0] = UnescapePath(components[0]); |
120 | 120 | ||
121 | //string[] components = path.Split(new string[] { PATH_DELIMITER.ToString() }, 2, StringSplitOptions.None); | 121 | //string[] components = path.Split(new string[] { PATH_DELIMITER.ToString() }, 2, StringSplitOptions.None); |
122 | 122 | ||
@@ -306,17 +306,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
306 | public static string EscapeArchivePath(string path) | 306 | public static string EscapeArchivePath(string path) |
307 | { | 307 | { |
308 | // Only encode ampersands (for escaping anything) and / (since this is used as general dir separator). | 308 | // Only encode ampersands (for escaping anything) and / (since this is used as general dir separator). |
309 | return path.Replace("&", "&").Replace("/", "/"); | 309 | return path.Replace("&", "&").Replace("/", "/"); |
310 | } | 310 | } |
311 | 311 | ||
312 | /// <summary> | 312 | /// <summary> |
313 | /// Unescape an archive path. | 313 | /// Unescape an archive path. |
314 | /// </summary> | 314 | /// </summary> |
315 | /// <param name="path"></param> | 315 | /// <param name="path"></param> |
316 | /// <returns></returns> | 316 | /// <returns></returns> |
317 | public static string UnescapeArchivePath(string path) | 317 | public static string UnescapeArchivePath(string path) |
318 | { | 318 | { |
319 | return path.Replace("/", "/").Replace("&", "&"); | 319 | return path.Replace("/", "/").Replace("&", "&"); |
320 | } | 320 | } |
321 | } | 321 | } |
322 | } \ No newline at end of file | 322 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index bbb49f6..6e11f36 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs | |||
@@ -270,7 +270,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
270 | inventoryFolder.Name, inventoryFolder.ID, m_invPath); | 270 | inventoryFolder.Name, inventoryFolder.ID, m_invPath); |
271 | 271 | ||
272 | //recurse through all dirs getting dirs and files | 272 | //recurse through all dirs getting dirs and files |
273 | SaveInvFolder(inventoryFolder, ArchiveConstants.INVENTORY_PATH, !foundStar); | 273 | SaveInvFolder(inventoryFolder, ArchiveConstants.INVENTORY_PATH, !foundStar); |
274 | } | 274 | } |
275 | else if (inventoryItem != null) | 275 | else if (inventoryItem != null) |
276 | { | 276 | { |
@@ -278,7 +278,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
278 | "[INVENTORY ARCHIVER]: Found item {0} {1} at {2}", | 278 | "[INVENTORY ARCHIVER]: Found item {0} {1} at {2}", |
279 | inventoryItem.Name, inventoryItem.ID, m_invPath); | 279 | inventoryItem.Name, inventoryItem.ID, m_invPath); |
280 | 280 | ||
281 | SaveInvItem(inventoryItem, ArchiveConstants.INVENTORY_PATH); | 281 | SaveInvItem(inventoryItem, ArchiveConstants.INVENTORY_PATH); |
282 | } | 282 | } |
283 | else | 283 | else |
284 | { | 284 | { |
@@ -288,7 +288,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
288 | m_log.ErrorFormat("[INVENTORY ARCHIVER]: {0}", errorMessage); | 288 | m_log.ErrorFormat("[INVENTORY ARCHIVER]: {0}", errorMessage); |
289 | m_module.TriggerInventoryArchiveSaved( | 289 | m_module.TriggerInventoryArchiveSaved( |
290 | m_id, false, m_userInfo, m_invPath, m_saveStream, | 290 | m_id, false, m_userInfo, m_invPath, m_saveStream, |
291 | new Exception(errorMessage)); | 291 | new Exception(errorMessage)); |
292 | return; | 292 | return; |
293 | } | 293 | } |
294 | 294 | ||
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index f8a010c..7927352 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | |||
@@ -133,7 +133,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
133 | InventoryFolderBase objsFolder | 133 | InventoryFolderBase objsFolder |
134 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, userId, "Objects"); | 134 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, userId, "Objects"); |
135 | item1.Folder = objsFolder.ID; | 135 | item1.Folder = objsFolder.ID; |
136 | scene.AddInventoryItem(userId, item1); | 136 | scene.AddInventoryItem(userId, item1); |
137 | 137 | ||
138 | MemoryStream archiveWriteStream = new MemoryStream(); | 138 | MemoryStream archiveWriteStream = new MemoryStream(); |
139 | archiverModule.OnInventoryArchiveSaved += SaveCompleted; | 139 | archiverModule.OnInventoryArchiveSaved += SaveCompleted; |
@@ -348,7 +348,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
348 | InventoryFolderBase objsFolder | 348 | InventoryFolderBase objsFolder |
349 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, userId, "Objects"); | 349 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, userId, "Objects"); |
350 | item1.Folder = objsFolder.ID; | 350 | item1.Folder = objsFolder.ID; |
351 | scene.AddInventoryItem(userId, item1); | 351 | scene.AddInventoryItem(userId, item1); |
352 | 352 | ||
353 | MemoryStream archiveWriteStream = new MemoryStream(); | 353 | MemoryStream archiveWriteStream = new MemoryStream(); |
354 | archiverModule.OnInventoryArchiveSaved += SaveCompleted; | 354 | archiverModule.OnInventoryArchiveSaved += SaveCompleted; |
@@ -356,7 +356,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
356 | mre.Reset(); | 356 | mre.Reset(); |
357 | archiverModule.ArchiveInventory( | 357 | archiverModule.ArchiveInventory( |
358 | Guid.NewGuid(), userFirstName, userLastName, "Objects", userPassword, archiveWriteStream); | 358 | Guid.NewGuid(), userFirstName, userLastName, "Objects", userPassword, archiveWriteStream); |
359 | mre.WaitOne(60000, false); | 359 | mre.WaitOne(60000, false); |
360 | 360 | ||
361 | // LOAD ITEM | 361 | // LOAD ITEM |
362 | MemoryStream archiveReadStream = new MemoryStream(archiveWriteStream.ToArray()); | 362 | MemoryStream archiveReadStream = new MemoryStream(archiveWriteStream.ToArray()); |
@@ -373,7 +373,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
373 | // "Loaded item non-uuid creator doesn't match that of the loading user"); | 373 | // "Loaded item non-uuid creator doesn't match that of the loading user"); |
374 | Assert.That( | 374 | Assert.That( |
375 | foundItem1.Name, Is.EqualTo(itemName), | 375 | foundItem1.Name, Is.EqualTo(itemName), |
376 | "Loaded item name doesn't match saved name"); | 376 | "Loaded item name doesn't match saved name"); |
377 | } | 377 | } |
378 | 378 | ||
379 | /// <summary> | 379 | /// <summary> |