diff options
author | Justin Clark-Casey (justincc) | 2012-07-13 01:03:28 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-07-13 01:03:28 +0100 |
commit | 884d603cac6c3fe0cdbd199e13e1514146ff82bc (patch) | |
tree | 00701964cd4053700c5f37c48c8a5196928b00d1 /OpenSim/Region | |
parent | Don't cache regions data on the other unused LocalGridServiceConnector that t... (diff) | |
download | opensim-SC-884d603cac6c3fe0cdbd199e13e1514146ff82bc.zip opensim-SC-884d603cac6c3fe0cdbd199e13e1514146ff82bc.tar.gz opensim-SC-884d603cac6c3fe0cdbd199e13e1514146ff82bc.tar.bz2 opensim-SC-884d603cac6c3fe0cdbd199e13e1514146ff82bc.tar.xz |
Rather than instantiating a UTF8 encoding everywhere when we want to supress the BOM, use a single Util.UTF8NoBomEncoding.
This class is thread-safe (as evidenced by the provision of the system-wide Encoding.UTF8 which does not suppress BOM on output).
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs index 01be339..3c6e381 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs | |||
@@ -150,7 +150,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
150 | { | 150 | { |
151 | if (!m_Enabled) | 151 | if (!m_Enabled) |
152 | return; | 152 | return; |
153 | 153 | ||
154 | m_LocalCache[scene.RegionInfo.RegionID].Clear(); | 154 | m_LocalCache[scene.RegionInfo.RegionID].Clear(); |
155 | m_LocalCache.Remove(scene.RegionInfo.RegionID); | 155 | m_LocalCache.Remove(scene.RegionInfo.RegionID); |
156 | } | 156 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index 1c0cac7..f1abd4b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | |||
@@ -952,7 +952,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
952 | try | 952 | try |
953 | { | 953 | { |
954 | FileStream fs = File.Create(Path.Combine(Path.GetDirectoryName(assembly), ItemID.ToString() + ".state")); | 954 | FileStream fs = File.Create(Path.Combine(Path.GetDirectoryName(assembly), ItemID.ToString() + ".state")); |
955 | Byte[] buf = (new UTF8Encoding()).GetBytes(xml); | 955 | Byte[] buf = Util.UTF8NoBomEncoding.GetBytes(xml); |
956 | fs.Write(buf, 0, buf.Length); | 956 | fs.Write(buf, 0, buf.Length); |
957 | fs.Close(); | 957 | fs.Close(); |
958 | } | 958 | } |