Merge commit '8fb3e71b14e28bf8a4ddb72e3d1b529128f090ce' into bigmerge

Conflicts:
	OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
avinationmerge
Melanie 2011-10-11 21:06:06 +01:00
commit c95c8ab246
2 changed files with 18 additions and 12 deletions

View File

@ -185,15 +185,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
public InventoryCollection GetFolderContent(UUID userID, UUID folderID) public InventoryCollection GetFolderContent(UUID userID, UUID folderID)
{ {
InventoryCollection invCol = m_InventoryService.GetFolderContent(userID, folderID); InventoryCollection invCol = m_InventoryService.GetFolderContent(userID, folderID);
Util.FireAndForget(delegate
if (UserManager != null)
{ {
if (UserManager != null) // Protect ourselves against the caller subsequently modifying the items list
List<InventoryItemBase> items = new List<InventoryItemBase>(invCol.Items);
Util.FireAndForget(delegate
{ {
// Protect ourselves against the caller subsequently modifying the items list foreach (InventoryItemBase item in items)
foreach (InventoryItemBase item in new List<InventoryItemBase>(invCol.Items))
UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData); UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData);
} });
}); }
return invCol; return invCol;
} }

View File

@ -193,15 +193,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
public InventoryCollection GetFolderContent(UUID userID, UUID folderID) public InventoryCollection GetFolderContent(UUID userID, UUID folderID)
{ {
InventoryCollection invCol = m_RemoteConnector.GetFolderContent(userID, folderID); InventoryCollection invCol = m_RemoteConnector.GetFolderContent(userID, folderID);
Util.FireAndForget(delegate
if (UserManager != null)
{ {
if (UserManager != null) // Protect ourselves against the caller subsequently modifying the items list
List<InventoryItemBase> items = new List<InventoryItemBase>(invCol.Items);
Util.FireAndForget(delegate
{ {
// Protect ourselves against the caller subsequently modifying the items list foreach (InventoryItemBase item in items)
foreach (InventoryItemBase item in new List<InventoryItemBase>(invCol.Items))
UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData); UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData);
} });
}); }
return invCol; return invCol;
} }