diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs | 20 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/Framework/EventQueueHelper.cs | 21 |
2 files changed, 27 insertions, 14 deletions
diff --git a/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs b/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs index 14574e0..f77a7c0 100644 --- a/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs +++ b/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs | |||
@@ -126,7 +126,7 @@ namespace OpenSim.Region.Environment.Modules.Framework | |||
126 | { | 126 | { |
127 | if (!queues.ContainsKey(agentId)) | 127 | if (!queues.ContainsKey(agentId)) |
128 | { | 128 | { |
129 | m_log.DebugFormat("[EVENTQUEUE]: Adding new queue for agent {0}", agentId); | 129 | m_log.DebugFormat("[EVENTQUEUE]: Adding new queue for agent {0} in region {1}", agentId, m_scene.RegionInfo.RegionName); |
130 | queues[agentId] = new BlockingLLSDQueue(); | 130 | queues[agentId] = new BlockingLLSDQueue(); |
131 | } | 131 | } |
132 | return queues[agentId]; | 132 | return queues[agentId]; |
@@ -136,7 +136,7 @@ namespace OpenSim.Region.Environment.Modules.Framework | |||
136 | #region IEventQueue Members | 136 | #region IEventQueue Members |
137 | public bool Enqueue(LLSD ev, UUID avatarID) | 137 | public bool Enqueue(LLSD ev, UUID avatarID) |
138 | { | 138 | { |
139 | m_log.DebugFormat("[EVENTQUEUE]: Enqueuing event for {0}", avatarID); | 139 | m_log.DebugFormat("[EVENTQUEUE]: Enqueuing event for {0} in region {1}", avatarID, m_scene.RegionInfo.RegionName); |
140 | BlockingLLSDQueue queue = GetQueue(avatarID); | 140 | BlockingLLSDQueue queue = GetQueue(avatarID); |
141 | queue.Enqueue(ev); | 141 | queue.Enqueue(ev); |
142 | return true; | 142 | return true; |
@@ -145,7 +145,7 @@ namespace OpenSim.Region.Environment.Modules.Framework | |||
145 | 145 | ||
146 | private void OnNewClient(IClientAPI client) | 146 | private void OnNewClient(IClientAPI client) |
147 | { | 147 | { |
148 | m_log.DebugFormat("[EVENTQUEUE]: New client {0} detected.", client.AgentId); | 148 | m_log.DebugFormat("[EVENTQUEUE]: New client {0} detected in region {1}", client.AgentId, m_scene.RegionInfo.RegionName); |
149 | client.OnLogout += ClientClosed; | 149 | client.OnLogout += ClientClosed; |
150 | } | 150 | } |
151 | 151 | ||
@@ -158,13 +158,13 @@ namespace OpenSim.Region.Environment.Modules.Framework | |||
158 | private void ClientClosed(UUID AgentID) | 158 | private void ClientClosed(UUID AgentID) |
159 | { | 159 | { |
160 | queues.Remove(AgentID); | 160 | queues.Remove(AgentID); |
161 | m_log.DebugFormat("[EVENTQUEUE]: Client {0} deregistered.", AgentID); | 161 | m_log.DebugFormat("[EVENTQUEUE]: Client {0} deregistered in region {1}.", AgentID, m_scene.RegionInfo.RegionName); |
162 | } | 162 | } |
163 | 163 | ||
164 | private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID) | 164 | private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID) |
165 | { | 165 | { |
166 | m_log.DebugFormat("[EVENTQUEUE]: Avatar {0} entering parcel {1} in region {2}.", | 166 | m_log.DebugFormat("[EVENTQUEUE]: Avatar {0} entering parcel {1} in region {2}.", |
167 | avatar.UUID, localLandID, regionID); | 167 | avatar.UUID, localLandID, m_scene.RegionInfo.RegionName); |
168 | 168 | ||
169 | } | 169 | } |
170 | 170 | ||
@@ -175,7 +175,7 @@ namespace OpenSim.Region.Environment.Modules.Framework | |||
175 | 175 | ||
176 | public void OnRegisterCaps(UUID agentID, Caps caps) | 176 | public void OnRegisterCaps(UUID agentID, Caps caps) |
177 | { | 177 | { |
178 | m_log.DebugFormat("[EVENTQUEUE] OnRegisterCaps: agentID {0} caps {1}", agentID, caps); | 178 | m_log.DebugFormat("[EVENTQUEUE] OnRegisterCaps: agentID {0} caps {1} region", agentID, caps, m_scene.RegionInfo.RegionName); |
179 | string capsBase = "/CAPS/"; | 179 | string capsBase = "/CAPS/"; |
180 | caps.RegisterHandler("EventQueueGet", | 180 | caps.RegisterHandler("EventQueueGet", |
181 | new RestHTTPHandler("POST", capsBase + UUID.Random().ToString(), | 181 | new RestHTTPHandler("POST", capsBase + UUID.Random().ToString(), |
@@ -203,12 +203,12 @@ namespace OpenSim.Region.Environment.Modules.Framework | |||
203 | LLSD element = queue.Dequeue(15000); // 15s timeout | 203 | LLSD element = queue.Dequeue(15000); // 15s timeout |
204 | 204 | ||
205 | 205 | ||
206 | String debug = "[EVENTQUEUE]: Got request for agent {0}: [ "; | 206 | String debug = "[EVENTQUEUE]: Got request for agent {0} in region {1}: [ "; |
207 | foreach(object key in request.Keys) | 207 | foreach(object key in request.Keys) |
208 | { | 208 | { |
209 | debug += key.ToString() + "=" + request[key].ToString() + " "; | 209 | debug += key.ToString() + "=" + request[key].ToString() + " "; |
210 | } | 210 | } |
211 | //m_log.DebugFormat(debug, agentID); | 211 | m_log.DebugFormat(debug, agentID, m_scene.RegionInfo.RegionName); |
212 | 212 | ||
213 | if (element == null) // didn't have an event in 15s | 213 | if (element == null) // didn't have an event in 15s |
214 | { | 214 | { |
@@ -239,7 +239,7 @@ namespace OpenSim.Region.Environment.Modules.Framework | |||
239 | responsedata["content_type"] = "application/llsd+xml"; | 239 | responsedata["content_type"] = "application/llsd+xml"; |
240 | responsedata["keepalive"] = true; | 240 | responsedata["keepalive"] = true; |
241 | responsedata["str_response_string"] = LLSDParser.SerializeXmlString(events); | 241 | responsedata["str_response_string"] = LLSDParser.SerializeXmlString(events); |
242 | //m_log.DebugFormat("[EVENTQUEUE]: sending fake response for {0}: {1}", agentID, responsedata["str_response_string"]); | 242 | m_log.DebugFormat("[EVENTQUEUE]: sending fake response for {0} in region{1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]); |
243 | 243 | ||
244 | return responsedata; | 244 | return responsedata; |
245 | } | 245 | } |
@@ -269,7 +269,7 @@ namespace OpenSim.Region.Environment.Modules.Framework | |||
269 | responsedata["content_type"] = "application/llsd+xml"; | 269 | responsedata["content_type"] = "application/llsd+xml"; |
270 | responsedata["keepalive"] = true; | 270 | responsedata["keepalive"] = true; |
271 | responsedata["str_response_string"] = LLSDParser.SerializeXmlString(events); | 271 | responsedata["str_response_string"] = LLSDParser.SerializeXmlString(events); |
272 | m_log.DebugFormat("[EVENTQUEUE]: sending response for {0}: {1}", agentID, responsedata["str_response_string"]); | 272 | m_log.DebugFormat("[EVENTQUEUE]: sending fake response for {0} in region{1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]); |
273 | 273 | ||
274 | return responsedata; | 274 | return responsedata; |
275 | } | 275 | } |
diff --git a/OpenSim/Region/Environment/Modules/Framework/EventQueueHelper.cs b/OpenSim/Region/Environment/Modules/Framework/EventQueueHelper.cs index 46f7a3f..43f1782 100644 --- a/OpenSim/Region/Environment/Modules/Framework/EventQueueHelper.cs +++ b/OpenSim/Region/Environment/Modules/Framework/EventQueueHelper.cs | |||
@@ -26,8 +26,8 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Net; | 29 | using System.Net; |
30 | 30 | using OpenMetaverse; | |
31 | using OpenMetaverse.StructuredData; | 31 | using OpenMetaverse.StructuredData; |
32 | 32 | ||
33 | namespace OpenSim.Region.Environment | 33 | namespace OpenSim.Region.Environment |
@@ -36,10 +36,23 @@ namespace OpenSim.Region.Environment | |||
36 | { | 36 | { |
37 | private EventQueueHelper() {} // no construction possible, it's an utility class | 37 | private EventQueueHelper() {} // no construction possible, it's an utility class |
38 | 38 | ||
39 | public static LLSD EnableSimulator(ulong regionHandle, IPEndPoint endPoint) | 39 | public static LLSD EnableSimulator(ulong Handle, IPEndPoint endPoint) |
40 | { | 40 | { |
41 | LLSDMap llsdSimInfo = new LLSDMap(3); | 41 | LLSDMap llsdSimInfo = new LLSDMap(3); |
42 | llsdSimInfo.Add("Handle", new LLSDBinary(regionHandle)); | 42 | byte[] regionhandle = new byte[8]; |
43 | int i = 0; | ||
44 | |||
45 | // Reverse endianness of RegionHandle | ||
46 | regionhandle[i++] = (byte)((Handle >> 56) % 256); | ||
47 | regionhandle[i++] = (byte)((Handle >> 48) % 256); | ||
48 | regionhandle[i++] = (byte)((Handle >> 40) % 256); | ||
49 | regionhandle[i++] = (byte)((Handle >> 32) % 256); | ||
50 | regionhandle[i++] = (byte)((Handle >> 24) % 256); | ||
51 | regionhandle[i++] = (byte)((Handle >> 16) % 256); | ||
52 | regionhandle[i++] = (byte)((Handle >> 8) % 256); | ||
53 | regionhandle[i++] = (byte)(Handle % 256); | ||
54 | |||
55 | llsdSimInfo.Add("Handle", new LLSDBinary(regionhandle)); | ||
43 | llsdSimInfo.Add("IP", new LLSDBinary(endPoint.Address.GetAddressBytes())); | 56 | llsdSimInfo.Add("IP", new LLSDBinary(endPoint.Address.GetAddressBytes())); |
44 | llsdSimInfo.Add("Port", new LLSDInteger(endPoint.Port)); | 57 | llsdSimInfo.Add("Port", new LLSDInteger(endPoint.Port)); |
45 | 58 | ||