aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-10-22 19:24:42 +0100
committerJonathan Freedman2010-10-22 18:33:41 -0400
commit607c07b4aab2a194102832a1e380cfbabe11d078 (patch)
tree766027397462f11d525cc897ddda632a97a27c1d /OpenSim/Region/CoreModules
parentslightly simplify oar control file loading code (diff)
downloadopensim-SC_OLD-607c07b4aab2a194102832a1e380cfbabe11d078.zip
opensim-SC_OLD-607c07b4aab2a194102832a1e380cfbabe11d078.tar.gz
opensim-SC_OLD-607c07b4aab2a194102832a1e380cfbabe11d078.tar.bz2
opensim-SC_OLD-607c07b4aab2a194102832a1e380cfbabe11d078.tar.xz
start parsing iar control file
This change requires a prebuild[.sh|.bat] since a System.Xml.Linq reference is added to prebuild.xml
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs20
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs2
2 files changed, 20 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
index c1df827..2beea8e 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
@@ -33,6 +33,7 @@ using System.Reflection;
33using System.Threading; 33using System.Threading;
34using System.Text; 34using System.Text;
35using System.Xml; 35using System.Xml;
36using System.Xml.Linq;
36using log4net; 37using log4net;
37using OpenMetaverse; 38using OpenMetaverse;
38using OpenSim.Framework; 39using OpenSim.Framework;
@@ -133,7 +134,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
133 134
134 while ((data = archive.ReadEntry(out filePath, out entryType)) != null) 135 while ((data = archive.ReadEntry(out filePath, out entryType)) != null)
135 { 136 {
136 if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH)) 137 if (filePath == ArchiveConstants.CONTROL_FILE_PATH)
138 {
139 LoadControlFile(filePath, data);
140 }
141 else if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH))
137 { 142 {
138 if (LoadAsset(filePath, data)) 143 if (LoadAsset(filePath, data))
139 successfulAssetRestores++; 144 successfulAssetRestores++;
@@ -461,5 +466,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
461 return false; 466 return false;
462 } 467 }
463 } 468 }
469
470 /// <summary>
471 /// Load control file
472 /// </summary>
473 /// <param name="path"></param>
474 /// <param name="data"></param>
475 protected void LoadControlFile(string path, byte[] data)
476 {
477 XDocument doc = XDocument.Parse(Encoding.ASCII.GetString(data));
478 XElement archiveElement = doc.Element("archive");
479 int.Parse(archiveElement.Attribute("major_version").Value);
480 int.Parse(archiveElement.Attribute("minor_version").Value);
481 }
464 } 482 }
465} \ No newline at end of file 483} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
index 9192f43..087d3df 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
@@ -481,7 +481,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
481 /// </summary> 481 /// </summary>
482 /// <param name="path"></param> 482 /// <param name="path"></param>
483 /// <param name="data"></param> 483 /// <param name="data"></param>
484 private void LoadControlFile(string path, byte[] data) 484 protected void LoadControlFile(string path, byte[] data)
485 { 485 {
486 XmlNamespaceManager nsmgr = new XmlNamespaceManager(new NameTable()); 486 XmlNamespaceManager nsmgr = new XmlNamespaceManager(new NameTable());
487 XmlParserContext context = new XmlParserContext(null, nsmgr, null, XmlSpace.None); 487 XmlParserContext context = new XmlParserContext(null, nsmgr, null, XmlSpace.None);