mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
Merge branch 'master' into presence-refactor
This brings presence-refactor up to master again
This commit is contained in:
@@ -330,7 +330,7 @@ namespace OpenSim.Region.CoreModules.Asset
|
||||
//m_log.DebugFormat("[XXX] name = {0} (this module's name: {1}", name, Name);
|
||||
|
||||
if (name != Name)
|
||||
return;
|
||||
return;
|
||||
|
||||
long maxSize = DefaultMaxSize;
|
||||
int maxCount = DefaultMaxCount;
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace Flotsam.RegionModules.AssetCache
|
||||
|
||||
private readonly List<char> m_InvalidChars = new List<char>();
|
||||
|
||||
private int m_LogLevel = 1;
|
||||
private int m_LogLevel = 0;
|
||||
private ulong m_HitRateDisplay = 1; // How often to display hit statistics, given in requests
|
||||
|
||||
private static ulong m_Requests;
|
||||
@@ -156,7 +156,7 @@ namespace Flotsam.RegionModules.AssetCache
|
||||
m_WaitOnInprogressTimeout = assetConfig.GetInt("WaitOnInprogressTimeout", 3000);
|
||||
#endif
|
||||
|
||||
m_LogLevel = assetConfig.GetInt("LogLevel", 1);
|
||||
m_LogLevel = assetConfig.GetInt("LogLevel", 0);
|
||||
m_HitRateDisplay = (ulong)assetConfig.GetInt("HitRateDisplay", 1000);
|
||||
|
||||
m_FileExpiration = TimeSpan.FromHours(assetConfig.GetDouble("FileCacheTimeout", m_DefaultFileExpiration));
|
||||
|
||||
@@ -159,7 +159,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
|
||||
avatar.Invulnerable = true;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,7 +131,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||
{
|
||||
if (CheckPresence(userInfo.PrincipalID))
|
||||
{
|
||||
new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, saveStream).Execute();
|
||||
try
|
||||
{
|
||||
new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, saveStream).Execute();
|
||||
}
|
||||
catch (EntryPointNotFoundException e)
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[ARCHIVER]: Mismatch between Mono and zlib1g library version when trying to create compression stream."
|
||||
+ "If you've manually installed Mono, have you appropriately updated zlib1g as well?");
|
||||
m_log.Error(e);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -156,7 +169,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||
{
|
||||
if (CheckPresence(userInfo.PrincipalID))
|
||||
{
|
||||
new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, savePath).Execute();
|
||||
try
|
||||
{
|
||||
new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, savePath).Execute();
|
||||
}
|
||||
catch (EntryPointNotFoundException e)
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[ARCHIVER]: Mismatch between Mono and zlib1g library version when trying to create compression stream."
|
||||
+ "If you've manually installed Mono, have you appropriately updated zlib1g as well?");
|
||||
m_log.Error(e);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -181,8 +207,22 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||
{
|
||||
if (CheckPresence(userInfo.PrincipalID))
|
||||
{
|
||||
InventoryArchiveReadRequest request =
|
||||
new InventoryArchiveReadRequest(m_aScene, userInfo, invPath, loadStream);
|
||||
InventoryArchiveReadRequest request;
|
||||
|
||||
try
|
||||
{
|
||||
request = new InventoryArchiveReadRequest(m_aScene, userInfo, invPath, loadStream);
|
||||
}
|
||||
catch (EntryPointNotFoundException e)
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[ARCHIVER]: Mismatch between Mono and zlib1g library version when trying to create compression stream."
|
||||
+ "If you've manually installed Mono, have you appropriately updated zlib1g as well?");
|
||||
m_log.Error(e);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
UpdateClientWithLoadedNodes(userInfo, request.Execute());
|
||||
|
||||
return true;
|
||||
@@ -209,8 +249,22 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||
{
|
||||
if (CheckPresence(userInfo.PrincipalID))
|
||||
{
|
||||
InventoryArchiveReadRequest request =
|
||||
new InventoryArchiveReadRequest(m_aScene, userInfo, invPath, loadPath);
|
||||
InventoryArchiveReadRequest request;
|
||||
|
||||
try
|
||||
{
|
||||
request = new InventoryArchiveReadRequest(m_aScene, userInfo, invPath, loadPath);
|
||||
}
|
||||
catch (EntryPointNotFoundException e)
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[ARCHIVER]: Mismatch between Mono and zlib1g library version when trying to create compression stream."
|
||||
+ "If you've manually installed Mono, have you appropriately updated zlib1g as well?");
|
||||
m_log.Error(e);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
UpdateClientWithLoadedNodes(userInfo, request.Execute());
|
||||
|
||||
return true;
|
||||
|
||||
@@ -224,7 +224,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
|
||||
m_Cache.Cache(a);
|
||||
|
||||
// if (null == a)
|
||||
// m_log.WarnFormat("[LOCAL ASSET SERVICES CONNECTOR]: Could not asynchronously find asset with id {0}", id);
|
||||
// m_log.WarnFormat("[LOCAL ASSET SERVICES CONNECTOR]: Could not asynchronously find asset with id {0}", id);
|
||||
|
||||
Util.FireAndForget(delegate { handler(assetID, s, a); });
|
||||
});
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace OpenSim.Region.CoreModules.World
|
||||
{
|
||||
foreach (Scene s in m_SceneList)
|
||||
{
|
||||
if(!ProcessCommand(s, cmd))
|
||||
if (!ProcessCommand(s, cmd))
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +74,19 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||
public ArchiveReadRequest(Scene scene, string loadPath, bool merge, Guid requestId)
|
||||
{
|
||||
m_scene = scene;
|
||||
m_loadStream = new GZipStream(GetStream(loadPath), CompressionMode.Decompress);
|
||||
|
||||
try
|
||||
{
|
||||
m_loadStream = new GZipStream(GetStream(loadPath), CompressionMode.Decompress);
|
||||
}
|
||||
catch (EntryPointNotFoundException e)
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[ARCHIVER]: Mismatch between Mono and zlib1g library version when trying to create compression stream."
|
||||
+ "If you've manually installed Mono, have you appropriately updated zlib1g as well?");
|
||||
m_log.Error(e);
|
||||
}
|
||||
|
||||
m_errorMessage = String.Empty;
|
||||
m_merge = merge;
|
||||
m_requestId = requestId;
|
||||
|
||||
@@ -65,7 +65,19 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||
public ArchiveWriteRequestPreparation(Scene scene, string savePath, Guid requestId)
|
||||
{
|
||||
m_scene = scene;
|
||||
m_saveStream = new GZipStream(new FileStream(savePath, FileMode.Create), CompressionMode.Compress);
|
||||
|
||||
try
|
||||
{
|
||||
m_saveStream = new GZipStream(new FileStream(savePath, FileMode.Create), CompressionMode.Compress);
|
||||
}
|
||||
catch (EntryPointNotFoundException e)
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[ARCHIVER]: Mismatch between Mono and zlib1g library version when trying to create compression stream."
|
||||
+ "If you've manually installed Mono, have you appropriately updated zlib1g as well?");
|
||||
m_log.Error(e);
|
||||
}
|
||||
|
||||
m_requestId = requestId;
|
||||
}
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||
Quaternion rotationOffset = new Quaternion(20, 30, 40, 50);
|
||||
Vector3 offsetPosition = new Vector3(5, 10, 15);
|
||||
|
||||
return new SceneObjectPart(ownerId, shape, groupPosition, rotationOffset, offsetPosition) { Name = partName };
|
||||
return new SceneObjectPart(ownerId, shape, groupPosition, rotationOffset, offsetPosition) { Name = partName };
|
||||
}
|
||||
|
||||
protected SceneObjectPart CreateSceneObjectPart2()
|
||||
@@ -112,7 +112,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||
Vector3 offsetPosition = new Vector3(20, 25, 30);
|
||||
|
||||
return new SceneObjectPart(ownerId, shape, groupPosition, rotationOffset, offsetPosition) { Name = partName };
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test saving a V0.2 OpenSim Region Archive.
|
||||
@@ -231,7 +231,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||
foreach (string name in names)
|
||||
{
|
||||
if (name.EndsWith(".Resources.test-sound.wav"))
|
||||
soundDataResourceName = name;
|
||||
soundDataResourceName = name;
|
||||
}
|
||||
Assert.That(soundDataResourceName, Is.Not.Null);
|
||||
|
||||
@@ -259,7 +259,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||
= new TaskInventoryItem { AssetID = soundUuid, ItemID = soundItemUuid, Name = soundItemName };
|
||||
part1.Inventory.AddInventoryItem(item1, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_scene.AddNewSceneObject(object1, false);
|
||||
|
||||
@@ -306,15 +306,15 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||
/// Test loading the region settings of a V0.2 OpenSim Region Archive.
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestLoadOarV0_2RegionSettings()
|
||||
public void TestLoadOarV0_2RegionSettings()
|
||||
{
|
||||
TestHelper.InMethod();
|
||||
//log4net.Config.XmlConfigurator.Configure();
|
||||
//log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
MemoryStream archiveWriteStream = new MemoryStream();
|
||||
TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream);
|
||||
|
||||
tar.WriteDir(ArchiveConstants.TERRAINS_PATH);
|
||||
tar.WriteDir(ArchiveConstants.TERRAINS_PATH);
|
||||
tar.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, ArchiveWriteRequestExecution.Create0p2ControlFile());
|
||||
|
||||
RegionSettings rs = new RegionSettings();
|
||||
@@ -329,11 +329,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||
rs.DisablePhysics = true;
|
||||
rs.DisableScripts = true;
|
||||
rs.Elevation1NW = 15.9;
|
||||
rs.Elevation1NE = 45.3;
|
||||
rs.Elevation1NE = 45.3;
|
||||
rs.Elevation1SE = 49;
|
||||
rs.Elevation1SW = 1.9;
|
||||
rs.Elevation2NW = 4.5;
|
||||
rs.Elevation2NE = 19.2;
|
||||
rs.Elevation2NE = 19.2;
|
||||
rs.Elevation2SE = 9.2;
|
||||
rs.Elevation2SW = 2.1;
|
||||
rs.FixedSun = true;
|
||||
@@ -411,7 +411,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||
// Quaternion part2RotationOffset = new Quaternion(60, 70, 80, 90);
|
||||
// Vector3 part2OffsetPosition = new Vector3(20, 25, 30);
|
||||
|
||||
SceneObjectPart part2 = CreateSceneObjectPart2();
|
||||
SceneObjectPart part2 = CreateSceneObjectPart2();
|
||||
|
||||
// Create an oar file that we can use for the merge
|
||||
{
|
||||
@@ -420,9 +420,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
|
||||
TerrainModule terrainModule = new TerrainModule();
|
||||
|
||||
Scene scene = SceneSetupHelpers.SetupScene();
|
||||
SceneSetupHelpers.SetupSceneModules(scene, archiverModule, serialiserModule, terrainModule);
|
||||
SceneSetupHelpers.SetupSceneModules(scene, archiverModule, serialiserModule, terrainModule);
|
||||
|
||||
m_scene.AddNewSceneObject(new SceneObjectGroup(part2), false);
|
||||
m_scene.AddNewSceneObject(new SceneObjectGroup(part2), false);
|
||||
|
||||
// Write out this scene
|
||||
scene.EventManager.OnOarFileSaved += SaveCompleted;
|
||||
|
||||
Reference in New Issue
Block a user