diff options
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs | 21 |
2 files changed, 12 insertions, 13 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 2ddb599..fceda80 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -605,8 +605,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
605 | // so.Name, so.AttachedAvatar, url); | 605 | // so.Name, so.AttachedAvatar, url); |
606 | 606 | ||
607 | IDictionary<UUID, sbyte> ids = new Dictionary<UUID, sbyte>(); | 607 | IDictionary<UUID, sbyte> ids = new Dictionary<UUID, sbyte>(); |
608 | IteratingHGUuidGatherer uuidGatherer | 608 | HGUuidGatherer uuidGatherer |
609 | = new IteratingHGUuidGatherer(Scene.AssetService, url, ids); | 609 | = new HGUuidGatherer(Scene.AssetService, url, ids); |
610 | uuidGatherer.AddForInspection(so); | 610 | uuidGatherer.AddForInspection(so); |
611 | 611 | ||
612 | while (!uuidGatherer.Complete) | 612 | while (!uuidGatherer.Complete) |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs index 2ac1517..6343a81 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs | |||
@@ -412,12 +412,13 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
412 | 412 | ||
413 | // The act of gathering UUIDs downloads some assets from the remote server | 413 | // The act of gathering UUIDs downloads some assets from the remote server |
414 | // but not all... | 414 | // but not all... |
415 | Dictionary<UUID, sbyte> ids = new Dictionary<UUID, sbyte>(); | ||
416 | HGUuidGatherer uuidGatherer = new HGUuidGatherer(m_scene.AssetService, userAssetURL); | 415 | HGUuidGatherer uuidGatherer = new HGUuidGatherer(m_scene.AssetService, userAssetURL); |
417 | uuidGatherer.GatherAssetUuids(assetID, meta.Type, ids); | 416 | uuidGatherer.AddForInspection(assetID); |
418 | m_log.DebugFormat("[HG ASSET MAPPER]: Preparing to get {0} assets", ids.Count); | 417 | uuidGatherer.GatherAll(); |
418 | |||
419 | m_log.DebugFormat("[HG ASSET MAPPER]: Preparing to get {0} assets", uuidGatherer.GatheredUuids.Count); | ||
419 | bool success = true; | 420 | bool success = true; |
420 | foreach (UUID uuid in ids.Keys) | 421 | foreach (UUID uuid in uuidGatherer.GatheredUuids.Keys) |
421 | if (FetchAsset(userAssetURL, uuid) == null) | 422 | if (FetchAsset(userAssetURL, uuid) == null) |
422 | success = false; | 423 | success = false; |
423 | 424 | ||
@@ -428,7 +429,6 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
428 | m_log.DebugFormat("[HG ASSET MAPPER]: Successfully got item {0} from asset server {1}", assetID, userAssetURL); | 429 | m_log.DebugFormat("[HG ASSET MAPPER]: Successfully got item {0} from asset server {1}", assetID, userAssetURL); |
429 | } | 430 | } |
430 | 431 | ||
431 | |||
432 | public void Post(UUID assetID, UUID ownerID, string userAssetURL) | 432 | public void Post(UUID assetID, UUID ownerID, string userAssetURL) |
433 | { | 433 | { |
434 | m_log.DebugFormat("[HG ASSET MAPPER]: Starting to send asset {0} with children to asset server {1}", assetID, userAssetURL); | 434 | m_log.DebugFormat("[HG ASSET MAPPER]: Starting to send asset {0} with children to asset server {1}", assetID, userAssetURL); |
@@ -442,9 +442,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
442 | return; | 442 | return; |
443 | } | 443 | } |
444 | 444 | ||
445 | Dictionary<UUID, sbyte> ids = new Dictionary<UUID, sbyte>(); | ||
446 | HGUuidGatherer uuidGatherer = new HGUuidGatherer(m_scene.AssetService, string.Empty); | 445 | HGUuidGatherer uuidGatherer = new HGUuidGatherer(m_scene.AssetService, string.Empty); |
447 | uuidGatherer.GatherAssetUuids(asset.FullID, asset.Type, ids); | 446 | uuidGatherer.AddForInspection(asset.FullID); |
448 | 447 | ||
449 | // Check which assets already exist in the destination server | 448 | // Check which assets already exist in the destination server |
450 | 449 | ||
@@ -452,16 +451,16 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
452 | if (!url.EndsWith("/") && !url.EndsWith("=")) | 451 | if (!url.EndsWith("/") && !url.EndsWith("=")) |
453 | url = url + "/"; | 452 | url = url + "/"; |
454 | 453 | ||
455 | string[] remoteAssetIDs = new string[ids.Count]; | 454 | string[] remoteAssetIDs = new string[uuidGatherer.GatheredUuids.Count]; |
456 | int i = 0; | 455 | int i = 0; |
457 | foreach (UUID id in ids.Keys) | 456 | foreach (UUID id in uuidGatherer.GatheredUuids.Keys) |
458 | remoteAssetIDs[i++] = url + id.ToString(); | 457 | remoteAssetIDs[i++] = url + id.ToString(); |
459 | 458 | ||
460 | bool[] exist = m_scene.AssetService.AssetsExist(remoteAssetIDs); | 459 | bool[] exist = m_scene.AssetService.AssetsExist(remoteAssetIDs); |
461 | 460 | ||
462 | var existSet = new HashSet<string>(); | 461 | var existSet = new HashSet<string>(); |
463 | i = 0; | 462 | i = 0; |
464 | foreach (UUID id in ids.Keys) | 463 | foreach (UUID id in uuidGatherer.GatheredUuids.Keys) |
465 | { | 464 | { |
466 | if (exist[i]) | 465 | if (exist[i]) |
467 | existSet.Add(id.ToString()); | 466 | existSet.Add(id.ToString()); |
@@ -472,7 +471,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
472 | 471 | ||
473 | bool success = true; | 472 | bool success = true; |
474 | 473 | ||
475 | foreach (UUID uuid in ids.Keys) | 474 | foreach (UUID uuid in uuidGatherer.GatheredUuids.Keys) |
476 | { | 475 | { |
477 | if (!existSet.Contains(uuid.ToString())) | 476 | if (!existSet.Contains(uuid.ToString())) |
478 | { | 477 | { |