mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
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
This commit is contained in:
@@ -233,17 +233,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
m_Timer[engine].UnSetTimerEvents(localID, itemID);
|
||||
|
||||
// Remove from: HttpRequest
|
||||
IHttpRequestModule iHttpReq =
|
||||
engine.World.RequestModuleInterface<IHttpRequestModule>();
|
||||
iHttpReq.StopHttpRequest(localID, itemID);
|
||||
IHttpRequestModule iHttpReq = engine.World.RequestModuleInterface<IHttpRequestModule>();
|
||||
if (iHttpReq != null)
|
||||
iHttpReq.StopHttpRequest(localID, itemID);
|
||||
|
||||
IWorldComm comms = engine.World.RequestModuleInterface<IWorldComm>();
|
||||
if (comms != null)
|
||||
comms.DeleteListener(itemID);
|
||||
|
||||
IXMLRPC xmlrpc = engine.World.RequestModuleInterface<IXMLRPC>();
|
||||
xmlrpc.DeleteChannels(itemID);
|
||||
xmlrpc.CancelSRDRequests(itemID);
|
||||
if (xmlrpc != null)
|
||||
{
|
||||
xmlrpc.DeleteChannels(itemID);
|
||||
xmlrpc.CancelSRDRequests(itemID);
|
||||
}
|
||||
|
||||
// Remove Sensors
|
||||
m_SensorRepeat[engine].UnSetSenseRepeaterEvents(localID, itemID);
|
||||
@@ -325,7 +328,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
{
|
||||
List<Object> data = new List<Object>();
|
||||
|
||||
Object[] listeners=m_Listener[engine].GetSerializationData(itemID);
|
||||
Object[] listeners = m_Listener[engine].GetSerializationData(itemID);
|
||||
if (listeners.Length > 0)
|
||||
{
|
||||
data.Add("listener");
|
||||
|
||||
@@ -11918,9 +11918,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return;
|
||||
}
|
||||
|
||||
System.Text.UTF8Encoding enc =
|
||||
new System.Text.UTF8Encoding();
|
||||
string data = enc.GetString(a.Data);
|
||||
string data = Encoding.UTF8.GetString(a.Data);
|
||||
//m_log.Debug(data);
|
||||
NotecardCache.Cache(id, data);
|
||||
AsyncCommands.
|
||||
@@ -11973,9 +11971,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return;
|
||||
}
|
||||
|
||||
System.Text.UTF8Encoding enc =
|
||||
new System.Text.UTF8Encoding();
|
||||
string data = enc.GetString(a.Data);
|
||||
string data = Encoding.UTF8.GetString(a.Data);
|
||||
//m_log.Debug(data);
|
||||
NotecardCache.Cache(id, data);
|
||||
AsyncCommands.DataserverPlugin.DataserverReply(id.ToString(),
|
||||
|
||||
@@ -1822,8 +1822,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if (a == null)
|
||||
return UUID.Zero;
|
||||
|
||||
System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding();
|
||||
string data = enc.GetString(a.Data);
|
||||
string data = Encoding.UTF8.GetString(a.Data);
|
||||
NotecardCache.Cache(assetID, data);
|
||||
};
|
||||
|
||||
|
||||
@@ -88,13 +88,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
|
||||
public Object[] GetSerializationData(UUID itemID)
|
||||
{
|
||||
return m_commsPlugin.GetSerializationData(itemID);
|
||||
if (m_commsPlugin != null)
|
||||
return m_commsPlugin.GetSerializationData(itemID);
|
||||
else
|
||||
return new Object[]{};
|
||||
}
|
||||
|
||||
public void CreateFromData(uint localID, UUID itemID, UUID hostID,
|
||||
Object[] data)
|
||||
{
|
||||
m_commsPlugin.CreateFromData(localID, itemID, hostID, data);
|
||||
if (m_commsPlugin != null)
|
||||
m_commsPlugin.CreateFromData(localID, itemID, hostID, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -31,6 +31,7 @@ using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Reflection;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Microsoft.CSharp;
|
||||
//using Microsoft.JScript;
|
||||
using Microsoft.VisualBasic;
|
||||
@@ -711,9 +712,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
|
||||
//
|
||||
string filetext = System.Convert.ToBase64String(data);
|
||||
|
||||
System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
|
||||
|
||||
Byte[] buf = enc.GetBytes(filetext);
|
||||
Byte[] buf = Encoding.ASCII.GetBytes(filetext);
|
||||
|
||||
FileStream sfs = File.Create(assembly + ".text");
|
||||
sfs.Write(buf, 0, buf.Length);
|
||||
@@ -804,8 +803,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
|
||||
mapstring += String.Format("{0},{1},{2},{3}\n", k.Key, k.Value, v.Key, v.Value);
|
||||
}
|
||||
|
||||
System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
|
||||
Byte[] mapbytes = enc.GetBytes(mapstring);
|
||||
Byte[] mapbytes = Encoding.ASCII.GetBytes(mapstring);
|
||||
FileStream mfs = File.Create(filename);
|
||||
mfs.Write(mapbytes, 0, mapbytes.Length);
|
||||
mfs.Close();
|
||||
|
||||
@@ -26,16 +26,17 @@
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Diagnostics; //for [DebuggerNonUserCode]
|
||||
using System.Runtime.Remoting;
|
||||
using System.Runtime.Remoting.Lifetime;
|
||||
using System.Threading;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Security.Policy;
|
||||
using System.Reflection;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Diagnostics; //for [DebuggerNonUserCode]
|
||||
using System.Reflection;
|
||||
using System.Runtime.Remoting;
|
||||
using System.Runtime.Remoting.Lifetime;
|
||||
using System.Security.Policy;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Xml;
|
||||
using OpenMetaverse;
|
||||
using log4net;
|
||||
@@ -298,13 +299,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
using (FileStream fs = File.Open(savedState,
|
||||
FileMode.Open, FileAccess.Read, FileShare.None))
|
||||
{
|
||||
System.Text.UTF8Encoding enc =
|
||||
new System.Text.UTF8Encoding();
|
||||
|
||||
Byte[] data = new Byte[size];
|
||||
fs.Read(data, 0, size);
|
||||
|
||||
xml = enc.GetString(data);
|
||||
xml = Encoding.UTF8.GetString(data);
|
||||
|
||||
ScriptSerializer.Deserialize(xml, this);
|
||||
|
||||
@@ -956,8 +954,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
try
|
||||
{
|
||||
FileStream fs = File.Create(Path.Combine(Path.GetDirectoryName(assembly), ItemID.ToString() + ".state"));
|
||||
System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding();
|
||||
Byte[] buf = enc.GetBytes(xml);
|
||||
Byte[] buf = (new UTF8Encoding()).GetBytes(xml);
|
||||
fs.Write(buf, 0, buf.Length);
|
||||
fs.Close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user