* With EventQueueGet enabled.. we can see into neighbor regions again on the Security 'fixed' client.. But don't try to cross yet!
parent
21bf26e9b4
commit
4f0c759fb0
|
@ -126,7 +126,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
|
||||||
{
|
{
|
||||||
if (!queues.ContainsKey(agentId))
|
if (!queues.ContainsKey(agentId))
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[EVENTQUEUE]: Adding new queue for agent {0}", agentId);
|
m_log.DebugFormat("[EVENTQUEUE]: Adding new queue for agent {0} in region {1}", agentId, m_scene.RegionInfo.RegionName);
|
||||||
queues[agentId] = new BlockingLLSDQueue();
|
queues[agentId] = new BlockingLLSDQueue();
|
||||||
}
|
}
|
||||||
return queues[agentId];
|
return queues[agentId];
|
||||||
|
@ -136,7 +136,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
|
||||||
#region IEventQueue Members
|
#region IEventQueue Members
|
||||||
public bool Enqueue(LLSD ev, UUID avatarID)
|
public bool Enqueue(LLSD ev, UUID avatarID)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[EVENTQUEUE]: Enqueuing event for {0}", avatarID);
|
m_log.DebugFormat("[EVENTQUEUE]: Enqueuing event for {0} in region {1}", avatarID, m_scene.RegionInfo.RegionName);
|
||||||
BlockingLLSDQueue queue = GetQueue(avatarID);
|
BlockingLLSDQueue queue = GetQueue(avatarID);
|
||||||
queue.Enqueue(ev);
|
queue.Enqueue(ev);
|
||||||
return true;
|
return true;
|
||||||
|
@ -145,7 +145,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
|
||||||
|
|
||||||
private void OnNewClient(IClientAPI client)
|
private void OnNewClient(IClientAPI client)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[EVENTQUEUE]: New client {0} detected.", client.AgentId);
|
m_log.DebugFormat("[EVENTQUEUE]: New client {0} detected in region {1}", client.AgentId, m_scene.RegionInfo.RegionName);
|
||||||
client.OnLogout += ClientClosed;
|
client.OnLogout += ClientClosed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,13 +158,13 @@ namespace OpenSim.Region.Environment.Modules.Framework
|
||||||
private void ClientClosed(UUID AgentID)
|
private void ClientClosed(UUID AgentID)
|
||||||
{
|
{
|
||||||
queues.Remove(AgentID);
|
queues.Remove(AgentID);
|
||||||
m_log.DebugFormat("[EVENTQUEUE]: Client {0} deregistered.", AgentID);
|
m_log.DebugFormat("[EVENTQUEUE]: Client {0} deregistered in region {1}.", AgentID, m_scene.RegionInfo.RegionName);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID)
|
private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[EVENTQUEUE]: Avatar {0} entering parcel {1} in region {2}.",
|
m_log.DebugFormat("[EVENTQUEUE]: Avatar {0} entering parcel {1} in region {2}.",
|
||||||
avatar.UUID, localLandID, regionID);
|
avatar.UUID, localLandID, m_scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
|
||||||
|
|
||||||
public void OnRegisterCaps(UUID agentID, Caps caps)
|
public void OnRegisterCaps(UUID agentID, Caps caps)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[EVENTQUEUE] OnRegisterCaps: agentID {0} caps {1}", agentID, caps);
|
m_log.DebugFormat("[EVENTQUEUE] OnRegisterCaps: agentID {0} caps {1} region", agentID, caps, m_scene.RegionInfo.RegionName);
|
||||||
string capsBase = "/CAPS/";
|
string capsBase = "/CAPS/";
|
||||||
caps.RegisterHandler("EventQueueGet",
|
caps.RegisterHandler("EventQueueGet",
|
||||||
new RestHTTPHandler("POST", capsBase + UUID.Random().ToString(),
|
new RestHTTPHandler("POST", capsBase + UUID.Random().ToString(),
|
||||||
|
@ -203,12 +203,12 @@ namespace OpenSim.Region.Environment.Modules.Framework
|
||||||
LLSD element = queue.Dequeue(15000); // 15s timeout
|
LLSD element = queue.Dequeue(15000); // 15s timeout
|
||||||
|
|
||||||
|
|
||||||
String debug = "[EVENTQUEUE]: Got request for agent {0}: [ ";
|
String debug = "[EVENTQUEUE]: Got request for agent {0} in region {1}: [ ";
|
||||||
foreach(object key in request.Keys)
|
foreach(object key in request.Keys)
|
||||||
{
|
{
|
||||||
debug += key.ToString() + "=" + request[key].ToString() + " ";
|
debug += key.ToString() + "=" + request[key].ToString() + " ";
|
||||||
}
|
}
|
||||||
//m_log.DebugFormat(debug, agentID);
|
m_log.DebugFormat(debug, agentID, m_scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
if (element == null) // didn't have an event in 15s
|
if (element == null) // didn't have an event in 15s
|
||||||
{
|
{
|
||||||
|
@ -239,7 +239,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
|
||||||
responsedata["content_type"] = "application/llsd+xml";
|
responsedata["content_type"] = "application/llsd+xml";
|
||||||
responsedata["keepalive"] = true;
|
responsedata["keepalive"] = true;
|
||||||
responsedata["str_response_string"] = LLSDParser.SerializeXmlString(events);
|
responsedata["str_response_string"] = LLSDParser.SerializeXmlString(events);
|
||||||
//m_log.DebugFormat("[EVENTQUEUE]: sending fake response for {0}: {1}", agentID, responsedata["str_response_string"]);
|
m_log.DebugFormat("[EVENTQUEUE]: sending fake response for {0} in region{1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]);
|
||||||
|
|
||||||
return responsedata;
|
return responsedata;
|
||||||
}
|
}
|
||||||
|
@ -269,7 +269,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
|
||||||
responsedata["content_type"] = "application/llsd+xml";
|
responsedata["content_type"] = "application/llsd+xml";
|
||||||
responsedata["keepalive"] = true;
|
responsedata["keepalive"] = true;
|
||||||
responsedata["str_response_string"] = LLSDParser.SerializeXmlString(events);
|
responsedata["str_response_string"] = LLSDParser.SerializeXmlString(events);
|
||||||
m_log.DebugFormat("[EVENTQUEUE]: sending response for {0}: {1}", agentID, responsedata["str_response_string"]);
|
m_log.DebugFormat("[EVENTQUEUE]: sending fake response for {0} in region{1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]);
|
||||||
|
|
||||||
return responsedata;
|
return responsedata;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using OpenMetaverse;
|
||||||
using OpenMetaverse.StructuredData;
|
using OpenMetaverse.StructuredData;
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment
|
namespace OpenSim.Region.Environment
|
||||||
|
@ -36,10 +36,23 @@ namespace OpenSim.Region.Environment
|
||||||
{
|
{
|
||||||
private EventQueueHelper() {} // no construction possible, it's an utility class
|
private EventQueueHelper() {} // no construction possible, it's an utility class
|
||||||
|
|
||||||
public static LLSD EnableSimulator(ulong regionHandle, IPEndPoint endPoint)
|
public static LLSD EnableSimulator(ulong Handle, IPEndPoint endPoint)
|
||||||
{
|
{
|
||||||
LLSDMap llsdSimInfo = new LLSDMap(3);
|
LLSDMap llsdSimInfo = new LLSDMap(3);
|
||||||
llsdSimInfo.Add("Handle", new LLSDBinary(regionHandle));
|
byte[] regionhandle = new byte[8];
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
|
// Reverse endianness of RegionHandle
|
||||||
|
regionhandle[i++] = (byte)((Handle >> 56) % 256);
|
||||||
|
regionhandle[i++] = (byte)((Handle >> 48) % 256);
|
||||||
|
regionhandle[i++] = (byte)((Handle >> 40) % 256);
|
||||||
|
regionhandle[i++] = (byte)((Handle >> 32) % 256);
|
||||||
|
regionhandle[i++] = (byte)((Handle >> 24) % 256);
|
||||||
|
regionhandle[i++] = (byte)((Handle >> 16) % 256);
|
||||||
|
regionhandle[i++] = (byte)((Handle >> 8) % 256);
|
||||||
|
regionhandle[i++] = (byte)(Handle % 256);
|
||||||
|
|
||||||
|
llsdSimInfo.Add("Handle", new LLSDBinary(regionhandle));
|
||||||
llsdSimInfo.Add("IP", new LLSDBinary(endPoint.Address.GetAddressBytes()));
|
llsdSimInfo.Add("IP", new LLSDBinary(endPoint.Address.GetAddressBytes()));
|
||||||
llsdSimInfo.Add("Port", new LLSDInteger(endPoint.Port));
|
llsdSimInfo.Add("Port", new LLSDInteger(endPoint.Port));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue