diff options
author | UbitUmarov | 2017-06-09 12:14:13 +0100 |
---|---|---|
committer | UbitUmarov | 2017-06-09 12:14:13 +0100 |
commit | d12957dc2c3e649ea32da4c35a8eb997c404afce (patch) | |
tree | c96371a1d8119565dca258fa6d75c999a49c2dec /OpenSim/Region/Framework | |
parent | Another attempt at parsing MOAP <Media> elements in OAR files. (diff) | |
download | opensim-SC_OLD-d12957dc2c3e649ea32da4c35a8eb997c404afce.zip opensim-SC_OLD-d12957dc2c3e649ea32da4c35a8eb997c404afce.tar.gz opensim-SC_OLD-d12957dc2c3e649ea32da4c35a8eb997c404afce.tar.bz2 opensim-SC_OLD-d12957dc2c3e649ea32da4c35a8eb997c404afce.tar.xz |
still losing time with of halcyon incompatibile oars... cathch exceptions of the function that actually throws; Reduce log spam; don't let a broken MOAP stop all object deserialization. Fixing MOAP does not mean halcyon oars issues are fixed, just one. And really we should not even try to go against halcyon decison to be incompatible.(our MOAP encoding did not change since 2010)
Diffstat (limited to 'OpenSim/Region/Framework')
-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 |