aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/Caps/EventQueue
diff options
context:
space:
mode:
authorRobert Adams2014-01-03 07:41:06 -0800
committerRobert Adams2014-01-04 19:01:04 -0800
commit7e32313a491defe8f5fb62ce0036c1692d4b4af9 (patch)
treeba689f4a69419f6d23ecb26846f2b43b982669d8 /OpenSim/Region/ClientStack/Linden/Caps/EventQueue
parentvarregion: send region size in LLLoginResponse. (diff)
downloadopensim-SC-7e32313a491defe8f5fb62ce0036c1692d4b4af9.zip
opensim-SC-7e32313a491defe8f5fb62ce0036c1692d4b4af9.tar.gz
opensim-SC-7e32313a491defe8f5fb62ce0036c1692d4b4af9.tar.bz2
opensim-SC-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/Region/ClientStack/Linden/Caps/EventQueue')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs28
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs36
2 files changed, 45 insertions, 19 deletions
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 }