diff options
author | Robert Adams | 2014-01-03 07:41:06 -0800 |
---|---|---|
committer | Robert Adams | 2014-01-04 19:01:04 -0800 |
commit | 7e32313a491defe8f5fb62ce0036c1692d4b4af9 (patch) | |
tree | ba689f4a69419f6d23ecb26846f2b43b982669d8 /OpenSim | |
parent | varregion: send region size in LLLoginResponse. (diff) | |
download | opensim-SC_OLD-7e32313a491defe8f5fb62ce0036c1692d4b4af9.zip opensim-SC_OLD-7e32313a491defe8f5fb62ce0036c1692d4b4af9.tar.gz opensim-SC_OLD-7e32313a491defe8f5fb62ce0036c1692d4b4af9.tar.bz2 opensim-SC_OLD-7e32313a491defe8f5fb62ce0036c1692d4b4af9.tar.xz |
varregion: Add region size to teleport event messages (EnableSimulator,
CorssRegion, TeleportFinishEvent).
Have Simian grid service return the region size.
Many teleport related debug log messages. Can be removed when teleport
works (like that's ever going to happen).
Conflicts:
OpenSim/Framework/RegionInfo.cs
Diffstat (limited to 'OpenSim')
9 files changed, 104 insertions, 39 deletions
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index 857c151..1de30af 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs | |||
@@ -238,6 +238,8 @@ namespace OpenSim.Framework | |||
238 | { | 238 | { |
239 | RegionLocX = legacyRegionLocX; | 239 | RegionLocX = legacyRegionLocX; |
240 | RegionLocY = legacyRegionLocY; | 240 | RegionLocY = legacyRegionLocY; |
241 | RegionSizeX = Constants.RegionSize; | ||
242 | RegionSizeY = Constants.RegionSize; | ||
241 | m_internalEndPoint = internalEndPoint; | 243 | m_internalEndPoint = internalEndPoint; |
242 | m_externalHostName = externalUri; | 244 | m_externalHostName = externalUri; |
243 | m_serverURI = string.Empty; | 245 | m_serverURI = string.Empty; |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index 0dbdbaf..a05e88c 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs | |||
@@ -711,34 +711,46 @@ namespace OpenSim.Region.ClientStack.Linden | |||
711 | Enqueue(item, avatarID); | 711 | Enqueue(item, avatarID); |
712 | } | 712 | } |
713 | 713 | ||
714 | public virtual void EnableSimulator(ulong handle, IPEndPoint endPoint, UUID avatarID) | 714 | public virtual void EnableSimulator(ulong handle, IPEndPoint endPoint, UUID avatarID, int regionSizeX, int regionSizeY) |
715 | { | 715 | { |
716 | OSD item = EventQueueHelper.EnableSimulator(handle, endPoint); | 716 | m_log.DebugFormat("{0} EnableSimulator. handle={1}, avatarID={2}, regionSize={3},{4}>", |
717 | "[EVENT QUEUE GET MODULE]", handle, avatarID, regionSizeX, regionSizeY); | ||
718 | |||
719 | OSD item = EventQueueHelper.EnableSimulator(handle, endPoint, regionSizeX, regionSizeY); | ||
717 | Enqueue(item, avatarID); | 720 | Enqueue(item, avatarID); |
718 | } | 721 | } |
719 | 722 | ||
720 | public virtual void EstablishAgentCommunication(UUID avatarID, IPEndPoint endPoint, string capsPath) | 723 | public virtual void EstablishAgentCommunication(UUID avatarID, IPEndPoint endPoint, string capsPath, |
724 | ulong regionHandle, int regionSizeX, int regionSizeY) | ||
721 | { | 725 | { |
722 | OSD item = EventQueueHelper.EstablishAgentCommunication(avatarID, endPoint.ToString(), capsPath); | 726 | m_log.DebugFormat("{0} EstablishAgentCommunication. handle={1}, avatarID={2}, regionSize={3},{4}>", |
727 | "[EVENT QUEUE GET MODULE]", regionHandle, avatarID, regionSizeX, regionSizeY); | ||
728 | OSD item = EventQueueHelper.EstablishAgentCommunication(avatarID, endPoint.ToString(), capsPath, regionHandle, regionSizeX, regionSizeY); | ||
723 | Enqueue(item, avatarID); | 729 | Enqueue(item, avatarID); |
724 | } | 730 | } |
725 | 731 | ||
726 | public virtual void TeleportFinishEvent(ulong regionHandle, byte simAccess, | 732 | public virtual void TeleportFinishEvent(ulong regionHandle, byte simAccess, |
727 | IPEndPoint regionExternalEndPoint, | 733 | IPEndPoint regionExternalEndPoint, |
728 | uint locationID, uint flags, string capsURL, | 734 | uint locationID, uint flags, string capsURL, |
729 | UUID avatarID) | 735 | UUID avatarID, int regionSizeX, int regionSizeY) |
730 | { | 736 | { |
737 | m_log.DebugFormat("{0} TeleportFinishEvent. handle={1}, avatarID={2}, regionSize={3},{4}>", | ||
738 | "[EVENT QUEUE GET MODULE]", regionHandle, avatarID, regionSizeX, regionSizeY); | ||
739 | |||
731 | OSD item = EventQueueHelper.TeleportFinishEvent(regionHandle, simAccess, regionExternalEndPoint, | 740 | OSD item = EventQueueHelper.TeleportFinishEvent(regionHandle, simAccess, regionExternalEndPoint, |
732 | locationID, flags, capsURL, avatarID); | 741 | locationID, flags, capsURL, avatarID, regionSizeX, regionSizeY); |
733 | Enqueue(item, avatarID); | 742 | Enqueue(item, avatarID); |
734 | } | 743 | } |
735 | 744 | ||
736 | public virtual void CrossRegion(ulong handle, Vector3 pos, Vector3 lookAt, | 745 | public virtual void CrossRegion(ulong handle, Vector3 pos, Vector3 lookAt, |
737 | IPEndPoint newRegionExternalEndPoint, | 746 | IPEndPoint newRegionExternalEndPoint, |
738 | string capsURL, UUID avatarID, UUID sessionID) | 747 | string capsURL, UUID avatarID, UUID sessionID, int regionSizeX, int regionSizeY) |
739 | { | 748 | { |
749 | m_log.DebugFormat("{0} CrossRegion. handle={1}, avatarID={2}, regionSize={3},{4}>", | ||
750 | "[EVENT QUEUE GET MODULE]", handle, avatarID, regionSizeX, regionSizeY); | ||
751 | |||
740 | OSD item = EventQueueHelper.CrossRegion(handle, pos, lookAt, newRegionExternalEndPoint, | 752 | OSD item = EventQueueHelper.CrossRegion(handle, pos, lookAt, newRegionExternalEndPoint, |
741 | capsURL, avatarID, sessionID); | 753 | capsURL, avatarID, sessionID, regionSizeX, regionSizeY); |
742 | Enqueue(item, avatarID); | 754 | Enqueue(item, avatarID); |
743 | } | 755 | } |
744 | 756 | ||
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs index dab727f..ded228d 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs | |||
@@ -70,13 +70,15 @@ namespace OpenSim.Region.ClientStack.Linden | |||
70 | return llsdEvent; | 70 | return llsdEvent; |
71 | } | 71 | } |
72 | 72 | ||
73 | public static OSD EnableSimulator(ulong handle, IPEndPoint endPoint) | 73 | public static OSD EnableSimulator(ulong handle, IPEndPoint endPoint, int regionSizeX, int regionSizeY) |
74 | { | 74 | { |
75 | OSDMap llsdSimInfo = new OSDMap(3); | 75 | OSDMap llsdSimInfo = new OSDMap(5); |
76 | 76 | ||
77 | llsdSimInfo.Add("Handle", new OSDBinary(ulongToByteArray(handle))); | 77 | llsdSimInfo.Add("Handle", new OSDBinary(ulongToByteArray(handle))); |
78 | llsdSimInfo.Add("IP", new OSDBinary(endPoint.Address.GetAddressBytes())); | 78 | llsdSimInfo.Add("IP", new OSDBinary(endPoint.Address.GetAddressBytes())); |
79 | llsdSimInfo.Add("Port", new OSDInteger(endPoint.Port)); | 79 | llsdSimInfo.Add("Port", new OSDInteger(endPoint.Port)); |
80 | llsdSimInfo.Add("RegionSizeX", new OSDInteger(regionSizeX)); | ||
81 | llsdSimInfo.Add("RegionSizeY", new OSDInteger(regionSizeY)); | ||
80 | 82 | ||
81 | OSDArray arr = new OSDArray(1); | 83 | OSDArray arr = new OSDArray(1); |
82 | arr.Add(llsdSimInfo); | 84 | arr.Add(llsdSimInfo); |
@@ -104,7 +106,8 @@ namespace OpenSim.Region.ClientStack.Linden | |||
104 | 106 | ||
105 | public static OSD CrossRegion(ulong handle, Vector3 pos, Vector3 lookAt, | 107 | public static OSD CrossRegion(ulong handle, Vector3 pos, Vector3 lookAt, |
106 | IPEndPoint newRegionExternalEndPoint, | 108 | IPEndPoint newRegionExternalEndPoint, |
107 | string capsURL, UUID agentID, UUID sessionID) | 109 | string capsURL, UUID agentID, UUID sessionID, |
110 | int regionSizeX, int regionSizeY) | ||
108 | { | 111 | { |
109 | OSDArray lookAtArr = new OSDArray(3); | 112 | OSDArray lookAtArr = new OSDArray(3); |
110 | lookAtArr.Add(OSD.FromReal(lookAt.X)); | 113 | lookAtArr.Add(OSD.FromReal(lookAt.X)); |
@@ -130,11 +133,13 @@ namespace OpenSim.Region.ClientStack.Linden | |||
130 | OSDArray agentDataArr = new OSDArray(1); | 133 | OSDArray agentDataArr = new OSDArray(1); |
131 | agentDataArr.Add(agentDataMap); | 134 | agentDataArr.Add(agentDataMap); |
132 | 135 | ||
133 | OSDMap regionDataMap = new OSDMap(4); | 136 | OSDMap regionDataMap = new OSDMap(6); |
134 | regionDataMap.Add("RegionHandle", OSD.FromBinary(ulongToByteArray(handle))); | 137 | regionDataMap.Add("RegionHandle", OSD.FromBinary(ulongToByteArray(handle))); |
135 | regionDataMap.Add("SeedCapability", OSD.FromString(capsURL)); | 138 | regionDataMap.Add("SeedCapability", OSD.FromString(capsURL)); |
136 | regionDataMap.Add("SimIP", OSD.FromBinary(newRegionExternalEndPoint.Address.GetAddressBytes())); | 139 | regionDataMap.Add("SimIP", OSD.FromBinary(newRegionExternalEndPoint.Address.GetAddressBytes())); |
137 | regionDataMap.Add("SimPort", OSD.FromInteger(newRegionExternalEndPoint.Port)); | 140 | regionDataMap.Add("SimPort", OSD.FromInteger(newRegionExternalEndPoint.Port)); |
141 | regionDataMap.Add("RegionSizeX", new OSDInteger(regionSizeX)); | ||
142 | regionDataMap.Add("RegionSizeY", new OSDInteger(regionSizeY)); | ||
138 | 143 | ||
139 | OSDArray regionDataArr = new OSDArray(1); | 144 | OSDArray regionDataArr = new OSDArray(1); |
140 | regionDataArr.Add(regionDataMap); | 145 | regionDataArr.Add(regionDataMap); |
@@ -148,8 +153,9 @@ namespace OpenSim.Region.ClientStack.Linden | |||
148 | } | 153 | } |
149 | 154 | ||
150 | public static OSD TeleportFinishEvent( | 155 | public static OSD TeleportFinishEvent( |
151 | ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, | 156 | ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, |
152 | uint locationID, uint flags, string capsURL, UUID agentID) | 157 | uint locationID, uint flags, string capsURL, UUID agentID, |
158 | int regionSizeX, int regionSizeY) | ||
153 | { | 159 | { |
154 | OSDMap info = new OSDMap(); | 160 | OSDMap info = new OSDMap(); |
155 | info.Add("AgentID", OSD.FromUUID(agentID)); | 161 | info.Add("AgentID", OSD.FromUUID(agentID)); |
@@ -160,6 +166,8 @@ namespace OpenSim.Region.ClientStack.Linden | |||
160 | info.Add("SimIP", OSD.FromBinary(regionExternalEndPoint.Address.GetAddressBytes())); | 166 | info.Add("SimIP", OSD.FromBinary(regionExternalEndPoint.Address.GetAddressBytes())); |
161 | info.Add("SimPort", OSD.FromInteger(regionExternalEndPoint.Port)); | 167 | info.Add("SimPort", OSD.FromInteger(regionExternalEndPoint.Port)); |
162 | info.Add("TeleportFlags", OSD.FromULong(1L << 4)); // AgentManager.TeleportFlags.ViaLocation | 168 | info.Add("TeleportFlags", OSD.FromULong(1L << 4)); // AgentManager.TeleportFlags.ViaLocation |
169 | info.Add("RegionSizeX", new OSDInteger(regionSizeX)); | ||
170 | info.Add("RegionSizeY", new OSDInteger(regionSizeY)); | ||
163 | 171 | ||
164 | OSDArray infoArr = new OSDArray(); | 172 | OSDArray infoArr = new OSDArray(); |
165 | infoArr.Add(info); | 173 | infoArr.Add(info); |
@@ -187,12 +195,18 @@ namespace OpenSim.Region.ClientStack.Linden | |||
187 | return BuildEvent("ScriptRunningReply", body); | 195 | return BuildEvent("ScriptRunningReply", body); |
188 | } | 196 | } |
189 | 197 | ||
190 | public static OSD EstablishAgentCommunication(UUID agentID, string simIpAndPort, string seedcap) | 198 | public static OSD EstablishAgentCommunication(UUID agentID, string simIpAndPort, string seedcap, |
199 | ulong regionHandle, int regionSizeX, int regionSizeY) | ||
191 | { | 200 | { |
192 | OSDMap body = new OSDMap(3); | 201 | OSDMap body = new OSDMap(6) |
193 | body.Add("agent-id", new OSDUUID(agentID)); | 202 | { |
194 | body.Add("sim-ip-and-port", new OSDString(simIpAndPort)); | 203 | {"agent-id", new OSDUUID(agentID)}, |
195 | body.Add("seed-capability", new OSDString(seedcap)); | 204 | {"sim-ip-and-port", new OSDString(simIpAndPort)}, |
205 | {"seed-capability", new OSDString(seedcap)}, | ||
206 | {"region-handle", OSD.FromULong(regionHandle)}, | ||
207 | {"region-size-x", OSD.FromInteger(regionSizeX)}, | ||
208 | {"region-size-y", OSD.FromInteger(regionSizeY)} | ||
209 | }; | ||
196 | 210 | ||
197 | return BuildEvent("EstablishAgentCommunication", body); | 211 | return BuildEvent("EstablishAgentCommunication", body); |
198 | } | 212 | } |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index ef5239a..717c802 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -825,7 +825,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
825 | // The EnableSimulator message makes the client establish a connection with the destination | 825 | // The EnableSimulator message makes the client establish a connection with the destination |
826 | // simulator by sending the initial UseCircuitCode UDP packet to the destination containing the | 826 | // simulator by sending the initial UseCircuitCode UDP packet to the destination containing the |
827 | // correct circuit code. | 827 | // correct circuit code. |
828 | m_eqModule.EnableSimulator(destinationHandle, endPoint, sp.UUID); | 828 | m_eqModule.EnableSimulator(destinationHandle, endPoint, sp.UUID, |
829 | finalDestination.RegionSizeX, finalDestination.RegionSizeY); | ||
830 | m_log.DebugFormat("{0} Sent EnableSimulator. regName={1}, size=<{2},{3}>", LogHeader, | ||
831 | finalDestination.RegionName, finalDestination.RegionSizeX, finalDestination.RegionSizeY); | ||
829 | 832 | ||
830 | // XXX: Is this wait necessary? We will always end up waiting on UpdateAgent for the destination | 833 | // XXX: Is this wait necessary? We will always end up waiting on UpdateAgent for the destination |
831 | // simulator to confirm that it has established communication with the viewer. | 834 | // simulator to confirm that it has established communication with the viewer. |
@@ -835,7 +838,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
835 | // unnecessary - teleport will succeed and SEED caps will be requested without it (though possibly | 838 | // unnecessary - teleport will succeed and SEED caps will be requested without it (though possibly |
836 | // only on TeleportFinish). This is untested for region teleport between different simulators | 839 | // only on TeleportFinish). This is untested for region teleport between different simulators |
837 | // though this probably also works. | 840 | // though this probably also works. |
838 | m_eqModule.EstablishAgentCommunication(sp.UUID, endPoint, capsPath); | 841 | m_eqModule.EstablishAgentCommunication(sp.UUID, endPoint, capsPath, finalDestination.RegionHandle, |
842 | finalDestination.RegionSizeX, finalDestination.RegionSizeY); | ||
839 | } | 843 | } |
840 | else | 844 | else |
841 | { | 845 | { |
@@ -921,7 +925,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
921 | // OK, send TPFinish to the client, so that it starts the process of contacting the destination region | 925 | // OK, send TPFinish to the client, so that it starts the process of contacting the destination region |
922 | if (m_eqModule != null) | 926 | if (m_eqModule != null) |
923 | { | 927 | { |
924 | m_eqModule.TeleportFinishEvent(destinationHandle, 13, endPoint, 0, teleportFlags, capsPath, sp.UUID); | 928 | m_eqModule.TeleportFinishEvent(destinationHandle, 13, endPoint, 0, teleportFlags, capsPath, sp.UUID, |
929 | finalDestination.RegionSizeX, finalDestination.RegionSizeY); | ||
925 | } | 930 | } |
926 | else | 931 | else |
927 | { | 932 | { |
@@ -1074,7 +1079,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1074 | 1079 | ||
1075 | // New protocol: send TP Finish directly, without prior ES or EAC. That's what happens in the Linden grid | 1080 | // New protocol: send TP Finish directly, without prior ES or EAC. That's what happens in the Linden grid |
1076 | if (m_eqModule != null) | 1081 | if (m_eqModule != null) |
1077 | m_eqModule.TeleportFinishEvent(destinationHandle, 13, endPoint, 0, teleportFlags, capsPath, sp.UUID); | 1082 | m_eqModule.TeleportFinishEvent(destinationHandle, 13, endPoint, 0, teleportFlags, capsPath, sp.UUID, |
1083 | finalDestination.RegionSizeX, finalDestination.RegionSizeY); | ||
1078 | else | 1084 | else |
1079 | sp.ControllingClient.SendRegionTeleport(destinationHandle, 13, endPoint, 4, | 1085 | sp.ControllingClient.SendRegionTeleport(destinationHandle, 13, endPoint, 4, |
1080 | teleportFlags, capsPath); | 1086 | teleportFlags, capsPath); |
@@ -1717,11 +1723,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1717 | if (m_eqModule != null) | 1723 | if (m_eqModule != null) |
1718 | { | 1724 | { |
1719 | m_eqModule.CrossRegion( | 1725 | m_eqModule.CrossRegion( |
1720 | neighbourRegion.RegionHandle, pos + agent.Velocity, vel2 /* agent.Velocity */, neighbourRegion.ExternalEndPoint, | 1726 | neighbourRegion.RegionHandle, pos + agent.Velocity, vel2 /* agent.Velocity */, |
1721 | capsPath, agent.UUID, agent.ControllingClient.SessionId); | 1727 | neighbourRegion.ExternalEndPoint, |
1728 | capsPath, agent.UUID, agent.ControllingClient.SessionId, | ||
1729 | neighbourRegion.RegionSizeX, neighbourRegion.RegionSizeY); | ||
1722 | } | 1730 | } |
1723 | else | 1731 | else |
1724 | { | 1732 | { |
1733 | m_log.ErrorFormat("{0} Using old CrossRegion packet. Varregion will not work!!", LogHeader); | ||
1725 | agent.ControllingClient.CrossRegion(neighbourRegion.RegionHandle, pos + agent.Velocity, agent.Velocity, neighbourRegion.ExternalEndPoint, | 1734 | agent.ControllingClient.CrossRegion(neighbourRegion.RegionHandle, pos + agent.Velocity, agent.Velocity, neighbourRegion.ExternalEndPoint, |
1726 | capsPath); | 1735 | capsPath); |
1727 | } | 1736 | } |
@@ -2087,12 +2096,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
2087 | } | 2096 | } |
2088 | #endregion | 2097 | #endregion |
2089 | 2098 | ||
2090 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: {0} is sending {1} EnableSimulator for neighbour region {2} @ {3} " + | 2099 | m_log.DebugFormat("{0} {1} is sending {2} EnableSimulator for neighbour region {3}(loc=<{4},{5}>,siz=<{6},{7}>) " + |
2091 | "and EstablishAgentCommunication with seed cap {4}", | 2100 | "and EstablishAgentCommunication with seed cap {8}", LogHeader, |
2092 | scene.RegionInfo.RegionName, sp.Name, reg.RegionName, reg.RegionHandle, capsPath); | 2101 | scene.RegionInfo.RegionName, sp.Name, |
2102 | reg.RegionName, reg.RegionLocX, reg.RegionLocY, reg.RegionSizeX, reg.RegionSizeY , capsPath); | ||
2093 | 2103 | ||
2094 | m_eqModule.EnableSimulator(reg.RegionHandle, endPoint, sp.UUID); | 2104 | m_eqModule.EnableSimulator(reg.RegionHandle, endPoint, sp.UUID, reg.RegionSizeX, reg.RegionSizeY); |
2095 | m_eqModule.EstablishAgentCommunication(sp.UUID, endPoint, capsPath); | 2105 | m_eqModule.EstablishAgentCommunication(sp.UUID, endPoint, capsPath, reg.RegionHandle, reg.RegionSizeX, reg.RegionSizeY); |
2096 | } | 2106 | } |
2097 | else | 2107 | else |
2098 | { | 2108 | { |
diff --git a/OpenSim/Region/Framework/Interfaces/IEventQueue.cs b/OpenSim/Region/Framework/Interfaces/IEventQueue.cs index 3780ece..dfc269e 100644 --- a/OpenSim/Region/Framework/Interfaces/IEventQueue.cs +++ b/OpenSim/Region/Framework/Interfaces/IEventQueue.cs | |||
@@ -39,16 +39,17 @@ namespace OpenSim.Region.Framework.Interfaces | |||
39 | 39 | ||
40 | // These are required to decouple Scenes from EventQueueHelper | 40 | // These are required to decouple Scenes from EventQueueHelper |
41 | void DisableSimulator(ulong handle, UUID avatarID); | 41 | void DisableSimulator(ulong handle, UUID avatarID); |
42 | void EnableSimulator(ulong handle, IPEndPoint endPoint, UUID avatarID); | 42 | void EnableSimulator(ulong handle, IPEndPoint endPoint, UUID avatarID, int regionSizeX, int regionSizeY); |
43 | void EstablishAgentCommunication(UUID avatarID, IPEndPoint endPoint, | 43 | void EstablishAgentCommunication(UUID avatarID, IPEndPoint endPoint, |
44 | string capsPath); | 44 | string capsPath, ulong regionHandle, int regionSizeX, int regionSizeY); |
45 | void TeleportFinishEvent(ulong regionHandle, byte simAccess, | 45 | void TeleportFinishEvent(ulong regionHandle, byte simAccess, |
46 | IPEndPoint regionExternalEndPoint, | 46 | IPEndPoint regionExternalEndPoint, |
47 | uint locationID, uint flags, string capsURL, | 47 | uint locationID, uint flags, string capsURL, |
48 | UUID agentID); | 48 | UUID agentID, int regionSizeX, int regionSizeY); |
49 | void CrossRegion(ulong handle, Vector3 pos, Vector3 lookAt, | 49 | void CrossRegion(ulong handle, Vector3 pos, Vector3 lookAt, |
50 | IPEndPoint newRegionExternalEndPoint, | 50 | IPEndPoint newRegionExternalEndPoint, |
51 | string capsURL, UUID avatarID, UUID sessionID); | 51 | string capsURL, UUID avatarID, UUID sessionID, |
52 | int regionSizeX, int regionSizeY); | ||
52 | void ChatterboxInvitation(UUID sessionID, string sessionName, | 53 | void ChatterboxInvitation(UUID sessionID, string sessionName, |
53 | UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, | 54 | UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, |
54 | uint timeStamp, bool offline, int parentEstateID, Vector3 position, | 55 | uint timeStamp, bool offline, int parentEstateID, Vector3 position, |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 7772f94..610bcd6 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1953,6 +1953,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1953 | 1953 | ||
1954 | GridRegion region = new GridRegion(RegionInfo); | 1954 | GridRegion region = new GridRegion(RegionInfo); |
1955 | string error = GridService.RegisterRegion(RegionInfo.ScopeID, region); | 1955 | string error = GridService.RegisterRegion(RegionInfo.ScopeID, region); |
1956 | m_log.DebugFormat("{0} RegisterRegionWithGrid. name={1},id={2},loc=<{3},{4}>,size=<{5},{6}>", | ||
1957 | LogHeader, m_regionName, | ||
1958 | RegionInfo.RegionID, | ||
1959 | RegionInfo.RegionLocX, RegionInfo.RegionLocY, | ||
1960 | RegionInfo.RegionSizeX, RegionInfo.RegionSizeY); | ||
1956 | if (error != String.Empty) | 1961 | if (error != String.Empty) |
1957 | throw new Exception(error); | 1962 | throw new Exception(error); |
1958 | } | 1963 | } |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs index 816591b..c928f16 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs | |||
@@ -443,9 +443,13 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
443 | region.RegionName = response["Name"].AsString(); | 443 | region.RegionName = response["Name"].AsString(); |
444 | 444 | ||
445 | Vector3d minPosition = response["MinPosition"].AsVector3d(); | 445 | Vector3d minPosition = response["MinPosition"].AsVector3d(); |
446 | Vector3d maxPosition = response["MaxPosition"].AsVector3d(); | ||
446 | region.RegionLocX = (int)minPosition.X; | 447 | region.RegionLocX = (int)minPosition.X; |
447 | region.RegionLocY = (int)minPosition.Y; | 448 | region.RegionLocY = (int)minPosition.Y; |
448 | 449 | ||
450 | region.RegionSizeX = (int)maxPosition.X - (int)minPosition.X; | ||
451 | region.RegionSizeY = (int)maxPosition.Y - (int)minPosition.Y; | ||
452 | |||
449 | if ( ! extraData["HyperGrid"] ) { | 453 | if ( ! extraData["HyperGrid"] ) { |
450 | Uri httpAddress = response["Address"].AsUri(); | 454 | Uri httpAddress = response["Address"].AsUri(); |
451 | region.ExternalHostName = httpAddress.Host; | 455 | region.ExternalHostName = httpAddress.Host; |
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs index 59d6167..9459ecd 100644 --- a/OpenSim/Services/Interfaces/IGridService.cs +++ b/OpenSim/Services/Interfaces/IGridService.cs | |||
@@ -29,9 +29,13 @@ using System; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Net; | 30 | using System.Net; |
31 | using System.Net.Sockets; | 31 | using System.Net.Sockets; |
32 | using System.Reflection; | ||
33 | |||
32 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
33 | using OpenMetaverse; | 35 | using OpenMetaverse; |
34 | 36 | ||
37 | using log4net; | ||
38 | |||
35 | namespace OpenSim.Services.Interfaces | 39 | namespace OpenSim.Services.Interfaces |
36 | { | 40 | { |
37 | public interface IGridService | 41 | public interface IGridService |
@@ -119,6 +123,9 @@ namespace OpenSim.Services.Interfaces | |||
119 | 123 | ||
120 | public class GridRegion | 124 | public class GridRegion |
121 | { | 125 | { |
126 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
127 | private static readonly string LogHeader = "[GRID REGION]"; | ||
128 | |||
122 | /// <summary> | 129 | /// <summary> |
123 | /// The port by which http communication occurs with the region | 130 | /// The port by which http communication occurs with the region |
124 | /// </summary> | 131 | /// </summary> |
@@ -422,9 +429,13 @@ namespace OpenSim.Services.Interfaces | |||
422 | 429 | ||
423 | if (kvp.ContainsKey("sizeX")) | 430 | if (kvp.ContainsKey("sizeX")) |
424 | RegionSizeX = Convert.ToInt32((string)kvp["sizeX"]); | 431 | RegionSizeX = Convert.ToInt32((string)kvp["sizeX"]); |
432 | else | ||
433 | RegionSizeX = (int)Constants.RegionSize; | ||
425 | 434 | ||
426 | if (kvp.ContainsKey("sizeY")) | 435 | if (kvp.ContainsKey("sizeY")) |
427 | RegionSizeY = Convert.ToInt32((string)kvp["sizeY"]); | 436 | RegionSizeY = Convert.ToInt32((string)kvp["sizeY"]); |
437 | else | ||
438 | RegionSizeX = (int)Constants.RegionSize; | ||
428 | 439 | ||
429 | if (kvp.ContainsKey("regionName")) | 440 | if (kvp.ContainsKey("regionName")) |
430 | RegionName = (string)kvp["regionName"]; | 441 | RegionName = (string)kvp["regionName"]; |
@@ -473,6 +484,9 @@ namespace OpenSim.Services.Interfaces | |||
473 | 484 | ||
474 | if (kvp.ContainsKey("Token")) | 485 | if (kvp.ContainsKey("Token")) |
475 | Token = kvp["Token"].ToString(); | 486 | Token = kvp["Token"].ToString(); |
487 | |||
488 | m_log.DebugFormat("{0} New GridRegion. id={1}, loc=<{2},{3}>, size=<{4},{5}>", | ||
489 | LogHeader, RegionID, RegionLocX, RegionLocY, RegionSizeX, RegionSizeY); | ||
476 | } | 490 | } |
477 | } | 491 | } |
478 | } | 492 | } |
diff --git a/OpenSim/Tests/Common/Mock/TestEventQueueGetModule.cs b/OpenSim/Tests/Common/Mock/TestEventQueueGetModule.cs index e666433..f2bae58 100644 --- a/OpenSim/Tests/Common/Mock/TestEventQueueGetModule.cs +++ b/OpenSim/Tests/Common/Mock/TestEventQueueGetModule.cs | |||
@@ -114,22 +114,25 @@ namespace OpenSim.Tests.Common | |||
114 | AddEvent(avatarID, "DisableSimulator", handle); | 114 | AddEvent(avatarID, "DisableSimulator", handle); |
115 | } | 115 | } |
116 | 116 | ||
117 | public void EnableSimulator (ulong handle, IPEndPoint endPoint, UUID avatarID) | 117 | public void EnableSimulator (ulong handle, IPEndPoint endPoint, UUID avatarID, int regionSizeX, int regionSizeY) |
118 | { | 118 | { |
119 | AddEvent(avatarID, "EnableSimulator", handle); | 119 | AddEvent(avatarID, "EnableSimulator", handle); |
120 | } | 120 | } |
121 | 121 | ||
122 | public void EstablishAgentCommunication (UUID avatarID, IPEndPoint endPoint, string capsPath) | 122 | public void EstablishAgentCommunication (UUID avatarID, IPEndPoint endPoint, string capsPath, |
123 | ulong regionHandle, int regionSizeX, int regionSizeY) | ||
123 | { | 124 | { |
124 | AddEvent(avatarID, "EstablishAgentCommunication", endPoint, capsPath); | 125 | AddEvent(avatarID, "EstablishAgentCommunication", endPoint, capsPath); |
125 | } | 126 | } |
126 | 127 | ||
127 | public void TeleportFinishEvent (ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL, UUID agentID) | 128 | public void TeleportFinishEvent (ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, |
129 | uint locationID, uint flags, string capsURL, UUID agentID, int regionSizeX, int regionSizeY) | ||
128 | { | 130 | { |
129 | AddEvent(agentID, "TeleportFinishEvent", regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL); | 131 | AddEvent(agentID, "TeleportFinishEvent", regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL); |
130 | } | 132 | } |
131 | 133 | ||
132 | public void CrossRegion (ulong handle, Vector3 pos, Vector3 lookAt, IPEndPoint newRegionExternalEndPoint, string capsURL, UUID avatarID, UUID sessionID) | 134 | public void CrossRegion (ulong handle, Vector3 pos, Vector3 lookAt, IPEndPoint newRegionExternalEndPoint, |
135 | string capsURL, UUID avatarID, UUID sessionID, int regionSizeX, int regionSizeY) | ||
133 | { | 136 | { |
134 | AddEvent(avatarID, "CrossRegion", handle, pos, lookAt, newRegionExternalEndPoint, capsURL, sessionID); | 137 | AddEvent(avatarID, "CrossRegion", handle, pos, lookAt, newRegionExternalEndPoint, capsURL, sessionID); |
135 | } | 138 | } |