diff options
author | Dr Scofield | 2009-05-18 10:04:28 +0000 |
---|---|---|
committer | Dr Scofield | 2009-05-18 10:04:28 +0000 |
commit | e3f2cfa1ca8dab6e4e901fb2dbcc200131751aed (patch) | |
tree | 739d0ce05a8c8626dc1f9ddd42808f08de2af709 /OpenSim/ApplicationPlugins/RemoteController | |
parent | fixing XmlWriter problem (diff) | |
download | opensim-SC-e3f2cfa1ca8dab6e4e901fb2dbcc200131751aed.zip opensim-SC-e3f2cfa1ca8dab6e4e901fb2dbcc200131751aed.tar.gz opensim-SC-e3f2cfa1ca8dab6e4e901fb2dbcc200131751aed.tar.bz2 opensim-SC-e3f2cfa1ca8dab6e4e901fb2dbcc200131751aed.tar.xz |
From: Alan Webb <alan_webb@us.ibm.com>
Fixes:
[1] Sharing exception on remote OAR management
[2] Occasional 505 error talking to Tomcat
[3] Occasional mono aborts caused by mlog in the
script engine's app domain (mono 2.4)
Diffstat (limited to 'OpenSim/ApplicationPlugins/RemoteController')
-rw-r--r-- | OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | 19 |
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; | |||
33 | using System.Net; | 33 | using System.Net; |
34 | using System.Reflection; | 34 | using System.Reflection; |
35 | using System.Timers; | 35 | using System.Timers; |
36 | using System.Threading; | ||
36 | using log4net; | 37 | using log4net; |
37 | using Nini.Config; | 38 | using Nini.Config; |
38 | using Nwc.XmlRpc; | 39 | using 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"); |