From f7116001946287bfc5904b72c0f88ca49d787d88 Mon Sep 17 00:00:00 2001
From: David Walter Seikel
Date: Thu, 3 Nov 2016 22:34:56 +1000
Subject: Even OpenSim removed the silly IAR avatar presence check. Purge it
with fire.
---
.../Inventory/Archiver/InventoryArchiverModule.cs | 209 +++++++--------------
1 file changed, 70 insertions(+), 139 deletions(-)
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
index 8847414..9c005e4 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
@@ -50,11 +50,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
- ///
- /// Enable or disable checking whether the iar user is actually logged in
- ///
-// public bool DisablePresenceChecks { get; set; }
-
public event InventoryArchiveSaved OnInventoryArchiveSaved;
public event InventoryArchiveLoaded OnInventoryArchiveLoaded;
@@ -94,11 +89,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
public InventoryArchiverModule() {}
-// public InventoryArchiverModule(bool disablePresenceChecks)
-// {
-// DisablePresenceChecks = disablePresenceChecks;
- // }
-
#region ISharedRegionModule
public void Initialise(IConfigSource source)
@@ -214,30 +204,21 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (userInfo != null)
{
-// if (CheckPresence(userInfo.PrincipalID))
-// {
- try
- {
- new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, saveStream).Execute(options, UserAccountService);
- }
- catch (EntryPointNotFoundException e)
- {
- m_log.ErrorFormat(
- "[INVENTORY 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
-// {
-// m_log.ErrorFormat(
-// "[INVENTORY ARCHIVER]: User {0} {1} {2} not logged in to this region simulator",
-// userInfo.FirstName, userInfo.LastName, userInfo.PrincipalID);
-// }
+ try
+ {
+ new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, saveStream).Execute(options, UserAccountService);
+ }
+ catch (EntryPointNotFoundException e)
+ {
+ m_log.ErrorFormat(
+ "[INVENTORY 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;
}
}
@@ -257,30 +238,21 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (userInfo != null)
{
-// if (CheckPresence(userInfo.PrincipalID))
-// {
- try
- {
- new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, savePath).Execute(options, UserAccountService);
- }
- catch (EntryPointNotFoundException e)
- {
- m_log.ErrorFormat(
- "[INVENTORY 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
-// {
-// m_log.ErrorFormat(
-// "[INVENTORY ARCHIVER]: User {0} {1} {2} not logged in to this region simulator",
-// userInfo.FirstName, userInfo.LastName, userInfo.PrincipalID);
-// }
+ try
+ {
+ new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, savePath).Execute(options, UserAccountService);
+ }
+ catch (EntryPointNotFoundException e)
+ {
+ m_log.ErrorFormat(
+ "[INVENTORY 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;
}
}
@@ -302,35 +274,26 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (userInfo != null)
{
-// if (CheckPresence(userInfo.PrincipalID))
-// {
- InventoryArchiveReadRequest request;
- bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false);
-
- try
- {
- request = new InventoryArchiveReadRequest(id, this, m_aScene.InventoryService, m_aScene.AssetService, m_aScene.UserAccountService, userInfo, invPath, loadStream, merge);
- }
- catch (EntryPointNotFoundException e)
- {
- m_log.ErrorFormat(
- "[INVENTORY 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;
-// }
-// else
-// {
-// m_log.ErrorFormat(
-// "[INVENTORY ARCHIVER]: User {0} {1} {2} not logged in to this region simulator",
-// userInfo.FirstName, userInfo.LastName, userInfo.PrincipalID);
-// }
+ InventoryArchiveReadRequest request;
+ bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false);
+
+ try
+ {
+ request = new InventoryArchiveReadRequest(id, this, m_aScene.InventoryService, m_aScene.AssetService, m_aScene.UserAccountService, userInfo, invPath, loadStream, merge);
+ }
+ catch (EntryPointNotFoundException e)
+ {
+ m_log.ErrorFormat(
+ "[INVENTORY 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;
}
else
m_log.ErrorFormat("[INVENTORY ARCHIVER]: User {0} {1} not found",
@@ -350,35 +313,26 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (userInfo != null)
{
-// if (CheckPresence(userInfo.PrincipalID))
-// {
- InventoryArchiveReadRequest request;
- bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false);
-
- try
- {
- request = new InventoryArchiveReadRequest(id, this, m_aScene.InventoryService, m_aScene.AssetService, m_aScene.UserAccountService, userInfo, invPath, loadPath, merge);
- }
- catch (EntryPointNotFoundException e)
- {
- m_log.ErrorFormat(
- "[INVENTORY 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;
-// }
-// else
-// {
-// m_log.ErrorFormat(
-// "[INVENTORY ARCHIVER]: User {0} {1} {2} not logged in to this region simulator",
-// userInfo.FirstName, userInfo.LastName, userInfo.PrincipalID);
-// }
+ InventoryArchiveReadRequest request;
+ bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false);
+
+ try
+ {
+ request = new InventoryArchiveReadRequest(id, this, m_aScene.InventoryService, m_aScene.AssetService, m_aScene.UserAccountService, userInfo, invPath, loadPath, merge);
+ }
+ catch (EntryPointNotFoundException e)
+ {
+ m_log.ErrorFormat(
+ "[INVENTORY 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;
}
}
@@ -615,28 +569,5 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
}
}
}
-
-// ///
-// /// Check if the given user is present in any of the scenes.
-// ///
-// /// The user to check
-// /// true if the user is in any of the scenes, false otherwise
-// protected bool CheckPresence(UUID userId)
-// {
-// if (DisablePresenceChecks)
-// return true;
-//
-// foreach (Scene scene in m_scenes.Values)
-// {
-// ScenePresence p;
-// if ((p = scene.GetScenePresence(userId)) != null)
-// {
-// p.ControllingClient.SendAgentAlertMessage("Inventory operation has been started", false);
-// return true;
-// }
-// }
-//
-// return false;
-// }
}
}
--
cgit v1.1