diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 10 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 13 |
3 files changed, 19 insertions, 10 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 3df3a1c..cc18f1a 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -162,11 +162,11 @@ namespace OpenSim | |||
162 | 162 | ||
163 | protected virtual void LoadPlugins() | 163 | protected virtual void LoadPlugins() |
164 | { | 164 | { |
165 | PluginLoader<IApplicationPlugin> loader = | 165 | using (PluginLoader<IApplicationPlugin> loader = new PluginLoader<IApplicationPlugin>(new ApplicationPluginInitialiser(this))) |
166 | new PluginLoader<IApplicationPlugin>(new ApplicationPluginInitialiser(this)); | 166 | { |
167 | 167 | loader.Load("/OpenSim/Startup"); | |
168 | loader.Load("/OpenSim/Startup"); | 168 | m_plugins = loader.Plugins; |
169 | m_plugins = loader.Plugins; | 169 | } |
170 | } | 170 | } |
171 | 171 | ||
172 | protected override List<string> GetHelpTopics() | 172 | protected override List<string> GetHelpTopics() |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 232c9c9..1dd58bf 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |||
@@ -814,6 +814,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
814 | // on to en-US to avoid number parsing issues | 814 | // on to en-US to avoid number parsing issues |
815 | Culture.SetCurrentCulture(); | 815 | Culture.SetCurrentCulture(); |
816 | 816 | ||
817 | // Typecast the function to an Action<IClientAPI> once here to avoid allocating a new | ||
818 | // Action generic every round | ||
819 | Action<IClientAPI> clientPacketHandler = ClientOutgoingPacketHandler; | ||
820 | |||
817 | while (base.IsRunning) | 821 | while (base.IsRunning) |
818 | { | 822 | { |
819 | try | 823 | try |
@@ -862,7 +866,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
862 | 866 | ||
863 | // Handle outgoing packets, resends, acknowledgements, and pings for each | 867 | // Handle outgoing packets, resends, acknowledgements, and pings for each |
864 | // client. m_packetSent will be set to true if a packet is sent | 868 | // client. m_packetSent will be set to true if a packet is sent |
865 | m_scene.ClientManager.ForEachSync(ClientOutgoingPacketHandler); | 869 | m_scene.ClientManager.ForEachSync(clientPacketHandler); |
866 | 870 | ||
867 | // If nothing was sent, sleep for the minimum amount of time before a | 871 | // If nothing was sent, sleep for the minimum amount of time before a |
868 | // token bucket could get more tokens | 872 | // token bucket could get more tokens |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index ee848bb..a3bc04b 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1223,10 +1223,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1223 | if (!m_backingup) | 1223 | if (!m_backingup) |
1224 | { | 1224 | { |
1225 | m_backingup = true; | 1225 | m_backingup = true; |
1226 | 1226 | Util.FireAndForget(BackupWaitCallback); | |
1227 | System.ComponentModel.BackgroundWorker backupWorker = new System.ComponentModel.BackgroundWorker(); | ||
1228 | backupWorker.DoWork += delegate(object sender, System.ComponentModel.DoWorkEventArgs e) { Backup(); }; | ||
1229 | backupWorker.RunWorkerAsync(); | ||
1230 | } | 1227 | } |
1231 | } | 1228 | } |
1232 | 1229 | ||
@@ -1239,6 +1236,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
1239 | } | 1236 | } |
1240 | 1237 | ||
1241 | /// <summary> | 1238 | /// <summary> |
1239 | /// Wrapper for Backup() that can be called with Util.FireAndForget() | ||
1240 | /// </summary> | ||
1241 | private void BackupWaitCallback(object o) | ||
1242 | { | ||
1243 | Backup(); | ||
1244 | } | ||
1245 | |||
1246 | /// <summary> | ||
1242 | /// Backup the scene. This acts as the main method of the backup thread. | 1247 | /// Backup the scene. This acts as the main method of the backup thread. |
1243 | /// </summary> | 1248 | /// </summary> |
1244 | /// <returns></returns> | 1249 | /// <returns></returns> |