aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-04-07 16:30:29 +0000
committerJustin Clarke Casey2008-04-07 16:30:29 +0000
commit2caea75aa8ec1b003e7866bba2109c72df2a10c2 (patch)
tree4e2d12141961cec9088aaaa0da87a13eb1dd4102 /OpenSim/Region/Environment
parentadd some error messages for abuse of our IInventoryData interface (diff)
downloadopensim-SC_OLD-2caea75aa8ec1b003e7866bba2109c72df2a10c2.zip
opensim-SC_OLD-2caea75aa8ec1b003e7866bba2109c72df2a10c2.tar.gz
opensim-SC_OLD-2caea75aa8ec1b003e7866bba2109c72df2a10c2.tar.bz2
opensim-SC_OLD-2caea75aa8ec1b003e7866bba2109c72df2a10c2.tar.xz
* Okay you can put down your pitchforks - this patch should fix rezzing of items (with inventory) on Windows
* Now properly dealing with prims which don't contain items - thanks to thomas for the patch which gave insight into this situation * Also, an xml exception no longer crahes the client session * Leaving in debugging lines in case there are further problems * Not yet tested on Linux, though I'm just about to.
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs62
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs1
2 files changed, 36 insertions, 27 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index e2ba681..38c7e45 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -296,36 +296,46 @@ namespace OpenSim.Region.Environment.Scenes
296 296
297 StringReader sr = new StringReader(xmlData); 297 StringReader sr = new StringReader(xmlData);
298 XmlTextReader reader = new XmlTextReader(sr); 298 XmlTextReader reader = new XmlTextReader(sr);
299 reader.Read(); 299 try
300 reader.ReadStartElement("SceneObjectGroup");
301 reader.ReadStartElement("RootPart");
302 m_rootPart = SceneObjectPart.FromXml(reader);
303 AddPart(m_rootPart);
304
305// m_log.DebugFormat("[SCENE OBJECT GROUP]: Current node {0}", reader.Name);
306
307 reader.ReadEndElement();
308
309 while (reader.Read())
310 { 300 {
311 switch (reader.NodeType) 301 reader.Read();
302 reader.ReadStartElement("SceneObjectGroup");
303 reader.ReadStartElement("RootPart");
304 m_rootPart = SceneObjectPart.FromXml(reader);
305 AddPart(m_rootPart);
306
307 m_log.DebugFormat("[SCENE OBJECT GROUP]: Current node {0}", reader.Name);
308
309 reader.ReadEndElement();
310
311 while (reader.Read())
312 { 312 {
313 case XmlNodeType.Element: 313 switch (reader.NodeType)
314 if (reader.Name == "Part") 314 {
315 { 315 case XmlNodeType.Element:
316 reader.Read(); 316 if (reader.Name == "Part")
317 SceneObjectPart part = SceneObjectPart.FromXml(reader); 317 {
318 part.LocalId = m_scene.PrimIDAllocate(); 318 reader.Read();
319 AddPart(part); 319 SceneObjectPart part = SceneObjectPart.FromXml(reader);
320 part.RegionHandle = m_regionHandle; 320 part.LocalId = m_scene.PrimIDAllocate();
321 321 AddPart(part);
322 part.TrimPermissions(); 322 part.RegionHandle = m_regionHandle;
323 } 323
324 break; 324 part.TrimPermissions();
325 case XmlNodeType.EndElement: 325 }
326 break; 326 break;
327 case XmlNodeType.EndElement:
328 break;
329 }
327 } 330 }
328 } 331 }
332 catch (XmlException e)
333 {
334 m_log.ErrorFormat("[SCENE OBJECT GROUP]: Deserialization of following xml failed, {0}", xmlData);
335
336 // Let's see if carrying on does anything for us
337 }
338
329 reader.Close(); 339 reader.Close();
330 sr.Close(); 340 sr.Close();
331 341
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
index 395c8c6..16da516 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
@@ -77,7 +77,6 @@ namespace OpenSim.Region.Environment.Scenes
77 /// </summary> 77 /// </summary>
78 protected TaskInventoryDictionary m_taskInventory = new TaskInventoryDictionary(); 78 protected TaskInventoryDictionary m_taskInventory = new TaskInventoryDictionary();
79 79
80 [XmlIgnore]
81 public TaskInventoryDictionary TaskInventory 80 public TaskInventoryDictionary TaskInventory
82 { 81 {
83 get { return m_taskInventory; } 82 get { return m_taskInventory; }