diff --git a/OpenMetaverse/AssetManager.cs b/OpenMetaverse/AssetManager.cs
index aae4cfe0..80654c9f 100644
--- a/OpenMetaverse/AssetManager.cs
+++ b/OpenMetaverse/AssetManager.cs
@@ -402,7 +402,7 @@ namespace OpenMetaverse
/// The callback to fire when the simulator responds with the asset data
public void RequestAsset(UUID assetID, AssetType type, bool priority, AssetReceivedCallback callback)
{
- RequestAsset(assetID, type, priority, SourceType.Asset, callback);
+ RequestAsset(assetID, type, priority, SourceType.Asset, UUID.Random(), callback);
}
///
@@ -414,9 +414,22 @@ namespace OpenMetaverse
/// Source location of the requested asset
/// The callback to fire when the simulator responds with the asset data
public void RequestAsset(UUID assetID, AssetType type, bool priority, SourceType sourceType, AssetReceivedCallback callback)
+ {
+ RequestAsset(assetID, type, priority, sourceType, UUID.Random(), callback);
+ }
+
+ ///
+ /// Request an asset download
+ ///
+ /// Asset UUID
+ /// Asset type, must be correct for the transfer to succeed
+ /// Whether to give this transfer an elevated priority
+ /// Source location of the requested asset
+ /// The callback to fire when the simulator responds with the asset data
+ public void RequestAsset(UUID assetID, AssetType type, bool priority, SourceType sourceType, UUID transactionID, AssetReceivedCallback callback)
{
AssetDownload transfer = new AssetDownload();
- transfer.ID = UUID.Random();
+ transfer.ID = transactionID;
transfer.AssetID = assetID;
//transfer.AssetType = type; // Set in TransferInfoHandler.
transfer.Priority = 100.0f + (priority ? 1.0f : 0.0f);
diff --git a/OpenMetaverseTypes/Parallel.cs b/OpenMetaverseTypes/Parallel.cs
index 62b2cbfa..4e49fc60 100644
--- a/OpenMetaverseTypes/Parallel.cs
+++ b/OpenMetaverseTypes/Parallel.cs
@@ -116,7 +116,6 @@ namespace OpenMetaverse
int counter = threadCount;
AutoResetEvent threadFinishEvent = new AutoResetEvent(false);
IEnumerator enumerator = enumerable.GetEnumerator();
- object syncRoot = new Object();
Exception exception = null;
for (int i = 0; i < threadCount; i++)
@@ -130,7 +129,7 @@ namespace OpenMetaverse
{
T entry;
- lock (syncRoot)
+ lock (enumerator)
{
if (!enumerator.MoveNext())
break;