Added an overload to AssetManager.RequestAsset() that takes a transactionID
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3044 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
@@ -402,7 +402,7 @@ namespace OpenMetaverse
|
||||
/// <param name="callback">The callback to fire when the simulator responds with the asset data</param>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -414,9 +414,22 @@ namespace OpenMetaverse
|
||||
/// <param name="sourceType">Source location of the requested asset</param>
|
||||
/// <param name="callback">The callback to fire when the simulator responds with the asset data</param>
|
||||
public void RequestAsset(UUID assetID, AssetType type, bool priority, SourceType sourceType, AssetReceivedCallback callback)
|
||||
{
|
||||
RequestAsset(assetID, type, priority, sourceType, UUID.Random(), callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Request an asset download
|
||||
/// </summary>
|
||||
/// <param name="assetID">Asset UUID</param>
|
||||
/// <param name="type">Asset type, must be correct for the transfer to succeed</param>
|
||||
/// <param name="priority">Whether to give this transfer an elevated priority</param>
|
||||
/// <param name="sourceType">Source location of the requested asset</param>
|
||||
/// <param name="callback">The callback to fire when the simulator responds with the asset data</param>
|
||||
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);
|
||||
|
||||
@@ -116,7 +116,6 @@ namespace OpenMetaverse
|
||||
int counter = threadCount;
|
||||
AutoResetEvent threadFinishEvent = new AutoResetEvent(false);
|
||||
IEnumerator<T> 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;
|
||||
|
||||
Reference in New Issue
Block a user