aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
diff options
context:
space:
mode:
authorMelanie2012-07-12 08:55:16 +0100
committerMelanie2012-07-12 08:55:16 +0100
commitd632fd7124e3962534fc34f9c7749615dbb62108 (patch)
tree84ece06822680bfd5b639d9c3fd046ecbb7a154e /OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
parentMerge branch 'avination' into careminster (diff)
parentMany explanitory comments added to the link and delink code in (diff)
downloadopensim-SC_OLD-d632fd7124e3962534fc34f9c7749615dbb62108.zip
opensim-SC_OLD-d632fd7124e3962534fc34f9c7749615dbb62108.tar.gz
opensim-SC_OLD-d632fd7124e3962534fc34f9c7749615dbb62108.tar.bz2
opensim-SC_OLD-d632fd7124e3962534fc34f9c7749615dbb62108.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs OpenSim/Region/Framework/Scenes/SceneObjectPart.cs OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs19
1 files changed, 8 insertions, 11 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 3797683..3ddf1d4 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -26,16 +26,17 @@
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections;
30using System.Collections.Generic;
31using System.Globalization;
29using System.IO; 32using System.IO;
30using System.Diagnostics; //for [DebuggerNonUserCode] 33using System.Diagnostics; //for [DebuggerNonUserCode]
34using System.Reflection;
31using System.Runtime.Remoting; 35using System.Runtime.Remoting;
32using System.Runtime.Remoting.Lifetime; 36using System.Runtime.Remoting.Lifetime;
33using System.Threading;
34using System.Collections;
35using System.Collections.Generic;
36using System.Security.Policy; 37using System.Security.Policy;
37using System.Reflection; 38using System.Text;
38using System.Globalization; 39using System.Threading;
39using System.Xml; 40using System.Xml;
40using OpenMetaverse; 41using OpenMetaverse;
41using log4net; 42using log4net;
@@ -298,13 +299,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
298 using (FileStream fs = File.Open(savedState, 299 using (FileStream fs = File.Open(savedState,
299 FileMode.Open, FileAccess.Read, FileShare.None)) 300 FileMode.Open, FileAccess.Read, FileShare.None))
300 { 301 {
301 System.Text.UTF8Encoding enc =
302 new System.Text.UTF8Encoding();
303
304 Byte[] data = new Byte[size]; 302 Byte[] data = new Byte[size];
305 fs.Read(data, 0, size); 303 fs.Read(data, 0, size);
306 304
307 xml = enc.GetString(data); 305 xml = Encoding.UTF8.GetString(data);
308 306
309 ScriptSerializer.Deserialize(xml, this); 307 ScriptSerializer.Deserialize(xml, this);
310 308
@@ -956,8 +954,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
956 try 954 try
957 { 955 {
958 FileStream fs = File.Create(Path.Combine(Path.GetDirectoryName(assembly), ItemID.ToString() + ".state")); 956 FileStream fs = File.Create(Path.Combine(Path.GetDirectoryName(assembly), ItemID.ToString() + ".state"));
959 System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding(); 957 Byte[] buf = (new UTF8Encoding()).GetBytes(xml);
960 Byte[] buf = enc.GetBytes(xml);
961 fs.Write(buf, 0, buf.Length); 958 fs.Write(buf, 0, buf.Length);
962 fs.Close(); 959 fs.Close();
963 } 960 }