One more module: EventQueueGetModule. Also making it non-optional for this dll.

integration
Diva Canto 2012-11-10 08:48:31 -08:00
parent fb7bbe167a
commit 4ac857f902
2 changed files with 39 additions and 57 deletions

View File

@ -55,8 +55,8 @@ namespace OpenSim.Region.ClientStack.Linden
public OSDMap body;
}
//[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
public class EventQueueGetModule : IEventQueue, IRegionModule
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
public class EventQueueGetModule : IEventQueue, INonSharedRegionModule
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@ -66,8 +66,6 @@ namespace OpenSim.Region.ClientStack.Linden
public int DebugLevel { get; set; }
protected Scene m_scene;
private IConfigSource m_gConfig;
bool enabledYN;
private Dictionary<UUID, int> m_ids = new Dictionary<UUID, int>();
@ -75,34 +73,17 @@ namespace OpenSim.Region.ClientStack.Linden
private Dictionary<UUID, UUID> m_QueueUUIDAvatarMapping = new Dictionary<UUID, UUID>();
private Dictionary<UUID, UUID> m_AvatarQueueUUIDMapping = new Dictionary<UUID, UUID>();
#region IRegionModule methods
public virtual void Initialise(Scene scene, IConfigSource config)
#region INonSharedRegionModule methods
public virtual void Initialise(IConfigSource config)
{
m_gConfig = config;
}
IConfig startupConfig = m_gConfig.Configs["Startup"];
ReadConfigAndPopulate(scene, startupConfig, "Startup");
if (enabledYN)
public void AddRegion(Scene scene)
{
m_scene = scene;
scene.RegisterModuleInterface<IEventQueue>(this);
// Register fallback handler
// Why does EQG Fail on region crossings!
//scene.CommsManager.HttpServer.AddLLSDHandler("/CAPS/EQG/", EventQueueFallBack);
// scene.EventManager.OnNewClient += OnNewClient;
// TODO: Leaving these open, or closing them when we
// become a child is incorrect. It messes up TP in a big
// way. CAPS/EQ need to be active as long as the UDP
// circuit is there.
scene.EventManager.OnClientClosed += ClientClosed;
scene.EventManager.OnMakeChildAgent += MakeChildAgent;
scene.EventManager.OnRegisterCaps += OnRegisterCaps;
@ -117,18 +98,21 @@ namespace OpenSim.Region.ClientStack.Linden
+ " >= 2 - turns on poll notification",
HandleDebugEq);
}
else
public void RemoveRegion(Scene scene)
{
m_gConfig = null;
}
if (m_scene != scene)
return;
scene.EventManager.OnClientClosed -= ClientClosed;
scene.EventManager.OnMakeChildAgent -= MakeChildAgent;
scene.EventManager.OnRegisterCaps -= OnRegisterCaps;
scene.UnregisterModuleInterface<IEventQueue>(this);
m_scene = null;
}
private void ReadConfigAndPopulate(Scene scene, IConfig startupConfig, string p)
{
enabledYN = startupConfig.GetBoolean("EventQueue", true);
}
public void PostInitialise()
public void RegionLoaded(Scene scene)
{
}
@ -141,10 +125,11 @@ namespace OpenSim.Region.ClientStack.Linden
get { return "EventQueueGetModule"; }
}
public bool IsSharedModule
public Type ReplaceableInterface
{
get { return false; }
get { return null; }
}
#endregion
protected void HandleDebugEq(string module, string[] args)

View File

@ -57,9 +57,6 @@
; ## CLIENTS
; ##
; Enables EventQueueGet Service.
EventQueue = true
; Set this to the DLL containing the client stack to use.
clientstack_plugin="OpenSim.Region.ClientStack.LindenUDP.dll"