mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Merge branch 'master' of https://github.com/AdilElFarissi/opensim
This commit is contained in:
@@ -150,7 +150,7 @@ namespace OpenSim.Framework.Serialization.External
|
||||
settings.TerrainPBR3 = UUID.Parse(xtr.ReadElementContentAsString());
|
||||
break;
|
||||
case "PBR4":
|
||||
settings.TerrainPBR3 = UUID.Parse(xtr.ReadElementContentAsString());
|
||||
settings.TerrainPBR4 = UUID.Parse(xtr.ReadElementContentAsString());
|
||||
break;
|
||||
case "ElevationLowSW":
|
||||
settings.Elevation1SW = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo);
|
||||
|
||||
@@ -355,7 +355,7 @@ namespace OpenSim
|
||||
|
||||
// Sure is not the right place for this but do the job...
|
||||
// Must always be called before (all) / the HTTP servers starting for the Certs creation or renewals.
|
||||
if(startupConfig.GetBoolean("EnableSelfsignedCertSupport"))
|
||||
if(startupConfig.GetBoolean("EnableSelfsignedCertSupport", false))
|
||||
{
|
||||
if(!File.Exists("SSL\\ssl\\"+ startupConfig.GetString("CertFileName") +".p12") || startupConfig.GetBoolean("CertRenewOnStartup"))
|
||||
{
|
||||
|
||||
@@ -541,7 +541,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||
if (texture.IsZero())
|
||||
return;
|
||||
|
||||
if((remoteClient.ViewerFlags & ViewerFlags.TPBR) != 0)
|
||||
if(remoteClient is not null && (remoteClient.ViewerFlags & ViewerFlags.TPBR) != 0)
|
||||
{
|
||||
switch (level)
|
||||
{
|
||||
|
||||
@@ -5150,31 +5150,41 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (engines.Length == 0) // No engine at all
|
||||
return 0.0f;
|
||||
|
||||
float time = 0.0f;
|
||||
|
||||
// get all the scripts in all parts
|
||||
SceneObjectPart[] parts = m_parts.GetArray();
|
||||
List<TaskInventoryItem> scripts = new();
|
||||
for (int i = 0; i < parts.Length; i++)
|
||||
try
|
||||
{
|
||||
scripts.AddRange(parts[i].Inventory.GetInventoryItems(InventoryType.LSL));
|
||||
}
|
||||
// extract the UUIDs
|
||||
HashSet<UUID> unique = new();
|
||||
foreach (TaskInventoryItem script in scripts)
|
||||
unique.Add(script.ItemID);
|
||||
float time = 0.0f;
|
||||
|
||||
List<UUID> ids = unique.ToList();
|
||||
|
||||
// Offer the list of script UUIDs to each engine found and accumulate the time
|
||||
foreach (IScriptModule e in engines)
|
||||
{
|
||||
if (e is not null)
|
||||
// get all the scripts in all parts
|
||||
SceneObjectPart[] parts = m_parts.GetArray();
|
||||
List<TaskInventoryItem> scripts = new();
|
||||
for (int i = 0; i < parts.Length; i++)
|
||||
{
|
||||
time += e.GetScriptExecutionTime(ids);
|
||||
IEntityInventory inv = parts[i].Inventory;
|
||||
if (inv is not null)
|
||||
scripts.AddRange(parts[i].Inventory.GetInventoryItems(InventoryType.LSL));
|
||||
}
|
||||
|
||||
// extract the UUIDs
|
||||
HashSet<UUID> unique = new();
|
||||
foreach (TaskInventoryItem script in scripts)
|
||||
unique.Add(script.ItemID);
|
||||
|
||||
List<UUID> ids = unique.ToList();
|
||||
|
||||
// Offer the list of script UUIDs to each engine found and accumulate the time
|
||||
foreach (IScriptModule e in engines)
|
||||
{
|
||||
if (e is not null)
|
||||
{
|
||||
time += e.GetScriptExecutionTime(ids);
|
||||
}
|
||||
}
|
||||
return time;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
return time;
|
||||
}
|
||||
|
||||
public bool ScriptsMemory(out int memory)
|
||||
@@ -5184,32 +5194,42 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (engines.Length == 0) // No engine at all
|
||||
return false;
|
||||
|
||||
// get all the scripts in all parts
|
||||
SceneObjectPart[] parts = m_parts.GetArray();
|
||||
List<TaskInventoryItem> scripts = new();
|
||||
for (int i = 0; i < parts.Length; i++)
|
||||
try
|
||||
{
|
||||
scripts.AddRange(parts[i].Inventory.GetInventoryItems(InventoryType.LSL));
|
||||
}
|
||||
|
||||
if (scripts.Count == 0)
|
||||
return false;
|
||||
|
||||
// extract the UUIDs
|
||||
HashSet<UUID> unique = new();
|
||||
foreach (TaskInventoryItem script in scripts)
|
||||
unique.Add(script.ItemID);
|
||||
|
||||
List<UUID> ids = unique.ToList();
|
||||
// Offer the list of script UUIDs to each engine found and accumulate the memory
|
||||
foreach (IScriptModule e in engines)
|
||||
{
|
||||
if (e is not null)
|
||||
// get all the scripts in all parts
|
||||
SceneObjectPart[] parts = m_parts.GetArray();
|
||||
List<TaskInventoryItem> scripts = new();
|
||||
for (int i = 0; i < parts.Length; i++)
|
||||
{
|
||||
memory += e.GetScriptsMemory(ids);
|
||||
IEntityInventory inv = parts[i].Inventory;
|
||||
if(inv is not null)
|
||||
scripts.AddRange(inv.GetInventoryItems(InventoryType.LSL));
|
||||
}
|
||||
|
||||
if (scripts.Count == 0)
|
||||
return false;
|
||||
|
||||
// extract the UUIDs
|
||||
HashSet<UUID> unique = new();
|
||||
foreach (TaskInventoryItem script in scripts)
|
||||
unique.Add(script.ItemID);
|
||||
|
||||
List<UUID> ids = unique.ToList();
|
||||
// Offer the list of script UUIDs to each engine found and accumulate the memory
|
||||
foreach (IScriptModule e in engines)
|
||||
{
|
||||
if (e is not null)
|
||||
{
|
||||
memory += e.GetScriptsMemory(ids);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
||||
//private static readonly string m_chatSessionRequestPath = "0209/";
|
||||
|
||||
// Control info
|
||||
private static bool m_Enabled = false;
|
||||
private static bool m_Enabled = false;
|
||||
|
||||
// FreeSwitch server is going to contact us and ask us all
|
||||
// sorts of things.
|
||||
@@ -111,8 +111,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
||||
|
||||
try
|
||||
{
|
||||
string serviceDll = m_Config.GetString("LocalServiceModule",
|
||||
String.Empty);
|
||||
string serviceDll = m_Config.GetString("LocalServiceModule", String.Empty);
|
||||
|
||||
if (serviceDll.Length == 0)
|
||||
{
|
||||
@@ -325,6 +324,25 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
|
||||
m_log.DebugFormat(
|
||||
"[FreeSwitchVoice][PROVISIONVOICE]: ProvisionVoiceAccountRequest() request for {0}", agentID.ToString());
|
||||
|
||||
Stream inputStream = request.InputStream;
|
||||
if (inputStream.Length > 0)
|
||||
{
|
||||
OSD tmp = OSDParser.DeserializeLLSDXml(inputStream);
|
||||
request.InputStream.Dispose();
|
||||
|
||||
if (tmp is OSDMap map)
|
||||
{
|
||||
if (map.TryGetValue("voice_server_type", out OSD vstosd))
|
||||
{
|
||||
if (vstosd is OSDString vst && !((string)vst).Equals("vivox", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
response.RawBuffer = Util.UTF8.GetBytes("<llsd><undef /></llsd>");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
response.StatusCode = (int)HttpStatusCode.OK;
|
||||
|
||||
ScenePresence avatar = scene.GetScenePresence(agentID);
|
||||
|
||||
@@ -459,6 +459,25 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||
response.StatusCode = (int)HttpStatusCode.OK;
|
||||
try
|
||||
{
|
||||
Stream inputStream = request.InputStream;
|
||||
if (inputStream.Length > 0)
|
||||
{
|
||||
OSD tmp = OSDParser.DeserializeLLSDXml(inputStream);
|
||||
request.InputStream.Dispose();
|
||||
|
||||
if (tmp is OSDMap map)
|
||||
{
|
||||
if (map.TryGetValue("voice_server_type", out OSD vstosd))
|
||||
{
|
||||
if (vstosd is OSDString vst && !((string)vst).Equals("vivox", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
response.RawBuffer = Util.UTF8.GetBytes("<llsd><undef /></llsd>");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ScenePresence avatar = null;
|
||||
string avatarName = null;
|
||||
|
||||
|
||||
@@ -13660,7 +13660,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
ScenePresence presence = World.GetScenePresence(agentID);
|
||||
|
||||
// we are not interested in child-agents
|
||||
if (presence.IsChildAgent)
|
||||
if (presence is null || presence.IsChildAgent)
|
||||
return;
|
||||
|
||||
presence.ControllingClient.SendClearFollowCamProperties(objectID);
|
||||
|
||||
@@ -138,7 +138,7 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
||||
// guards m_DetachQuantum, m_EventQueue, m_EventCounts, m_Running, m_Suspended
|
||||
public Object m_QueueLock = new Object();
|
||||
|
||||
// true iff allowed to accept new events
|
||||
// true if allowed to accept new events
|
||||
public bool m_Running = true;
|
||||
|
||||
// queue of events that haven't been acted upon yet
|
||||
|
||||
@@ -396,10 +396,10 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
||||
e = StartEventHandler(evc, evt.Params);
|
||||
}
|
||||
//m_RunOnePhase = "done running";
|
||||
m_CPUTime += DateTime.UtcNow.Subtract(now).TotalMilliseconds;
|
||||
m_CPUTime += Util.GetTimeStampMS() - m_SliceStart;
|
||||
|
||||
// Maybe it puqued.
|
||||
if(e is not null)
|
||||
// Maybe it puqued.
|
||||
if (e is not null)
|
||||
{
|
||||
//m_RunOnePhase = "handling exception " + e.Message;
|
||||
HandleScriptException(e);
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace OpenSim.Server.Base
|
||||
|
||||
prompt = startupConfig.GetString("Prompt", prompt);
|
||||
|
||||
if(startupConfig.GetBoolean("EnableRobustSelfsignedCertSupport"))
|
||||
if(startupConfig.GetBoolean("EnableRobustSelfsignedCertSupport", false))
|
||||
{
|
||||
if(!File.Exists("SSL\\ssl\\"+ startupConfig.GetString("RobustCertFileName") +".p12") || startupConfig.GetBoolean("RobustCertRenewOnStartup"))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user