diff options
Diffstat (limited to 'OpenSim/Region/CoreModules')
7 files changed, 122 insertions, 57 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 4af7a1b..7d77a77 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -51,6 +51,12 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
51 | public class ArchiveReadRequest | 51 | public class ArchiveReadRequest |
52 | { | 52 | { |
53 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 53 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
54 | |||
55 | /// <summary> | ||
56 | /// The maximum major version of OAR that we can read. Minor versions shouldn't need a number since version | ||
57 | /// bumps here should be compatible. | ||
58 | /// </summary> | ||
59 | public static int MAX_MAJOR_VERSION = 0; | ||
54 | 60 | ||
55 | protected Scene m_scene; | 61 | protected Scene m_scene; |
56 | protected Stream m_loadStream; | 62 | protected Stream m_loadStream; |
@@ -515,6 +521,22 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
515 | { | 521 | { |
516 | if (xtr.NodeType == XmlNodeType.Element) | 522 | if (xtr.NodeType == XmlNodeType.Element) |
517 | { | 523 | { |
524 | if (xtr.Name.ToString() == "archive") | ||
525 | { | ||
526 | int majorVersion = int.Parse(xtr["major_version"]); | ||
527 | int minorVersion = int.Parse(xtr["minor_version"]); | ||
528 | string version = string.Format("{0}.{1}", majorVersion, minorVersion); | ||
529 | |||
530 | if (majorVersion > MAX_MAJOR_VERSION) | ||
531 | { | ||
532 | throw new Exception( | ||
533 | string.Format( | ||
534 | "The OAR you are trying to load has major version number of {0} but this version of OpenSim can only load OARs with major version number {1} and below", | ||
535 | majorVersion, MAX_MAJOR_VERSION)); | ||
536 | } | ||
537 | |||
538 | m_log.InfoFormat("[ARCHIVER]: Loading OAR with version {0}", version); | ||
539 | } | ||
518 | if (xtr.Name.ToString() == "datetime") | 540 | if (xtr.Name.ToString() == "datetime") |
519 | { | 541 | { |
520 | int value; | 542 | int value; |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs index 586d98e..c062833 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs | |||
@@ -60,6 +60,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
60 | protected Scene m_scene; | 60 | protected Scene m_scene; |
61 | protected TarArchiveWriter m_archiveWriter; | 61 | protected TarArchiveWriter m_archiveWriter; |
62 | protected Guid m_requestId; | 62 | protected Guid m_requestId; |
63 | protected Dictionary<string, object> m_options; | ||
63 | 64 | ||
64 | public ArchiveWriteRequestExecution( | 65 | public ArchiveWriteRequestExecution( |
65 | List<SceneObjectGroup> sceneObjects, | 66 | List<SceneObjectGroup> sceneObjects, |
@@ -67,7 +68,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
67 | IRegionSerialiserModule serialiser, | 68 | IRegionSerialiserModule serialiser, |
68 | Scene scene, | 69 | Scene scene, |
69 | TarArchiveWriter archiveWriter, | 70 | TarArchiveWriter archiveWriter, |
70 | Guid requestId) | 71 | Guid requestId, |
72 | Dictionary<string, object> options) | ||
71 | { | 73 | { |
72 | m_sceneObjects = sceneObjects; | 74 | m_sceneObjects = sceneObjects; |
73 | m_terrainModule = terrainModule; | 75 | m_terrainModule = terrainModule; |
@@ -75,6 +77,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
75 | m_scene = scene; | 77 | m_scene = scene; |
76 | m_archiveWriter = archiveWriter; | 78 | m_archiveWriter = archiveWriter; |
77 | m_requestId = requestId; | 79 | m_requestId = requestId; |
80 | m_options = options; | ||
78 | } | 81 | } |
79 | 82 | ||
80 | protected internal void ReceivedAllAssets( | 83 | protected internal void ReceivedAllAssets( |
@@ -105,12 +108,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
105 | // "[ARCHIVER]: Received {0} of {1} assets requested", | 108 | // "[ARCHIVER]: Received {0} of {1} assets requested", |
106 | // assetsFoundUuids.Count, assetsFoundUuids.Count + assetsNotFoundUuids.Count); | 109 | // assetsFoundUuids.Count, assetsFoundUuids.Count + assetsNotFoundUuids.Count); |
107 | 110 | ||
108 | m_log.InfoFormat("[ARCHIVER]: Creating archive file. This may take some time."); | ||
109 | |||
110 | // Write out control file | ||
111 | m_archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p2ControlFile()); | ||
112 | m_log.InfoFormat("[ARCHIVER]: Added control file to archive."); | ||
113 | |||
114 | // Write out region settings | 111 | // Write out region settings |
115 | string settingsPath | 112 | string settingsPath |
116 | = String.Format("{0}{1}.xml", ArchiveConstants.SETTINGS_PATH, m_scene.RegionInfo.RegionName); | 113 | = String.Format("{0}{1}.xml", ArchiveConstants.SETTINGS_PATH, m_scene.RegionInfo.RegionName); |
@@ -140,47 +137,22 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
140 | 137 | ||
141 | m_log.InfoFormat("[ARCHIVER]: Added terrain information to archive."); | 138 | m_log.InfoFormat("[ARCHIVER]: Added terrain information to archive."); |
142 | 139 | ||
140 | Dictionary<string, object> serializationOptions = new Dictionary<string, object>(); | ||
141 | // if (m_options.ContainsKey("version") && (string)m_options["version"] == "0") | ||
142 | // serializationOptions["old-guids"] = true; | ||
143 | |||
143 | // Write out scene object metadata | 144 | // Write out scene object metadata |
144 | foreach (SceneObjectGroup sceneObject in m_sceneObjects) | 145 | foreach (SceneObjectGroup sceneObject in m_sceneObjects) |
145 | { | 146 | { |
146 | //m_log.DebugFormat("[ARCHIVER]: Saving {0} {1}, {2}", entity.Name, entity.UUID, entity.GetType()); | 147 | //m_log.DebugFormat("[ARCHIVER]: Saving {0} {1}, {2}", entity.Name, entity.UUID, entity.GetType()); |
147 | 148 | ||
148 | string serializedObject = m_serialiser.SerializeGroupToXml2(sceneObject); | 149 | string serializedObject = m_serialiser.SerializeGroupToXml2(sceneObject, serializationOptions); |
149 | m_archiveWriter.WriteFile(ArchiveHelpers.CreateObjectPath(sceneObject), serializedObject); | 150 | m_archiveWriter.WriteFile(ArchiveHelpers.CreateObjectPath(sceneObject), serializedObject); |
150 | } | 151 | } |
151 | 152 | ||
152 | m_log.InfoFormat("[ARCHIVER]: Added scene objects to archive."); | 153 | m_log.InfoFormat("[ARCHIVER]: Added scene objects to archive."); |
153 | } | 154 | } |
154 | 155 | ||
155 | /// <summary> | 156 | |
156 | /// Create the control file for a 0.2 version archive | ||
157 | /// </summary> | ||
158 | /// <returns></returns> | ||
159 | public static string Create0p2ControlFile() | ||
160 | { | ||
161 | StringWriter sw = new StringWriter(); | ||
162 | XmlTextWriter xtw = new XmlTextWriter(sw); | ||
163 | xtw.Formatting = Formatting.Indented; | ||
164 | xtw.WriteStartDocument(); | ||
165 | xtw.WriteStartElement("archive"); | ||
166 | xtw.WriteAttributeString("major_version", "0"); | ||
167 | xtw.WriteAttributeString("minor_version", "3"); | ||
168 | |||
169 | xtw.WriteStartElement("creation_info"); | ||
170 | DateTime now = DateTime.UtcNow; | ||
171 | TimeSpan t = now - new DateTime(1970, 1, 1); | ||
172 | xtw.WriteElementString("datetime", ((int)t.TotalSeconds).ToString()); | ||
173 | xtw.WriteElementString("id", UUID.Random().ToString()); | ||
174 | xtw.WriteEndElement(); | ||
175 | xtw.WriteEndElement(); | ||
176 | |||
177 | xtw.Flush(); | ||
178 | xtw.Close(); | ||
179 | |||
180 | String s = sw.ToString(); | ||
181 | sw.Close(); | ||
182 | |||
183 | return s; | ||
184 | } | ||
185 | } | 157 | } |
186 | } | 158 | } |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs index 283b33b..43789af 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs | |||
@@ -32,6 +32,7 @@ using System.IO.Compression; | |||
32 | using System.Reflection; | 32 | using System.Reflection; |
33 | using System.Text.RegularExpressions; | 33 | using System.Text.RegularExpressions; |
34 | using System.Threading; | 34 | using System.Threading; |
35 | using System.Xml; | ||
35 | using log4net; | 36 | using log4net; |
36 | using OpenMetaverse; | 37 | using OpenMetaverse; |
37 | using OpenSim.Framework; | 38 | using OpenSim.Framework; |
@@ -98,7 +99,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
98 | /// Archive the region requested. | 99 | /// Archive the region requested. |
99 | /// </summary> | 100 | /// </summary> |
100 | /// <exception cref="System.IO.IOException">if there was an io problem with creating the file</exception> | 101 | /// <exception cref="System.IO.IOException">if there was an io problem with creating the file</exception> |
101 | public void ArchiveRegion() | 102 | public void ArchiveRegion(Dictionary<string, object> options) |
102 | { | 103 | { |
103 | Dictionary<UUID, AssetType> assetUuids = new Dictionary<UUID, AssetType>(); | 104 | Dictionary<UUID, AssetType> assetUuids = new Dictionary<UUID, AssetType>(); |
104 | 105 | ||
@@ -165,11 +166,71 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
165 | m_scene.RequestModuleInterface<IRegionSerialiserModule>(), | 166 | m_scene.RequestModuleInterface<IRegionSerialiserModule>(), |
166 | m_scene, | 167 | m_scene, |
167 | archiveWriter, | 168 | archiveWriter, |
168 | m_requestId); | 169 | m_requestId, |
170 | options); | ||
171 | |||
172 | m_log.InfoFormat("[ARCHIVER]: Creating archive file. This may take some time."); | ||
173 | |||
174 | // Write out control file | ||
175 | archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p2ControlFile(options)); | ||
176 | m_log.InfoFormat("[ARCHIVER]: Added control file to archive."); | ||
169 | 177 | ||
170 | new AssetsRequest( | 178 | new AssetsRequest( |
171 | new AssetsArchiver(archiveWriter), assetUuids, | 179 | new AssetsArchiver(archiveWriter), assetUuids, |
172 | m_scene.AssetService, awre.ReceivedAllAssets).Execute(); | 180 | m_scene.AssetService, awre.ReceivedAllAssets).Execute(); |
173 | } | 181 | } |
182 | |||
183 | /// <summary> | ||
184 | /// Create the control file for the most up to date archive | ||
185 | /// </summary> | ||
186 | /// <returns></returns> | ||
187 | public static string Create0p2ControlFile(Dictionary<string, object> options) | ||
188 | { | ||
189 | int majorVersion = 0, minorVersion = 4; | ||
190 | |||
191 | /* | ||
192 | if (options.ContainsKey("version") && (string)options["version"] == "0") | ||
193 | { | ||
194 | majorVersion = 0; | ||
195 | minorVersion = 3; | ||
196 | } | ||
197 | else | ||
198 | { | ||
199 | majorVersion = 1; | ||
200 | minorVersion = 0; | ||
201 | } | ||
202 | */ | ||
203 | |||
204 | m_log.InfoFormat("[ARCHIVER]: Creating version {0}.{1} OAR", majorVersion, minorVersion); | ||
205 | // if (majorVersion == 1) | ||
206 | // { | ||
207 | // m_log.WarnFormat("[ARCHIVER]: Please be aware that version 1.0 OARs are not compatible with OpenSim 0.7.0.2 and earlier. Please use the --version=0 option if you want to produce a compatible OAR"); | ||
208 | // } | ||
209 | |||
210 | |||
211 | StringWriter sw = new StringWriter(); | ||
212 | XmlTextWriter xtw = new XmlTextWriter(sw); | ||
213 | xtw.Formatting = Formatting.Indented; | ||
214 | xtw.WriteStartDocument(); | ||
215 | xtw.WriteStartElement("archive"); | ||
216 | xtw.WriteAttributeString("major_version", majorVersion.ToString()); | ||
217 | xtw.WriteAttributeString("minor_version", minorVersion.ToString()); | ||
218 | |||
219 | xtw.WriteStartElement("creation_info"); | ||
220 | DateTime now = DateTime.UtcNow; | ||
221 | TimeSpan t = now - new DateTime(1970, 1, 1); | ||
222 | xtw.WriteElementString("datetime", ((int)t.TotalSeconds).ToString()); | ||
223 | xtw.WriteElementString("id", UUID.Random().ToString()); | ||
224 | xtw.WriteEndElement(); | ||
225 | xtw.WriteEndElement(); | ||
226 | |||
227 | xtw.Flush(); | ||
228 | xtw.Close(); | ||
229 | |||
230 | String s = sw.ToString(); | ||
231 | sw.Close(); | ||
232 | |||
233 | return s; | ||
234 | } | ||
174 | } | 235 | } |
175 | } | 236 | } |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs index 82ede01..e0ad71e 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs | |||
@@ -122,37 +122,44 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
122 | /// <param name="cmdparams"></param> | 122 | /// <param name="cmdparams"></param> |
123 | public void HandleSaveOarConsoleCommand(string module, string[] cmdparams) | 123 | public void HandleSaveOarConsoleCommand(string module, string[] cmdparams) |
124 | { | 124 | { |
125 | Dictionary<string, object> options = new Dictionary<string, object>(); | ||
126 | |||
127 | OptionSet ops = new OptionSet(); | ||
128 | ops.Add("v|version=", delegate(string v) { options["version"] = v; }); | ||
129 | |||
130 | List<string> mainParams = ops.Parse(cmdparams); | ||
131 | |||
125 | if (cmdparams.Length > 2) | 132 | if (cmdparams.Length > 2) |
126 | { | 133 | { |
127 | ArchiveRegion(cmdparams[2]); | 134 | ArchiveRegion(mainParams[2], options); |
128 | } | 135 | } |
129 | else | 136 | else |
130 | { | 137 | { |
131 | ArchiveRegion(DEFAULT_OAR_BACKUP_FILENAME); | 138 | ArchiveRegion(DEFAULT_OAR_BACKUP_FILENAME, options); |
132 | } | 139 | } |
133 | } | 140 | } |
134 | 141 | ||
135 | public void ArchiveRegion(string savePath) | 142 | public void ArchiveRegion(string savePath, Dictionary<string, object> options) |
136 | { | 143 | { |
137 | ArchiveRegion(savePath, Guid.Empty); | 144 | ArchiveRegion(savePath, Guid.Empty, options); |
138 | } | 145 | } |
139 | 146 | ||
140 | public void ArchiveRegion(string savePath, Guid requestId) | 147 | public void ArchiveRegion(string savePath, Guid requestId, Dictionary<string, object> options) |
141 | { | 148 | { |
142 | m_log.InfoFormat( | 149 | m_log.InfoFormat( |
143 | "[ARCHIVER]: Writing archive for region {0} to {1}", m_scene.RegionInfo.RegionName, savePath); | 150 | "[ARCHIVER]: Writing archive for region {0} to {1}", m_scene.RegionInfo.RegionName, savePath); |
144 | 151 | ||
145 | new ArchiveWriteRequestPreparation(m_scene, savePath, requestId).ArchiveRegion(); | 152 | new ArchiveWriteRequestPreparation(m_scene, savePath, requestId).ArchiveRegion(options); |
146 | } | 153 | } |
147 | 154 | ||
148 | public void ArchiveRegion(Stream saveStream) | 155 | public void ArchiveRegion(Stream saveStream) |
149 | { | 156 | { |
150 | ArchiveRegion(saveStream, Guid.Empty); | 157 | ArchiveRegion(saveStream, Guid.Empty); |
151 | } | 158 | } |
152 | 159 | ||
153 | public void ArchiveRegion(Stream saveStream, Guid requestId) | 160 | public void ArchiveRegion(Stream saveStream, Guid requestId) |
154 | { | 161 | { |
155 | new ArchiveWriteRequestPreparation(m_scene, saveStream, requestId).ArchiveRegion(); | 162 | new ArchiveWriteRequestPreparation(m_scene, saveStream, requestId).ArchiveRegion(new Dictionary<string, object>()); |
156 | } | 163 | } |
157 | 164 | ||
158 | public void DearchiveRegion(string loadPath) | 165 | public void DearchiveRegion(string loadPath) |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs index 3342164..04bdc4f 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs | |||
@@ -230,7 +230,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
230 | // upset load | 230 | // upset load |
231 | tar.WriteDir(ArchiveConstants.TERRAINS_PATH); | 231 | tar.WriteDir(ArchiveConstants.TERRAINS_PATH); |
232 | 232 | ||
233 | tar.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, ArchiveWriteRequestExecution.Create0p2ControlFile()); | 233 | tar.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, ArchiveWriteRequestPreparation.Create0p2ControlFile(new Dictionary<string, Object>())); |
234 | 234 | ||
235 | SceneObjectPart part1 = CreateSceneObjectPart1(); | 235 | SceneObjectPart part1 = CreateSceneObjectPart1(); |
236 | SceneObjectGroup object1 = new SceneObjectGroup(part1); | 236 | SceneObjectGroup object1 = new SceneObjectGroup(part1); |
@@ -329,7 +329,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
329 | TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream); | 329 | TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream); |
330 | 330 | ||
331 | tar.WriteDir(ArchiveConstants.TERRAINS_PATH); | 331 | tar.WriteDir(ArchiveConstants.TERRAINS_PATH); |
332 | tar.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, ArchiveWriteRequestExecution.Create0p2ControlFile()); | 332 | tar.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, ArchiveWriteRequestPreparation.Create0p2ControlFile(new Dictionary<string, Object>())); |
333 | 333 | ||
334 | RegionSettings rs = new RegionSettings(); | 334 | RegionSettings rs = new RegionSettings(); |
335 | rs.AgentLimit = 17; | 335 | rs.AgentLimit = 17; |
diff --git a/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs b/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs index 04062b0..ec97acd 100644 --- a/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs +++ b/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs | |||
@@ -160,9 +160,9 @@ namespace OpenSim.Region.CoreModules.World.Serialiser | |||
160 | return SceneXmlLoader.DeserializeGroupFromXml2(xmlString); | 160 | return SceneXmlLoader.DeserializeGroupFromXml2(xmlString); |
161 | } | 161 | } |
162 | 162 | ||
163 | public string SerializeGroupToXml2(SceneObjectGroup grp) | 163 | public string SerializeGroupToXml2(SceneObjectGroup grp, Dictionary<string, object> options) |
164 | { | 164 | { |
165 | return SceneXmlLoader.SaveGroupToXml2(grp); | 165 | return SceneXmlLoader.SaveGroupToXml2(grp, options); |
166 | } | 166 | } |
167 | 167 | ||
168 | public void SavePrimListToXml2(EntityBase[] entityList, string fileName) | 168 | public void SavePrimListToXml2(EntityBase[] entityList, string fileName) |
diff --git a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs index 799a448..bac7827 100644 --- a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs +++ b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs | |||
@@ -25,6 +25,9 @@ | |||
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.Collections.Generic; | ||
29 | using System.IO; | ||
30 | using System.Xml; | ||
28 | using log4net.Config; | 31 | using log4net.Config; |
29 | using NUnit.Framework; | 32 | using NUnit.Framework; |
30 | using NUnit.Framework.SyntaxHelpers; | 33 | using NUnit.Framework.SyntaxHelpers; |
@@ -34,8 +37,6 @@ using OpenSim.Region.Framework.Scenes; | |||
34 | using OpenSim.Region.Framework.Scenes.Serialization; | 37 | using OpenSim.Region.Framework.Scenes.Serialization; |
35 | using OpenSim.Tests.Common; | 38 | using OpenSim.Tests.Common; |
36 | using OpenSim.Tests.Common.Setup; | 39 | using OpenSim.Tests.Common.Setup; |
37 | using System.IO; | ||
38 | using System.Xml; | ||
39 | 40 | ||
40 | namespace OpenSim.Region.CoreModules.World.Serialiser.Tests | 41 | namespace OpenSim.Region.CoreModules.World.Serialiser.Tests |
41 | { | 42 | { |
@@ -369,7 +370,9 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests | |||
369 | // Need to add the object to the scene so that the request to get script state succeeds | 370 | // Need to add the object to the scene so that the request to get script state succeeds |
370 | m_scene.AddSceneObject(so); | 371 | m_scene.AddSceneObject(so); |
371 | 372 | ||
372 | string xml2 = m_serialiserModule.SerializeGroupToXml2(so); | 373 | Dictionary<string, object> options = new Dictionary<string, object>(); |
374 | options["old-guids"] = true; | ||
375 | string xml2 = m_serialiserModule.SerializeGroupToXml2(so, options); | ||
373 | 376 | ||
374 | XmlTextReader xtr = new XmlTextReader(new StringReader(xml2)); | 377 | XmlTextReader xtr = new XmlTextReader(new StringReader(xml2)); |
375 | xtr.ReadStartElement("SceneObjectGroup"); | 378 | xtr.ReadStartElement("SceneObjectGroup"); |