diff options
author | Justin Clarke Casey | 2009-04-15 19:12:37 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-04-15 19:12:37 +0000 |
commit | 63936d442ca7e6bdc0f09a5e974c57b3b5726353 (patch) | |
tree | add84f90ce716015e93f9dae721e7876992e6b6c /OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs | |
parent | Convert both script engines to new region module format. Add proper unload (diff) | |
download | opensim-SC_OLD-63936d442ca7e6bdc0f09a5e974c57b3b5726353.zip opensim-SC_OLD-63936d442ca7e6bdc0f09a5e974c57b3b5726353.tar.gz opensim-SC_OLD-63936d442ca7e6bdc0f09a5e974c57b3b5726353.tar.bz2 opensim-SC_OLD-63936d442ca7e6bdc0f09a5e974c57b3b5726353.tar.xz |
* Make it possible to add a request id to load and save oar requests
* This allows specific requests to be identified.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs index dd67027..b6e2d31 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs | |||
@@ -25,6 +25,7 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | ||
28 | using System.IO; | 29 | using System.IO; |
29 | using System.Reflection; | 30 | using System.Reflection; |
30 | using log4net; | 31 | using log4net; |
@@ -63,38 +64,48 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
63 | 64 | ||
64 | public void ArchiveRegion(string savePath) | 65 | public void ArchiveRegion(string savePath) |
65 | { | 66 | { |
67 | ArchiveRegion(savePath, Guid.Empty); | ||
68 | } | ||
69 | |||
70 | public void ArchiveRegion(string savePath, Guid requestId) | ||
71 | { | ||
66 | m_log.InfoFormat( | 72 | m_log.InfoFormat( |
67 | "[ARCHIVER]: Writing archive for region {0} to {1}", m_scene.RegionInfo.RegionName, savePath); | 73 | "[ARCHIVER]: Writing archive for region {0} to {1}", m_scene.RegionInfo.RegionName, savePath); |
68 | 74 | ||
69 | new ArchiveWriteRequestPreparation(m_scene, savePath).ArchiveRegion(); | 75 | new ArchiveWriteRequestPreparation(m_scene, savePath, requestId).ArchiveRegion(); |
70 | } | 76 | } |
71 | 77 | ||
72 | public void ArchiveRegion(Stream saveStream) | 78 | public void ArchiveRegion(Stream saveStream) |
73 | { | 79 | { |
74 | new ArchiveWriteRequestPreparation(m_scene, saveStream).ArchiveRegion(); | 80 | ArchiveRegion(saveStream, Guid.Empty); |
75 | } | 81 | } |
82 | |||
83 | public void ArchiveRegion(Stream saveStream, Guid requestId) | ||
84 | { | ||
85 | new ArchiveWriteRequestPreparation(m_scene, saveStream, requestId).ArchiveRegion(); | ||
86 | } | ||
76 | 87 | ||
77 | public void DearchiveRegion(string loadPath) | 88 | public void DearchiveRegion(string loadPath) |
78 | { | 89 | { |
79 | DearchiveRegion(loadPath, false); | 90 | DearchiveRegion(loadPath, false, Guid.Empty); |
80 | } | 91 | } |
81 | 92 | ||
82 | public void DearchiveRegion(string loadPath, bool merge) | 93 | public void DearchiveRegion(string loadPath, bool merge, Guid requestId) |
83 | { | 94 | { |
84 | m_log.InfoFormat( | 95 | m_log.InfoFormat( |
85 | "[ARCHIVER]: Loading archive to region {0} from {1}", m_scene.RegionInfo.RegionName, loadPath); | 96 | "[ARCHIVER]: Loading archive to region {0} from {1}", m_scene.RegionInfo.RegionName, loadPath); |
86 | 97 | ||
87 | new ArchiveReadRequest(m_scene, loadPath, merge).DearchiveRegion(); | 98 | new ArchiveReadRequest(m_scene, loadPath, merge, requestId).DearchiveRegion(); |
88 | } | 99 | } |
89 | 100 | ||
90 | public void DearchiveRegion(Stream loadStream) | 101 | public void DearchiveRegion(Stream loadStream) |
91 | { | 102 | { |
92 | DearchiveRegion(loadStream, false); | 103 | DearchiveRegion(loadStream, false, Guid.Empty); |
93 | } | 104 | } |
94 | 105 | ||
95 | public void DearchiveRegion(Stream loadStream, bool merge) | 106 | public void DearchiveRegion(Stream loadStream, bool merge, Guid requestId) |
96 | { | 107 | { |
97 | new ArchiveReadRequest(m_scene, loadStream, merge).DearchiveRegion(); | 108 | new ArchiveReadRequest(m_scene, loadStream, merge, requestId).DearchiveRegion(); |
98 | } | 109 | } |
99 | } | 110 | } |
100 | } | 111 | } |