aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorTeravus Ovares2008-09-27 23:06:28 +0000
committerTeravus Ovares2008-09-27 23:06:28 +0000
commit21bf26e9b472f830c1a78ae0be6fff5e1e77f250 (patch)
treeb49da5334835d5a39bd8f97deb0579a8781fa648
parent* Replace a generic error handler. (diff)
downloadopensim-SC_OLD-21bf26e9b472f830c1a78ae0be6fff5e1e77f250.zip
opensim-SC_OLD-21bf26e9b472f830c1a78ae0be6fff5e1e77f250.tar.gz
opensim-SC_OLD-21bf26e9b472f830c1a78ae0be6fff5e1e77f250.tar.bz2
opensim-SC_OLD-21bf26e9b472f830c1a78ae0be6fff5e1e77f250.tar.xz
* Adds flag to enable/disable EventQueueGet.
* If EventQueueGet is enabled, use that instead of a few UDP packets, if it's disabled use the UDP packets like normal. * We *really* suggest users do not turn on EventQueueGet yet.. as it's highly experimental, broken, and resource intensive * Updated OpenSim.ini.example * Testers of EventQueueGet.. in OpenSim.ini, it's in the [Startup] Section.. change EventQueue = false, to EventQueue = true.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs29
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs16
-rw-r--r--bin/OpenSim.ini.example3
3 files changed, 37 insertions, 11 deletions
diff --git a/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs b/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs
index ebaa406..14574e0 100644
--- a/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs
+++ b/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs
@@ -63,6 +63,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
63 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 63 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
64 private Scene m_scene = null; 64 private Scene m_scene = null;
65 private IConfigSource m_gConfig; 65 private IConfigSource m_gConfig;
66 bool enabledYN = false;
66 67
67 private Dictionary<UUID, int> m_ids = new Dictionary<UUID, int>(); 68 private Dictionary<UUID, int> m_ids = new Dictionary<UUID, int>();
68 69
@@ -72,26 +73,34 @@ namespace OpenSim.Region.Environment.Modules.Framework
72 public void Initialise(Scene scene, IConfigSource config) 73 public void Initialise(Scene scene, IConfigSource config)
73 { 74 {
74 m_gConfig = config; 75 m_gConfig = config;
75 m_scene = scene; 76
76 77
77 78
78 IConfig startupConfig = m_gConfig.Configs["Startup"]; 79 IConfig startupConfig = m_gConfig.Configs["Startup"];
79 80
80 ReadConfigAndPopulate(scene, startupConfig, "Startup"); 81 ReadConfigAndPopulate(scene, startupConfig, "Startup");
81 82
82 scene.RegisterModuleInterface<IEventQueue>(this); 83 if (enabledYN)
83 84 {
84 scene.EventManager.OnNewClient += OnNewClient; 85 m_scene = scene;
85 scene.EventManager.OnClientClosed += ClientClosed; 86 scene.RegisterModuleInterface<IEventQueue>(this);
86 scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel; 87
87 scene.EventManager.OnMakeChildAgent += MakeChildAgent; 88 scene.EventManager.OnNewClient += OnNewClient;
88 scene.EventManager.OnRegisterCaps += OnRegisterCaps; 89 scene.EventManager.OnClientClosed += ClientClosed;
90 scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
91 scene.EventManager.OnMakeChildAgent += MakeChildAgent;
92 scene.EventManager.OnRegisterCaps += OnRegisterCaps;
93 }
94 else
95 {
96 m_gConfig = null;
97 }
89 98
90 } 99 }
91 100
92 private void ReadConfigAndPopulate(Scene scene, IConfig startupConfig, string p) 101 private void ReadConfigAndPopulate(Scene scene, IConfig startupConfig, string p)
93 { 102 {
94 103 enabledYN = startupConfig.GetBoolean("EventQueue", false);
95 } 104 }
96 105
97 public void PostInitialise() 106 public void PostInitialise()
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
index c95068b..a340fe2 100644
--- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
@@ -31,9 +31,12 @@ using System.Net;
31using System.Reflection; 31using System.Reflection;
32using System.Threading; 32using System.Threading;
33using OpenMetaverse; 33using OpenMetaverse;
34using OpenMetaverse.StructuredData;
34using log4net; 35using log4net;
35using OpenSim.Framework; 36using OpenSim.Framework;
36using OpenSim.Framework.Communications; 37using OpenSim.Framework.Communications;
38using OpenSim.Region.Interfaces;
39using LLSD = OpenMetaverse.StructuredData.LLSD;
37 40
38namespace OpenSim.Region.Environment.Scenes 41namespace OpenSim.Region.Environment.Scenes
39{ 42{
@@ -283,7 +286,18 @@ namespace OpenSim.Region.Environment.Scenes
283 286
284 if (regionAccepted) 287 if (regionAccepted)
285 { 288 {
286 avatar.ControllingClient.InformClientOfNeighbour(regionHandle, endPoint); 289 IEventQueue eq = avatar.Scene.RequestModuleInterface<IEventQueue>();
290 if (eq != null)
291 {
292 LLSD Item = EventQueueHelper.EnableSimulator(regionHandle, endPoint);
293 eq.Enqueue(Item, avatar.UUID);
294 }
295 else
296 {
297 avatar.ControllingClient.InformClientOfNeighbour(regionHandle, endPoint);
298 // TODO: make Event Queue disablable!
299 }
300
287 avatar.AddNeighbourRegion(regionHandle); 301 avatar.AddNeighbourRegion(regionHandle);
288 m_log.Info("[INTERGRID]: Completed inform client about neighbours"); 302 m_log.Info("[INTERGRID]: Completed inform client about neighbours");
289 } 303 }
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index e4cc891..90538a2 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -4,6 +4,9 @@
4; Set this to false if you are running OpenSimulator in standalone mode 4; Set this to false if you are running OpenSimulator in standalone mode
5gridmode = false 5gridmode = false
6 6
7; Experimental! Enables EventQueueGet which is highly broken right now.
8EventQueue = false
9
7; ## 10; ##
8; ## REGIONS 11; ## REGIONS
9; ## 12; ##