diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 9a25faac40..9ed00e6111 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs @@ -33,6 +33,7 @@ using System.Xml; using System.Net; using System.Reflection; using System.Timers; +using System.Threading; using log4net; using Nini.Config; using Nwc.XmlRpc; @@ -57,6 +58,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController private static bool daload = false; private static Object rslock = new Object(); + private static Object SOLock = new Object(); private OpenSimBase m_app; private BaseHttpServer m_httpd; @@ -367,7 +369,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController }); // Perform shutdown - Timer shutdownTimer = new Timer(timeout); // Wait before firing + System.Timers.Timer shutdownTimer = new System.Timers.Timer(timeout); // Wait before firing shutdownTimer.AutoReset = false; shutdownTimer.Elapsed += new ElapsedEventHandler(shutdownTimer_Elapsed); shutdownTimer.Start(); @@ -1843,14 +1845,23 @@ namespace OpenSim.ApplicationPlugins.RemoteController else throw new Exception("neither region_name nor region_uuid given"); IRegionArchiverModule archiver = scene.RequestModuleInterface(); + + if (archiver != null) + { + scene.EventManager.OnOarFileSaved += RemoteAdminOarSaveCompleted; archiver.ArchiveRegion(filename); + lock(SOLock) Monitor.Wait(SOLock,5000); + scene.EventManager.OnOarFileSaved -= RemoteAdminOarSaveCompleted; + } else throw new Exception("Archiver module not present for scene"); + responseData["saved"] = true; response.Value = responseData; + } catch (Exception e) { @@ -1867,6 +1878,12 @@ namespace OpenSim.ApplicationPlugins.RemoteController return response; } + private void RemoteAdminOarSaveCompleted(Guid uuid, string name) + { + m_log.DebugFormat("[RADMIN] File processing complete for {0}", name); + lock(SOLock) Monitor.Pulse(SOLock); + } + public XmlRpcResponse XmlRpcLoadXMLMethod(XmlRpcRequest request) { m_log.Info("[RADMIN]: Received Load XML Administrator Request"); diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index a5ceb19d40..e3d2aee24d 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs @@ -460,6 +460,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver // request.Credentials = credentials; request.ContentLength = 0; + request.KeepAlive = false; WebResponse response = request.GetResponse(); Stream file = response.GetResponseStream(); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs index 3a7367475a..fc9db83746 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs @@ -37,7 +37,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase { public class Executor : MarshalByRefObject { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); /// /// Contains the script to execute functions in. @@ -173,7 +173,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase } catch { - m_log.Error("Event "+EventName+" not found."); + // m_log.Error("Event "+EventName+" not found."); // Event name not found, cache it as not found Events.Add(EventName, null); }