All pastes #780510 Raw Edit

Something

public text v1 · immutable
·published 2007-11-18 16:30 UTC
rendered paste body
1c0bed31809f82ed9af10b3172fc40a1c488eb64
 .../Communications/CommunicationsManager.cs        |    5 ++++-
 .../Scenes/SceneCommunicationService.cs            |    3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs
index cd5a28a..5bb9d19 100644
--- a/OpenSim/Framework/Communications/CommunicationsManager.cs
+++ b/OpenSim/Framework/Communications/CommunicationsManager.cs
@@ -97,6 +97,7 @@ namespace OpenSim.Framework.Communications
     {
         protected IClientAPI m_client;
         public InterdomainInfoReply Reply;
+        public Action<LLUUID> MakeChild;
         public List<ulong> KnownChildRegions;
         public ulong Area51Handle;
         public LLVector3 Position;
@@ -324,6 +325,7 @@ namespace OpenSim.Framework.Communications
             string capsPath = Util.GetCapsURL(rep.AgentId);
             IPEndPoint ip = new IPEndPoint(IPAddress.Parse(tp.Reply.EndpointAddress), tp.Reply.EndpointPort);
             tp.RemoteClient.SendRegionTeleport(tp.Reply.RegionHandle, 13, ip, 4, (1 << 4), capsPath);
+            tp.MakeChild(rep.AgentId);
             MainLog.Instance.Error("INTERDOMAIN", "Interdomain TP almost successful for ID: {0}", rep.AgentId);
             InterdomainTeleportRequest rq = new InterdomainTeleportRequest();
             rq.InfoReply = tp.Reply;
@@ -332,10 +334,11 @@ namespace OpenSim.Framework.Communications
                                         InterdomainTeleportFinalCB);
         }
         
-        public void InterdomainTeleportPrepare(LLUUID AgentId, List<ulong> KnownChildRegions,  ulong area51handle, LLVector3 position, LLVector3 lookAt, uint flags)
+        public void InterdomainTeleportPrepare(LLUUID AgentId, Action<LLUUID> MakeChild, List<ulong> KnownChildRegions,  ulong area51handle, LLVector3 position, LLVector3 lookAt, uint flags)
         {
             InterdomainTeleport tp = m_teleports[AgentId];
             tp.KnownChildRegions = KnownChildRegions;
+            tp.MakeChild = MakeChild;
             tp.Area51Handle = area51handle;
             tp.Position = position;
             tp.LookAt = lookAt;
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
index 154f476..692bf0d 100644
--- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
@@ -232,7 +232,8 @@ namespace OpenSim.Region.Environment.Scenes
         {
             LLUUID t_agentId = avatar.ControllingClient.AgentId;
             if (m_commsProvider.InterdomainTeleportPending(t_agentId)) {
-                m_commsProvider.InterdomainTeleportPrepare(t_agentId, avatar.KnownChildRegions, regionHandle, position, lookAt, flags);
+                m_commsProvider.InterdomainTeleportPrepare(t_agentId, delegate(LLUUID id) { avatar.MakeChildAgent(); },
+                        avatar.KnownChildRegions, regionHandle, position, lookAt, flags);
             }
             if (regionHandle == m_regionInfo.RegionHandle)
             {