Fix bug in HG attachment throttling code where attachments were never rezzed on any teleport within a foreign grid after the first.

Bug was introduced in ghosts branch commit 69abade
mb-throttle-test
Justin Clark-Casey (justincc) 2014-11-21 21:34:18 +00:00
parent 4b45a1b6ad
commit 66b1c37973
1 changed files with 64 additions and 56 deletions

View File

@ -583,7 +583,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
// foreign user
AgentCircuitData aCircuit = Scene.AuthenticateHandler.GetAgentCircuitData(so.OwnerID);
if (aCircuit != null && (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0)
if (aCircuit != null)
{
if ((aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) == 0)
{
// We have already pulled the necessary attachments from the source grid.
base.HandleIncomingSceneObject(so, newPosition);
}
else
{
if (aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("AssetServerURI"))
{
@ -593,9 +600,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
o =>
{
string url = aCircuit.ServiceURLs["AssetServerURI"].ToString();
// m_log.DebugFormat(
// "[HG ENTITY TRANSFER MODULE]: Incoming attachment {0} for HG user {1} with asset service {2}",
// so.Name, so.AttachedAvatar, url);
// m_log.DebugFormat(
// "[HG ENTITY TRANSFER MODULE]: Incoming attachment {0} for HG user {1} with asset service {2}",
// so.Name, so.AttachedAvatar, url);
IteratingHGUuidGatherer uuidGatherer = new IteratingHGUuidGatherer(Scene.AssetService, url);
uuidGatherer.RecordAssetUuids(so);
@ -607,9 +614,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
UUID? nextUuid = uuidGatherer.NextUuidToInspect;
uuidGatherer.GatherNext();
// m_log.DebugFormat(
// "[HG ENTITY TRANSFER]: Gathered attachment asset uuid {0} for object {1} for HG user {2} took {3} ms with asset service {4}",
// nextUuid, so.Name, so.OwnerID, Util.EnvironmentTickCountSubtract(tickStart), url);
// m_log.DebugFormat(
// "[HG ENTITY TRANSFER]: Gathered attachment asset uuid {0} for object {1} for HG user {2} took {3} ms with asset service {4}",
// nextUuid, so.Name, so.OwnerID, Util.EnvironmentTickCountSubtract(tickStart), url);
int ticksElapsed = Util.EnvironmentTickCountSubtract(tickStart);
@ -627,9 +634,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
IDictionary<UUID, sbyte> ids = uuidGatherer.GetGatheredUuids();
// m_log.DebugFormat(
// "[HG ENTITY TRANSFER]: Fetching {0} assets for attachment {1} for HG user {2} with asset service {3}",
// ids.Count, so.Name, so.OwnerID, url);
// m_log.DebugFormat(
// "[HG ENTITY TRANSFER]: Fetching {0} assets for attachment {1} for HG user {2} with asset service {3}",
// ids.Count, so.Name, so.OwnerID, url);
foreach (KeyValuePair<UUID, sbyte> kvp in ids)
{
@ -653,13 +660,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
base.HandleIncomingSceneObject(so, newPosition);
// m_log.DebugFormat(
// "[HG ENTITY TRANSFER MODULE]: Completed incoming attachment {0} for HG user {1} with asset server {2}",
// so.Name, so.OwnerID, url);
// m_log.DebugFormat(
// "[HG ENTITY TRANSFER MODULE]: Completed incoming attachment {0} for HG user {1} with asset server {2}",
// so.Name, so.OwnerID, url);
},
null);
}
}
}
return true;
}