diff options
author | Justin Clarke Casey | 2008-04-07 16:30:29 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-04-07 16:30:29 +0000 |
commit | 2caea75aa8ec1b003e7866bba2109c72df2a10c2 (patch) | |
tree | 4e2d12141961cec9088aaaa0da87a13eb1dd4102 /OpenSim/Framework/TaskInventoryItem.cs | |
parent | add some error messages for abuse of our IInventoryData interface (diff) | |
download | opensim-SC-2caea75aa8ec1b003e7866bba2109c72df2a10c2.zip opensim-SC-2caea75aa8ec1b003e7866bba2109c72df2a10c2.tar.gz opensim-SC-2caea75aa8ec1b003e7866bba2109c72df2a10c2.tar.bz2 opensim-SC-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/Framework/TaskInventoryItem.cs')
-rw-r--r-- | OpenSim/Framework/TaskInventoryItem.cs | 44 |
1 files changed, 17 insertions, 27 deletions
diff --git a/OpenSim/Framework/TaskInventoryItem.cs b/OpenSim/Framework/TaskInventoryItem.cs index 91c952d..c9c8054 100644 --- a/OpenSim/Framework/TaskInventoryItem.cs +++ b/OpenSim/Framework/TaskInventoryItem.cs | |||
@@ -67,41 +67,31 @@ namespace OpenSim.Framework | |||
67 | // see IXmlSerializable | 67 | // see IXmlSerializable |
68 | public void ReadXml(XmlReader reader) | 68 | public void ReadXml(XmlReader reader) |
69 | { | 69 | { |
70 | m_log.DebugFormat( | 70 | m_log.DebugFormat("[TASK INVENTORY]: ReadXml current node before actions, {0}", reader.Name); |
71 | "[TASK INVENTORY]: Initial task inventory deserialization CanDeserialize() call was {0}", | 71 | |
72 | tiiSerializer.CanDeserialize(reader)); | 72 | if (!reader.IsEmptyElement) |
73 | |||
74 | reader.Read(); | ||
75 | while (tiiSerializer.CanDeserialize(reader)) | ||
76 | { | 73 | { |
77 | TaskInventoryItem item = (TaskInventoryItem)tiiSerializer.Deserialize(reader); | 74 | reader.Read(); |
78 | Add(item.ItemID, item); | 75 | while (tiiSerializer.CanDeserialize(reader)) |
76 | { | ||
77 | TaskInventoryItem item = (TaskInventoryItem)tiiSerializer.Deserialize(reader); | ||
78 | Add(item.ItemID, item); | ||
79 | |||
80 | m_log.DebugFormat("[TASK INVENTORY]: Instanted prim item {0}, {1} from xml", item.Name, item.ItemID); | ||
81 | } | ||
79 | 82 | ||
80 | // m_log.DebugFormat("[TASK INVENTORY]: Instanted prim item {0}, {1} from xml", item.Name, item.ItemID); | 83 | m_log.DebugFormat("[TASK INVENTORY]: Instantiated {0} prim items in total from xml", Count); |
84 | } | ||
85 | else | ||
86 | { | ||
87 | m_log.DebugFormat("[TASK INVENTORY]: Skipping empty element {0}", reader.Name); | ||
81 | } | 88 | } |
82 | |||
83 | // m_log.DebugFormat("[TASK INVENTORY]: Instantiated {0} prim items in total from xml", Count); | ||
84 | 89 | ||
85 | // For some .net implementations, this last read is necessary so that we advance beyond the end tag | 90 | // For some .net implementations, this last read is necessary so that we advance beyond the end tag |
86 | // of the element wrapping this object so that the rest of the serialization can complete normally. | 91 | // of the element wrapping this object so that the rest of the serialization can complete normally. |
87 | reader.Read(); | 92 | reader.Read(); |
88 | 93 | ||
89 | // m_log.DebugFormat("[TASK INVENTORY]: Current node {0}", reader.Name); | 94 | m_log.DebugFormat("[TASK INVENTORY]: ReadXml Current node after actions, {0}", reader.Name); |
90 | |||
91 | // reader.Read(); | ||
92 | // while (reader.Name.Equals("TaskInventoryItem")) | ||
93 | // { | ||
94 | // TaskInventoryItem item = (TaskInventoryItem)tiiSerializer.Deserialize(reader); | ||
95 | // Add(item.ItemID, item); | ||
96 | // } | ||
97 | |||
98 | // ICollection<TaskInventoryItem> items | ||
99 | // = (ICollection<TaskInventoryItem>)tiiSerializer.Deserialize(reader); | ||
100 | // | ||
101 | // foreach (TaskInventoryItem item in items) | ||
102 | // { | ||
103 | // Add(item.ItemID, item); | ||
104 | // } | ||
105 | } | 95 | } |
106 | 96 | ||
107 | // see IXmlSerializable | 97 | // see IXmlSerializable |