mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
Better handling of invalid XML: a) prevent infinite loop on EOF; b) better logging
If the XML was truncated for some reason then ExecuteReadProcessors() would get into an infinite loop, using high CPU. Now it detects EOF (and several other error cases) and aborts. The rest of the changes just improve logging of XML in case of errors, so that we can see what the bad XML is.
This commit is contained in:
@@ -178,10 +178,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Error(string.Format(
|
||||
"[COALESCED SCENE OBJECTS SERIALIZER]: Deserialization of xml failed with {0} ",
|
||||
e.Message), e);
|
||||
|
||||
m_log.Error("[COALESCED SCENE OBJECTS SERIALIZER]: Deserialization of xml failed ", e);
|
||||
Util.LogFailedXML("[COALESCED SCENE OBJECTS SERIALIZER]:", xml);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user