mirror of
https://github.com/opensim/opensim.git
synced 2026-05-13 18:21:49 +08:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9db019b2cc | ||
|
|
f1b74cde60 | ||
|
|
d6fd012e65 | ||
|
|
64408c9395 | ||
|
|
5b2ca76fcb | ||
|
|
c6733b8c80 |
@@ -102,14 +102,16 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
{
|
||||
IConfig sconfig = config.Configs["Startup"];
|
||||
if (sconfig is not null)
|
||||
ConfigOptions.levelUpload = sconfig.GetInt("LevelUpload", 0);
|
||||
ConfigOptions.levelUpload = sconfig.GetInt("LevelUpload", -9798);
|
||||
|
||||
if (ConfigOptions.levelUpload == 0)
|
||||
if (ConfigOptions.levelUpload == -9798)
|
||||
{
|
||||
IConfig pconfig = config.Configs["Permissions"];
|
||||
if (pconfig is not null)
|
||||
ConfigOptions.levelUpload = pconfig.GetInt("LevelUpload", 0);
|
||||
}
|
||||
if (ConfigOptions.levelUpload == -9798)
|
||||
ConfigOptions.levelUpload = 0;
|
||||
|
||||
IConfig appearanceConfig = config.Configs["Appearance"];
|
||||
if (appearanceConfig is not null)
|
||||
|
||||
@@ -51,17 +51,27 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
||||
/// <summary>
|
||||
/// Each agent has its own singleton collection of transactions
|
||||
/// </summary>
|
||||
private Dictionary<UUID, AgentAssetTransactions> AgentTransactions =
|
||||
new Dictionary<UUID, AgentAssetTransactions>();
|
||||
private Dictionary<UUID, AgentAssetTransactions> AgentTransactions = [];
|
||||
|
||||
#region Region Module interface
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
IConfig sconfig = source.Configs["Startup"];
|
||||
if (sconfig != null)
|
||||
if(source != null)
|
||||
{
|
||||
m_levelUpload = sconfig.GetInt("LevelUpload", 0);
|
||||
IConfig sconfig = source.Configs["Permissions"];
|
||||
if (sconfig != null)
|
||||
{
|
||||
m_levelUpload = sconfig.GetInt("LevelUpload", -9798);
|
||||
}
|
||||
if(m_levelUpload == -9798)
|
||||
{
|
||||
sconfig = source.Configs["Startup"];
|
||||
if (sconfig is not null)
|
||||
m_levelUpload = sconfig.GetInt("LevelUpload", 0);
|
||||
}
|
||||
if(m_levelUpload == -9798)
|
||||
m_levelUpload = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -994,7 +994,8 @@ namespace OpenSim.Region.CoreModules.Asset
|
||||
try
|
||||
{
|
||||
// If the file is already cached, don't cache it, just touch it so access time is updated
|
||||
if (!replace && File.Exists(filename))
|
||||
bool fileExists = File.Exists(filename);
|
||||
if (!replace && fileExists)
|
||||
{
|
||||
if (m_updateFileTimeOnCacheHit)
|
||||
UpdateFileLastAccessTime(filename);
|
||||
@@ -1031,7 +1032,7 @@ namespace OpenSim.Region.CoreModules.Asset
|
||||
|
||||
try
|
||||
{
|
||||
if(replace)
|
||||
if(fileExists)
|
||||
File.Delete(filename);
|
||||
File.Move(tempname, filename);
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Xml;
|
||||
@@ -147,15 +148,14 @@ namespace OpenSim.Region.DataSnapshot
|
||||
#region Response storage
|
||||
public XmlNode GetScene(Scene scene, XmlDocument factory)
|
||||
{
|
||||
m_log.Debug("[DATASNAPSHOT]: Data requested for scene " + scene.RegionInfo.RegionName);
|
||||
m_log.Debug("[DATASNAPSHOT]: Data requested for scene " + scene.Name);
|
||||
|
||||
if (!m_scenes.ContainsKey(scene)) {
|
||||
m_scenes.Add(scene, true); //stale by default
|
||||
}
|
||||
ref bool sceneStale = ref CollectionsMarshal.GetValueRefOrAddDefault(m_scenes, scene, out bool exists);
|
||||
sceneStale |= !exists;
|
||||
|
||||
XmlNode regionElement = null;
|
||||
|
||||
if (!m_scenes[scene])
|
||||
if (!sceneStale)
|
||||
{
|
||||
m_log.Debug("[DATASNAPSHOT]: Attempting to retrieve snapshot from cache.");
|
||||
//get snapshot from cache
|
||||
@@ -212,7 +212,7 @@ namespace OpenSim.Region.DataSnapshot
|
||||
m_log.WarnFormat("[DATASNAPSHOT]: Exception on writing to file {0}: {1}", path, e.Message);
|
||||
}
|
||||
|
||||
m_scenes[scene] = false;
|
||||
sceneStale = false;
|
||||
|
||||
m_log.Debug("[DATASNAPSHOT]: Generated new snapshot for " + scene.RegionInfo.RegionName);
|
||||
}
|
||||
@@ -258,7 +258,6 @@ namespace OpenSim.Region.DataSnapshot
|
||||
//attr.Value = scene.LandManager.landList.Count.ToString();
|
||||
//docElement.Attributes.Append(attr);
|
||||
|
||||
|
||||
XmlNode infoblock = basedoc.CreateNode(XmlNodeType.Element, "info", "");
|
||||
|
||||
XmlNode infopiece = basedoc.CreateNode(XmlNodeType.Element, "uuid", "");
|
||||
|
||||
@@ -2942,7 +2942,7 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
||||
if(obj is OTOpndBinOp)
|
||||
sb.Append(')');
|
||||
sb.Append('.');
|
||||
sb.Append(field.Name);
|
||||
sb.Append(this.field.Name);
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
@@ -3548,9 +3548,9 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
||||
{
|
||||
get
|
||||
{
|
||||
if(field.DeclaringType == typeof(ScriptBaseClass))
|
||||
return field.Name;
|
||||
return field.DeclaringType.Name + "." + field.Name;
|
||||
if(this.field.DeclaringType == typeof(ScriptBaseClass))
|
||||
return this.field.Name;
|
||||
return this.field.DeclaringType.Name + "." + this.field.Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user