aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs19
1 files changed, 18 insertions, 1 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 9a25faa..9ed00e6 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -33,6 +33,7 @@ using System.Xml;
33using System.Net; 33using System.Net;
34using System.Reflection; 34using System.Reflection;
35using System.Timers; 35using System.Timers;
36using System.Threading;
36using log4net; 37using log4net;
37using Nini.Config; 38using Nini.Config;
38using Nwc.XmlRpc; 39using Nwc.XmlRpc;
@@ -57,6 +58,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
57 58
58 private static bool daload = false; 59 private static bool daload = false;
59 private static Object rslock = new Object(); 60 private static Object rslock = new Object();
61 private static Object SOLock = new Object();
60 62
61 private OpenSimBase m_app; 63 private OpenSimBase m_app;
62 private BaseHttpServer m_httpd; 64 private BaseHttpServer m_httpd;
@@ -367,7 +369,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
367 }); 369 });
368 370
369 // Perform shutdown 371 // Perform shutdown
370 Timer shutdownTimer = new Timer(timeout); // Wait before firing 372 System.Timers.Timer shutdownTimer = new System.Timers.Timer(timeout); // Wait before firing
371 shutdownTimer.AutoReset = false; 373 shutdownTimer.AutoReset = false;
372 shutdownTimer.Elapsed += new ElapsedEventHandler(shutdownTimer_Elapsed); 374 shutdownTimer.Elapsed += new ElapsedEventHandler(shutdownTimer_Elapsed);
373 shutdownTimer.Start(); 375 shutdownTimer.Start();
@@ -1843,14 +1845,23 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1843 else throw new Exception("neither region_name nor region_uuid given"); 1845 else throw new Exception("neither region_name nor region_uuid given");
1844 1846
1845 IRegionArchiverModule archiver = scene.RequestModuleInterface<IRegionArchiverModule>(); 1847 IRegionArchiverModule archiver = scene.RequestModuleInterface<IRegionArchiverModule>();
1848
1849
1846 if (archiver != null) 1850 if (archiver != null)
1851 {
1852 scene.EventManager.OnOarFileSaved += RemoteAdminOarSaveCompleted;
1847 archiver.ArchiveRegion(filename); 1853 archiver.ArchiveRegion(filename);
1854 lock(SOLock) Monitor.Wait(SOLock,5000);
1855 scene.EventManager.OnOarFileSaved -= RemoteAdminOarSaveCompleted;
1856 }
1848 else 1857 else
1849 throw new Exception("Archiver module not present for scene"); 1858 throw new Exception("Archiver module not present for scene");
1850 1859
1860
1851 responseData["saved"] = true; 1861 responseData["saved"] = true;
1852 1862
1853 response.Value = responseData; 1863 response.Value = responseData;
1864
1854 } 1865 }
1855 catch (Exception e) 1866 catch (Exception e)
1856 { 1867 {
@@ -1867,6 +1878,12 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1867 return response; 1878 return response;
1868 } 1879 }
1869 1880
1881 private void RemoteAdminOarSaveCompleted(Guid uuid, string name)
1882 {
1883 m_log.DebugFormat("[RADMIN] File processing complete for {0}", name);
1884 lock(SOLock) Monitor.Pulse(SOLock);
1885 }
1886
1870 public XmlRpcResponse XmlRpcLoadXMLMethod(XmlRpcRequest request) 1887 public XmlRpcResponse XmlRpcLoadXMLMethod(XmlRpcRequest request)
1871 { 1888 {
1872 m_log.Info("[RADMIN]: Received Load XML Administrator Request"); 1889 m_log.Info("[RADMIN]: Received Load XML Administrator Request");