diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index aa15422..b012a08 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -1364,26 +1364,24 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1364 | string value = String.Empty; | 1364 | string value = String.Empty; |
1365 | try | 1365 | try |
1366 | { | 1366 | { |
1367 | // The prominant format for MOAP is escaped XML (with > etc). | 1367 | // The STANDARD content of Media elemet is escaped XML string (with > etc). |
1368 | // This is read as a string and passed to PrimitiveBaseShape which requires | ||
1369 | // its XML as a string (which it parses with its own XmlReader). | ||
1370 | value = reader.ReadElementContentAsString("Media", String.Empty); | 1368 | value = reader.ReadElementContentAsString("Media", String.Empty); |
1369 | shp.Media = PrimitiveBaseShape.MediaList.FromXml(value); | ||
1371 | } | 1370 | } |
1372 | catch (XmlException e) | 1371 | catch (XmlException e) |
1373 | { | 1372 | { |
1374 | // There are versions of OAR files that contain unquoted XML. | 1373 | // There are versions of OAR files that contain unquoted XML. |
1374 | // ie ONE comercial fork that never wanted their oars to be read by our code | ||
1375 | try | 1375 | try |
1376 | { | 1376 | { |
1377 | m_log.WarnFormat("[SERIALIZER] MOAP specification in non-escaped XML format. Recovering."); | ||
1378 | value = reader.ReadInnerXml(); | 1377 | value = reader.ReadInnerXml(); |
1378 | shp.Media = PrimitiveBaseShape.MediaList.FromXml(value); | ||
1379 | } | 1379 | } |
1380 | catch (Exception ee) | 1380 | catch |
1381 | { | 1381 | { |
1382 | m_log.ErrorFormat("[SERIALIZER] Failed parsing of MOAP information"); | 1382 | m_log.ErrorFormat("[SERIALIZER] Failed parsing halcyon MOAP information"); |
1383 | throw new XmlException("Failed parsing of MOAP media XML element"); | ||
1384 | } | 1383 | } |
1385 | } | 1384 | } |
1386 | shp.Media = PrimitiveBaseShape.MediaList.FromXml(value); | ||
1387 | } | 1385 | } |
1388 | 1386 | ||
1389 | #endregion | 1387 | #endregion |