From 65c5efe43b68700bad94076d4cd421160203c5de Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Fri, 16 May 2008 01:22:11 +0000
Subject: Formatting cleanup.
---
.../LoadRegions/Properties/AssemblyInfo.cs | 10 +-
.../RemoteController/RemoteAdminPlugin.cs | 96 ++---
.../Rest/Regions/RegionDetails.cs | 4 +-
.../Rest/Regions/RestRegionPlugin.cs | 16 +-
OpenSim/ApplicationPlugins/Rest/RestPlugin.cs | 24 +-
OpenSim/Data/Base/BaseDataReader.cs | 2 +-
OpenSim/Data/Base/BaseFieldMapper.cs | 2 +-
OpenSim/Data/Base/Properties/AssemblyInfo.cs | 10 +-
OpenSim/Data/IGridData.cs | 4 +-
OpenSim/Data/IniConfig.cs | 2 +-
OpenSim/Data/MSSQL/MSSQLAssetData.cs | 2 +-
OpenSim/Data/MSSQL/MSSQLDataStore.cs | 26 +-
OpenSim/Data/MSSQL/MSSQLGridData.cs | 18 +-
OpenSim/Data/MSSQL/MSSQLInventoryData.cs | 16 +-
OpenSim/Data/MSSQL/MSSQLManager.cs | 4 +-
OpenSim/Data/MSSQL/MSSQLUserData.cs | 8 +-
OpenSim/Data/MSSQL/Properties/AssemblyInfo.cs | 10 +-
OpenSim/Data/MapperFactory/DataMapperFactory.cs | 2 +-
OpenSim/Data/MySQL/MySQLAssetData.cs | 10 +-
OpenSim/Data/MySQL/MySQLDataStore.cs | 184 ++++-----
OpenSim/Data/MySQL/MySQLInventoryData.cs | 24 +-
OpenSim/Data/MySQL/MySQLManager.cs | 16 +-
OpenSim/Data/MySQL/MySQLUserData.cs | 20 +-
OpenSim/Data/MySQL/Properties/AssemblyInfo.cs | 10 +-
OpenSim/Data/NHibernate/LLUUIDUserType.cs | 4 +-
OpenSim/Data/NHibernate/NHibernateAssetData.cs | 10 +-
OpenSim/Data/NHibernate/NHibernateInventoryData.cs | 30 +-
OpenSim/Data/NHibernate/NHibernateUserData.cs | 42 +-
OpenSim/Data/Null/NullDataStore.cs | 4 +-
OpenSim/Data/Null/Properties/AssemblyInfo.cs | 10 +-
OpenSim/Data/OpenSimObjectFieldMapper.cs | 2 +-
OpenSim/Data/PrimitiveBaseShapeTableMapper.cs | 2 +-
OpenSim/Data/Properties/AssemblyInfo.cs | 10 +-
OpenSim/Data/RegionProfileData.cs | 8 +-
OpenSim/Data/SQLite/Properties/AssemblyInfo.cs | 10 +-
OpenSim/Data/SQLite/SQLiteAssetData.cs | 24 +-
OpenSim/Data/SQLite/SQLiteInventoryStore.cs | 34 +-
OpenSim/Data/SQLite/SQLiteRegionData.cs | 116 +++---
OpenSim/Data/SQLite/SQLiteUserData.cs | 36 +-
OpenSim/Data/SQLite/SQLiteUtils.cs | 4 +-
OpenSim/Data/UserDataBase.cs | 4 +-
OpenSim/Framework/AssemblyInfo.cs | 8 +-
.../Filesystem/AssetLoaderFileSystem.cs | 20 +-
OpenSim/Framework/AvatarAppearance.cs | 6 +-
OpenSim/Framework/ClientManager.cs | 2 +-
.../Framework/Communications/Cache/AssetCache.cs | 22 +-
.../Communications/Cache/AssetServerBase.cs | 8 +-
.../Communications/Cache/CachedUserInfo.cs | 220 +++++-----
.../Communications/Cache/GridAssetClient.cs | 8 +-
.../Communications/Cache/InventoryFolderImpl.cs | 46 +--
.../Communications/Cache/LibraryRootFolder.cs | 72 ++--
.../Cache/UserProfileCacheService.cs | 78 ++--
.../Framework/Communications/Capabilities/Caps.cs | 130 +++---
.../Communications/Capabilities/CapsHandlers.cs | 16 +-
.../Framework/Communications/Capabilities/LLSD.cs | 26 +-
.../Communications/Capabilities/LLSDHelpers.cs | 10 +-
.../Capabilities/LLSDInventoryItem.cs | 2 +-
.../Capabilities/LLSDParcelVoiceInfoResponse.cs | 4 +-
.../Capabilities/LLSDStreamHandler.cs | 2 +-
.../LLSDTaskInventoryUploadComplete.cs | 2 +-
.../Capabilities/LLSDTaskScriptUpdate.cs | 6 +-
.../Capabilities/LLSDVoiceAccountResponse.cs | 4 +-
.../Communications/CommunicationsManager.cs | 2 +-
.../Framework/Communications/GenericAsyncResult.cs | 4 +-
.../Framework/Communications/IInventoryServices.cs | 22 +-
OpenSim/Framework/Communications/IUserService.cs | 8 +-
.../Communications/InventoryServiceBase.cs | 122 +++---
.../Communications/Limit/IRequestLimitStrategy.cs | 10 +-
.../Communications/Limit/NullLimitStrategy.cs | 6 +-
.../Communications/Limit/RepeatLimitStrategy.cs | 38 +-
.../Communications/Limit/TimeLimitStrategy.cs | 50 +--
OpenSim/Framework/Communications/LoginResponse.cs | 4 +-
OpenSim/Framework/Communications/LoginService.cs | 108 ++---
.../Communications/Properties/AssemblyInfo.cs | 10 +-
OpenSim/Framework/Communications/RestClient.cs | 12 +-
.../Framework/Communications/UserManagerBase.cs | 26 +-
OpenSim/Framework/Console/ConsoleBase.cs | 8 +-
OpenSim/Framework/Console/OpenSimAppender.cs | 16 +-
OpenSim/Framework/IClientAPI.cs | 34 +-
OpenSim/Framework/IClientAPI2.cs | 4 +-
OpenSim/Framework/IInventoryData.cs | 2 +-
OpenSim/Framework/IUserData.cs | 6 +-
OpenSim/Framework/InventoryFolderBase.cs | 2 +-
OpenSim/Framework/InventoryItemBase.cs | 20 +-
OpenSim/Framework/RegionCommsListener.cs | 6 +-
OpenSim/Framework/RegionInfo.cs | 8 +-
OpenSim/Framework/Remoting.cs | 2 +-
OpenSim/Framework/SerializableInventory.cs | 2 +-
OpenSim/Framework/SerializableRegionInfo.cs | 4 +-
OpenSim/Framework/Servers/BaseHttpServer.cs | 42 +-
OpenSim/Framework/Servers/BaseOpenSimServer.cs | 28 +-
.../Framework/Servers/RestObjectPosterResponse.cs | 10 +-
OpenSim/Framework/Servers/RestStreamHandler.cs | 2 +-
.../Servers/SynchronousRestObjectPoster.cs | 2 +-
.../Framework/Statistics/AssetStatsCollector.cs | 28 +-
.../Statistics/Interfaces/IStatsCollector.cs | 4 +-
.../Framework/Statistics/SimExtraStatsCollector.cs | 62 +--
OpenSim/Framework/Statistics/StatsManager.cs | 28 +-
OpenSim/Framework/Statistics/UserStatsCollector.cs | 24 +-
OpenSim/Framework/TaskInventoryItem.cs | 12 +-
OpenSim/Framework/Util.cs | 20 +-
OpenSim/Grid/AssetServer/Main.cs | 16 +-
.../Grid/AssetServer/Properties/AssemblyInfo.cs | 8 +-
OpenSim/Grid/AssetServer/RestService.cs | 18 +-
OpenSim/Grid/GridServer/GridManager.cs | 64 +--
OpenSim/Grid/GridServer/IGridPlugin.cs | 2 +-
OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs | 8 +-
.../Grid/InventoryServer/GridInventoryService.cs | 38 +-
OpenSim/Grid/InventoryServer/Main.cs | 16 +-
.../Grid/Manager/OpenGridServices.Manager/Util.cs | 4 +-
...idServices.Manager.ConnectToGridServerDialog.cs | 6 +-
.../gtk-gui/OpenGridServices.Manager.MainWindow.cs | 6 +-
.../OpenGridServices.Manager/gtk-gui/generated.cs | 10 +-
OpenSim/Grid/MessagingServer/Main.cs | 10 +-
OpenSim/Grid/MessagingServer/MessageService.cs | 42 +-
OpenSim/Grid/MessagingServer/XMPPHTTPService.cs | 10 +-
.../ScriptEngine/Common/Properties/AssemblyInfo.cs | 8 +-
.../DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | 2 +-
.../DotNetEngine/Compiler/LSL/LSL_BaseClass.cs | 4 +-
.../DotNetEngine/Compiler/LSO/Engine.cs | 10 +-
.../Compiler/LSO/LSL_BaseClass_OPCODES.cs | 4 +-
.../DotNetEngine/Compiler/LSO/LSO_Parser.cs | 6 +-
.../Grid/ScriptEngine/DotNetEngine/EventManager.cs | 4 +-
.../DotNetEngine/Properties/AssemblyInfo.cs | 10 +-
.../Grid/ScriptServer/Properties/AssemblyInfo.cs | 8 +-
OpenSim/Grid/UserServer/Main.cs | 46 +--
OpenSim/Grid/UserServer/MessageServersConnector.cs | 22 +-
OpenSim/Grid/UserServer/Properties/AssemblyInfo.cs | 8 +-
OpenSim/Grid/UserServer/UserLoginService.cs | 52 +--
OpenSim/Grid/UserServer/UserManager.cs | 20 +-
OpenSim/Region/Application/Application.cs | 8 +-
OpenSim/Region/Application/OpenSimMain.cs | 82 ++--
OpenSim/Region/Application/OpenSimMainConsole.cs | 24 +-
.../Region/ClientStack/LindenUDP/LLClientView.cs | 232 +++++------
.../Region/ClientStack/LindenUDP/LLPacketQueue.cs | 30 +-
.../Region/ClientStack/LindenUDP/LLPacketServer.cs | 12 +-
.../Region/ClientStack/LindenUDP/LLUDPServer.cs | 32 +-
.../Region/ClientStack/RegionApplicationBase.cs | 8 +-
.../Communications/Local/LocalBackEndServices.cs | 8 +-
.../Communications/Local/LocalInventoryService.cs | 18 +-
.../Communications/Local/LocalLoginService.cs | 46 +--
.../Communications/Local/LocalUserServices.cs | 2 +-
.../Local/Properties/AssemblyInfo.cs | 10 +-
.../Region/Communications/OGS1/OGS1GridServices.cs | 132 +++---
.../Communications/OGS1/OGS1InventoryService.cs | 84 ++--
.../Region/Communications/OGS1/OGS1UserServices.cs | 42 +-
.../Communications/OGS1/Properties/AssemblyInfo.cs | 10 +-
OpenSim/Region/DataSnapshot/DataRequestHandler.cs | 4 +-
OpenSim/Region/DataSnapshot/DataSnapshotManager.cs | 12 +-
.../Interfaces/IDataSnapshotProvider.cs | 2 +-
OpenSim/Region/DataSnapshot/LandSnapshot.cs | 8 +-
OpenSim/Region/DataSnapshot/ObjectSnapshot.cs | 2 +-
.../Region/Environment/InstantMessageReceiver.cs | 4 +-
.../Environment/Interfaces/IAvatarFactory.cs | 2 +-
.../Environment/Interfaces/IScenePermissions.cs | 2 +-
.../Environment/Interfaces/ITextureSender.cs | 8 +-
.../Agent/AssetDownload/AssetDownloadModule.cs | 2 +-
.../AssetTransaction/AgentAssetsTransactions.cs | 8 +-
.../AssetTransaction/AssetTransactionModule.cs | 6 +-
.../Agent/TextureDownload/TextureDownloadModule.cs | 4 +-
.../Agent/TextureDownload/TextureNotFoundSender.cs | 4 +-
.../TextureDownload/UserTextureDownloadService.cs | 18 +-
.../Modules/Agent/TextureSender/TextureSender.cs | 10 +-
.../Environment/Modules/Agent/Xfer/XferModule.cs | 2 +-
.../Environment/Modules/Avatar/Chat/ChatModule.cs | 6 +-
.../Currency/SampleMoney/SampleMoneyModule.cs | 12 +-
.../Modules/Avatar/Friends/FriendsModule.cs | 20 +-
.../Modules/Avatar/Inventory/InventoryModule.cs | 2 +-
.../Avatar/Profiles/AvatarProfilesModule.cs | 2 +-
.../Voice/AsterixVoice/AsteriskVoiceModule.cs | 2 +-
.../Scripting/HttpRequest/ScriptsHttpRequests.cs | 22 +-
.../Scripting/VectorRender/VectorRenderModule.cs | 2 +-
.../Modules/Scripting/WorldComm/WorldCommModule.cs | 34 +-
.../Modules/Scripting/XMLRPC/XMLRPCModule.cs | 26 +-
.../Environment/Modules/World/Land/LandChannel.cs | 8 +-
.../Environment/Modules/World/Land/LandObject.cs | 2 +-
.../Modules/World/Permissions/PermissionsModule.cs | 136 +++----
.../Environment/Modules/World/Sun/SunModule.cs | 8 +-
.../Modules/World/Terrain/FileLoaders/BMP.cs | 4 +-
.../Terrain/FileLoaders/GenericSystemDrawing.cs | 6 +-
.../World/Terrain/PaintBrushes/FlattenSphere.cs | 8 +-
.../World/Terrain/PaintBrushes/OlsenSphere.cs | 6 +-
.../World/Terrain/PaintBrushes/SmoothSphere.cs | 8 +-
.../World/Terrain/PaintBrushes/WeatherSphere.cs | 2 +-
OpenSim/Region/Environment/Scenes/EntityBase.cs | 10 +-
OpenSim/Region/Environment/Scenes/InnerScene.cs | 82 ++--
.../Region/Environment/Scenes/Scene.Inventory.cs | 444 ++++++++++-----------
.../Environment/Scenes/Scene.PacketHandlers.cs | 10 +-
OpenSim/Region/Environment/Scenes/Scene.cs | 262 ++++++------
OpenSim/Region/Environment/Scenes/SceneBase.cs | 18 +-
.../Scenes/SceneCommunicationService.cs | 60 +--
OpenSim/Region/Environment/Scenes/SceneEvents.cs | 16 +-
.../Environment/Scenes/SceneExternalChecks.cs | 18 +-
OpenSim/Region/Environment/Scenes/SceneManager.cs | 6 +-
.../Scenes/SceneObjectGroup.Inventory.cs | 118 +++---
.../Region/Environment/Scenes/SceneObjectGroup.cs | 132 +++---
.../Scenes/SceneObjectPart.Inventory.cs | 184 ++++-----
.../Region/Environment/Scenes/SceneObjectPart.cs | 202 +++++-----
OpenSim/Region/Environment/Scenes/ScenePresence.cs | 184 ++++-----
.../Region/Environment/Scenes/SceneXmlLoader.cs | 8 +-
.../Region/Environment/Scenes/SimStatsReporter.cs | 88 ++--
OpenSim/Region/Environment/Types/UpdateQueue.cs | 4 +-
.../Region/Examples/SimpleModule/MyNpcCharacter.cs | 18 +-
.../SimpleModule/Properties/AssemblyInfo.cs | 10 +-
.../Modules/AvatarFactory/AvatarFactoryModule.cs | 8 +-
.../AvatarFactory/Properties/AssemblyInfo.cs | 10 +-
.../Modules/Python/Properties/AssemblyInfo.cs | 10 +-
.../SvnSerialiser/Properties/AssemblyInfo.cs | 10 +-
.../Region/Physics/BulletXPlugin/BulletXPlugin.cs | 20 +-
.../BulletXPlugin/TriangleIndexVertexArray.cs | 4 +-
OpenSim/Region/Physics/Manager/PhysicsActor.cs | 22 +-
.../Region/Physics/Manager/PhysicsPluginManager.cs | 8 +-
OpenSim/Region/Physics/Manager/PhysicsSensor.cs | 2 +-
OpenSim/Region/Physics/Manager/ZeroMesher.cs | 4 +-
OpenSim/Region/Physics/Meshing/HelperTypes.cs | 14 +-
OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 64 +--
OpenSim/Region/Physics/Meshing/SimpleHull.cs | 2 +-
OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | 62 +--
OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 226 +++++------
OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 208 ++++------
OpenSim/Region/Physics/POSPlugin/POSPlugin.cs | 6 +-
.../Common/BuiltIn_Commands_BaseClass.cs | 6 +-
OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs | 2 +-
.../ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 290 +++++++-------
OpenSim/Region/ScriptEngine/Common/LSL_Types.cs | 22 +-
.../ScriptEngine/Common/OSSL_BuilIn_Commands.cs | 4 +-
.../Common/OSSL_BuilIn_Commands_Interface.cs | 2 +-
.../ScriptEngine/Common/Properties/AssemblyInfo.cs | 8 +-
.../Common/ScriptEngineBase/AsyncCommandManager.cs | 4 +-
.../AsyncCommandPlugins/SensorRepeat.cs | 2 +-
.../ScriptEngineBase/AsyncCommandPlugins/Timer.cs | 2 +-
.../Common/ScriptEngineBase/MaintenanceThread.cs | 4 +-
.../Common/ScriptEngineBase/ScriptEngine.cs | 4 +-
.../Common/ScriptEngineBase/ScriptManager.cs | 6 +-
.../Region/ScriptEngine/Common/TRPC/TCPServer.cs | 2 +-
OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs | 2 +-
.../DotNetEngine/Compiler/LSL/Compiler.cs | 12 +-
.../DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | 27 +-
.../DotNetEngine/Properties/AssemblyInfo.cs | 10 +-
.../ScriptEngine/DotNetEngine/ScriptManager.cs | 2 +-
.../Region/ScriptEngine/LSOEngine/LSO/Engine.cs | 10 +-
.../LSOEngine/LSO/LSL_BaseClass_OPCODES.cs | 4 +-
.../ScriptEngine/LSOEngine/LSO/LSO_Parser.cs | 28 +-
.../LSOEngine/Properties/AssemblyInfo.cs | 10 +-
.../Region/ScriptEngine/LSOEngine/ScriptManager.cs | 2 +-
.../RemoteServer/Properties/AssemblyInfo.cs | 10 +-
.../ScriptEngine/RemoteServer/ScriptEngine.cs | 2 +-
.../Properties/AssemblyInfo.cs | 10 +-
.../OpenSim.DataStore.MSSQL/MSSQLDataStore.cs | 14 +-
OpenSim/TestSuite/PhysicsBot.cs | 6 +-
OpenSim/TestSuite/Util.cs | 16 +-
OpenSim/Tests/Common/DoubleToleranceConstraint.cs | 6 +-
OpenSim/Tests/Common/VectorToleranceConstraint.cs | 2 +-
OpenSim/Tests/Inventory/Properties/AssemblyInfo.cs | 10 +-
.../UserServer/Stress/UserServerStressTest.cs | 2 +-
.../LaunchSLClient/Properties/AssemblyInfo.cs | 8 +-
.../OpenSim.32BitLaunch/Properties/AssemblyInfo.cs | 10 +-
OpenSim/Tools/OpenSim.GUI/Main.Designer.cs | 412 +++++++++----------
.../Tools/OpenSim.GUI/Properties/AssemblyInfo.cs | 8 +-
.../Tools/OpenSim.GUI/frmConfiguration.Designer.cs | 8 +-
OpenSim/Tools/pCampBot/PhysicsBot.cs | 4 +-
261 files changed, 3725 insertions(+), 3838 deletions(-)
diff --git a/OpenSim/ApplicationPlugins/LoadRegions/Properties/AssemblyInfo.cs b/OpenSim/ApplicationPlugins/LoadRegions/Properties/AssemblyInfo.cs
index 818974c..58a5638 100644
--- a/OpenSim/ApplicationPlugins/LoadRegions/Properties/AssemblyInfo.cs
+++ b/OpenSim/ApplicationPlugins/LoadRegions/Properties/AssemblyInfo.cs
@@ -28,7 +28,7 @@
using System.Reflection;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// General information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices;
[assembly : AssemblyTrademark("")]
[assembly : AssemblyCulture("")]
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly : ComVisible(false)]
@@ -54,11 +54,11 @@ using System.Runtime.InteropServices;
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Build and Revision Numbers
+// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index e540e4d..c436596 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -58,7 +58,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
try
{
- if (openSim.ConfigSource.Configs["RemoteAdmin"] != null &&
+ if (openSim.ConfigSource.Configs["RemoteAdmin"] != null &&
openSim.ConfigSource.Configs["RemoteAdmin"].GetBoolean("enabled", false))
{
m_log.Info("[RADMIN]: Remote Admin Plugin Enabled");
@@ -96,7 +96,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
if (requiredPassword != String.Empty &&
(!requestData.Contains("password") || (string) requestData["password"] != requiredPassword))
throw new Exception("wrong password");
-
+
LLUUID regionID = new LLUUID((string) requestData["regionID"]);
responseData["accepted"] = "true";
@@ -106,10 +106,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
if (!m_app.SceneManager.TryGetScene(regionID, out rebootedScene))
throw new Exception("region not found");
-
+
responseData["rebooting"] = "true";
rebootedScene.Restart(30);
- }
+ }
catch(Exception e)
{
m_log.ErrorFormat("[RADMIN]: Restart region: failed: {0}", e.Message);
@@ -136,7 +136,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
if (requiredPassword != String.Empty &&
(!requestData.Contains("password") || (string) requestData["password"] != requiredPassword))
throw new Exception("wrong password");
-
+
string message = (string) requestData["message"];
m_log.InfoFormat("[RADMIN]: Broadcasting: {0}", message);
@@ -167,7 +167,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
m_log.DebugFormat("[RADMIN]: Load Terrain: XmlRpc {0}", request.ToString());
foreach (string k in requestData.Keys)
{
- m_log.DebugFormat("[RADMIN]: Load Terrain: XmlRpc {0}: >{1}< {2}",
+ m_log.DebugFormat("[RADMIN]: Load Terrain: XmlRpc {0}: >{1}< {2}",
k, (string)requestData[k], ((string)requestData[k]).Length);
}
@@ -198,7 +198,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
response.Value = responseData;
}
- catch (Exception e)
+ catch (Exception e)
{
m_log.ErrorFormat("[RADMIN] Terrain Loading: failed: {0}", e.Message);
m_log.DebugFormat("[RADMIN] Terrain Loading: failed: {0}", e.ToString());
@@ -227,14 +227,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController
int timeout = 2000;
- if (requestData.ContainsKey("shutdown") &&
+ if (requestData.ContainsKey("shutdown") &&
((string) requestData["shutdown"] == "delayed") &&
requestData.ContainsKey("milliseconds"))
{
timeout = (Int32) requestData["milliseconds"];
m_app.SceneManager.SendGeneralMessage("Region is going down in " + ((int) (timeout/1000)).ToString() +
" second(s). Please save what you are doing and log out.");
- }
+ }
else
{
m_app.SceneManager.SendGeneralMessage("Region is going down now.");
@@ -248,7 +248,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
responseData["success"] = "true";
}
- catch (Exception e)
+ catch (Exception e)
{
m_log.ErrorFormat("[RADMIN] Shutdown: failed: {0}", e.Message);
m_log.DebugFormat("[RADMIN] Shutdown: failed: {0}", e.ToString());
@@ -272,7 +272,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
Hashtable requestData = (Hashtable) request.Params[0];
foreach (string p in param)
{
- if (!requestData.Contains(p))
+ if (!requestData.Contains(p))
throw new Exception(String.Format("missing string parameter {0}", p));
if (String.IsNullOrEmpty((string)requestData[p]))
throw new Exception(String.Format("parameter {0} is empty", p));
@@ -284,7 +284,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
Hashtable requestData = (Hashtable) request.Params[0];
foreach (string p in param)
{
- if (!requestData.Contains(p))
+ if (!requestData.Contains(p))
throw new Exception(String.Format("missing integer parameter {0}", p));
}
}
@@ -324,7 +324,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
/// if true, persist the region info
/// ('true' or 'false')
///
- ///
+ ///
/// XmlRpcCreateRegionMethod returns
///
/// namedescription
@@ -346,9 +346,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
Hashtable responseData = new Hashtable();
try {
- checkStringParameters(request, new string[] { "password",
- "region_name",
- "region_master_first", "region_master_last",
+ checkStringParameters(request, new string[] { "password",
+ "region_name",
+ "region_master_first", "region_master_last",
"region_master_password",
"listen_ip", "external_address"});
checkIntegerParams(request, new string[] { "region_x", "region_y", "listen_port"});
@@ -360,16 +360,16 @@ namespace OpenSim.ApplicationPlugins.RemoteController
// extract or generate region ID now
Scene scene = null;
LLUUID regionID = LLUUID.Zero;
- if (requestData.ContainsKey("region_id") &&
- !String.IsNullOrEmpty((string)requestData["region_id"]))
+ if (requestData.ContainsKey("region_id") &&
+ !String.IsNullOrEmpty((string)requestData["region_id"]))
{
regionID = (string) requestData["region_id"];
- if (m_app.SceneManager.TryGetScene(regionID, out scene))
+ if (m_app.SceneManager.TryGetScene(regionID, out scene))
throw new Exception(String.Format("region UUID already in use by region {0}, UUID {1}, <{2},{3}>",
scene.RegionInfo.RegionName, scene.RegionInfo.RegionID,
scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY));
- }
- else
+ }
+ else
{
regionID = LLUUID.Random();
m_log.DebugFormat("[RADMIN] CreateRegion: new region UUID {0}", regionID);
@@ -385,7 +385,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
// check for collisions: region name, region UUID,
// region location
- if (m_app.SceneManager.TryGetScene(region.RegionName, out scene))
+ if (m_app.SceneManager.TryGetScene(region.RegionName, out scene))
throw new Exception(String.Format("region name already in use by region {0}, UUID {1}, <{2},{3}>",
scene.RegionInfo.RegionName, scene.RegionInfo.RegionID,
scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY));
@@ -395,43 +395,43 @@ namespace OpenSim.ApplicationPlugins.RemoteController
region.RegionLocX, region.RegionLocY,
scene.RegionInfo.RegionName, scene.RegionInfo.RegionID,
scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY));
-
+
// Security risk [and apparently not used]
// if (requestData.ContainsKey("datastore"))
// region.DataStore = (string) requestData["datastore"];
- region.InternalEndPoint =
+ region.InternalEndPoint =
new IPEndPoint(IPAddress.Parse((string) requestData["listen_ip"]), 0);
-
+
region.InternalEndPoint.Port = (Int32) requestData["listen_port"];
if (0 == region.InternalEndPoint.Port) throw new Exception("listen_port is 0");
if (m_app.SceneManager.TryGetScene(region.InternalEndPoint, out scene))
throw new Exception(String.Format("region internal IP {0} and port {1} already in use by region {2}, UUID {3}, <{4},{5}>",
- region.InternalEndPoint.Address,
+ region.InternalEndPoint.Address,
region.InternalEndPoint.Port,
scene.RegionInfo.RegionName, scene.RegionInfo.RegionID,
scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY));
-
+
region.ExternalHostName = (string) requestData["external_address"];
-
+
region.MasterAvatarFirstName = (string) requestData["region_master_first"];
region.MasterAvatarLastName = (string) requestData["region_master_last"];
region.MasterAvatarSandboxPassword = (string) requestData["region_master_password"];
bool persist = Convert.ToBoolean((string)requestData["persist"]);
- if (persist)
+ if (persist)
{
string regionConfigPath = Path.Combine(Path.Combine(Util.configDir(), "Regions"),
String.Format("{0}x{1}-{2}.xml",
region.RegionLocX.ToString(),
region.RegionLocY.ToString(),
regionID.ToString()));
- m_log.DebugFormat("[RADMIN] CreateRegion: persisting region {0} to {1}",
+ m_log.DebugFormat("[RADMIN] CreateRegion: persisting region {0} to {1}",
region.RegionID, regionConfigPath);
region.SaveRegionToFile("dynamic region", regionConfigPath);
}
-
+
m_app.CreateRegion(region);
responseData["success"] = "true";
@@ -476,7 +476,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
/// start_region_y
/// avatar's start region coordinates, Y value
///
- ///
+ ///
/// XmlRpcCreateUserMethod returns
///
/// namedescription
@@ -497,10 +497,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
Hashtable requestData = (Hashtable) request.Params[0];
Hashtable responseData = new Hashtable();
- try
+ try
{
// check completeness
- checkStringParameters(request, new string[] { "password", "user_firstname",
+ checkStringParameters(request, new string[] { "password", "user_firstname",
"user_lastname", "user_password" });
checkIntegerParams(request, new string[] { "start_region_x", "start_region_y" });
@@ -514,16 +514,16 @@ namespace OpenSim.ApplicationPlugins.RemoteController
string passwd = (string) requestData["user_password"];
uint regX = Convert.ToUInt32((Int32)requestData["start_region_x"]);
uint regY = Convert.ToUInt32((Int32)requestData["start_region_y"]);
-
+
UserProfileData userProfile = m_app.CommunicationsManager.UserService.GetUserProfile(firstname, lastname);
- if (null != userProfile)
+ if (null != userProfile)
throw new Exception(String.Format("avatar {0} {1} already exists", firstname, lastname));
LLUUID userID = m_app.CreateUser(firstname, lastname, passwd, regX, regY);
-
+
if (userID == LLUUID.Zero) throw new Exception(String.Format("failed to create new user {0} {1}",
firstname, lastname));
-
+
responseData["success"] = "true";
responseData["avatar_uuid"] = userID.ToString();
@@ -531,7 +531,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
m_log.InfoFormat("[RADMIN]: CreateUser: User {0} {1} created, UUID {2}", firstname, lastname, userID);
}
- catch (Exception e)
+ catch (Exception e)
{
m_log.ErrorFormat("[RADMIN] CreateUser: failed: {0}", e.Message);
m_log.DebugFormat("[RADMIN] CreateUser: failed: {0}", e.ToString());
@@ -553,33 +553,33 @@ namespace OpenSim.ApplicationPlugins.RemoteController
Hashtable requestData = (Hashtable) request.Params[0];
Hashtable responseData = new Hashtable();
- try
+ try
{
// check completeness
foreach (string p in new string[] { "password", "filename" })
{
- if (!requestData.Contains(p))
+ if (!requestData.Contains(p))
throw new Exception(String.Format("missing parameter {0}", p));
if (String.IsNullOrEmpty((string)requestData[p]))
throw new Exception(String.Format("parameter {0} is empty"));
}
-
+
// check password
if (!String.IsNullOrEmpty(requiredPassword) &&
(string)requestData["password"] != requiredPassword) throw new Exception("wrong password");
-
+
string filename = (string)requestData["filename"];
if (requestData.Contains("region_uuid"))
{
LLUUID region_uuid = (string)requestData["region_uuid"];
- if (!m_app.SceneManager.TrySetCurrentScene(region_uuid))
+ if (!m_app.SceneManager.TrySetCurrentScene(region_uuid))
throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString()));
m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString());
}
else if (requestData.Contains("region_name"))
{
string region_name = (string)requestData["region_name"];
- if (!m_app.SceneManager.TrySetCurrentScene(region_name))
+ if (!m_app.SceneManager.TrySetCurrentScene(region_name))
throw new Exception(String.Format("failed to switch to region {0}", region_name));
m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name);
}
@@ -589,7 +589,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
m_app.SceneManager.LoadCurrentSceneFromXml(filename, true, new LLVector3(0, 0, 0));
responseData["loaded"] = "true";
-
+
response.Value = responseData;
}
catch (Exception e)
@@ -600,10 +600,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
responseData["loaded"] = "false";
responseData["switched"] = "false";
responseData["error"] = e.Message;
-
+
response.Value = responseData;
}
-
+
return response;
}
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs b/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs
index 7fc1267..5102e3f 100644
--- a/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs
@@ -23,7 +23,7 @@
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
+*
*/
using libsecondlife;
@@ -65,7 +65,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
region_external_hostname = regInfo.ExternalHostName;
if (!String.IsNullOrEmpty(regInfo.MasterAvatarFirstName))
- region_owner = String.Format("{0} {1}", regInfo.MasterAvatarFirstName,
+ region_owner = String.Format("{0} {1}", regInfo.MasterAvatarFirstName,
regInfo.MasterAvatarLastName);
}
}
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/RestRegionPlugin.cs b/OpenSim/ApplicationPlugins/Rest/Regions/RestRegionPlugin.cs
index 8a6fb09..0716cf6 100644
--- a/OpenSim/ApplicationPlugins/Rest/Regions/RestRegionPlugin.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Regions/RestRegionPlugin.cs
@@ -23,7 +23,7 @@
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
+*
*/
using System;
@@ -57,12 +57,12 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
[Extension("/OpenSim/Startup")]
public class RestRegionPlugin : RestPlugin
{
- private static readonly log4net.ILog _log =
+ private static readonly log4net.ILog _log =
log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
#region overriding properties
- public override string Name
- {
+ public override string Name
+ {
get { return "REGION"; }
}
@@ -86,7 +86,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
try
{
base.Initialise(openSim);
- if (IsEnabled)
+ if (IsEnabled)
m_log.InfoFormat("{0} Rest Plugins Enabled", MsgID);
else
m_log.WarnFormat("{0} Rest Plugins are disabled", MsgID);
@@ -122,7 +122,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
StringWriter sw = new StringWriter();
XmlTextWriter xw = new XmlTextWriter(sw);
xw.Formatting = Formatting.Indented;
-
+
xw.WriteStartElement(String.Empty, "regions", String.Empty);
foreach (Scene s in App.SceneManager.Scenes)
{
@@ -132,7 +132,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
}
xw.WriteEndElement();
xw.Close();
-
+
return sw.ToString();
}
@@ -154,7 +154,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
xs.Serialize(xw, new RegionDetails(scene.RegionInfo));
xw.Close();
-
+
return sw.ToString();
}
#endregion methods
diff --git a/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs b/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs
index 0e54f4d..05ea956 100644
--- a/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs
+++ b/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs
@@ -23,7 +23,7 @@
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
+*
*/
using System;
@@ -54,7 +54,7 @@ namespace OpenSim.ApplicationPlugins.Rest
{
#region properties
- protected static readonly log4net.ILog m_log =
+ protected static readonly log4net.ILog m_log =
log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private IConfig _config; // Configuration source: Rest Plugins
@@ -100,8 +100,8 @@ namespace OpenSim.ApplicationPlugins.Rest
///
public bool IsEnabled
{
- get
- {
+ get
+ {
return (null != _pluginConfig) && _pluginConfig.GetBoolean("enabled", false);
}
}
@@ -109,7 +109,7 @@ namespace OpenSim.ApplicationPlugins.Rest
///
/// OpenSimMain application
///
- public OpenSimMain App
+ public OpenSimMain App
{
get { return _app; }
}
@@ -117,7 +117,7 @@ namespace OpenSim.ApplicationPlugins.Rest
///
/// RPC server
///
- public BaseHttpServer HttpServer
+ public BaseHttpServer HttpServer
{
get { return _httpd; }
}
@@ -171,7 +171,7 @@ namespace OpenSim.ApplicationPlugins.Rest
return;
}
- if (!_config.GetBoolean("enabled", false))
+ if (!_config.GetBoolean("enabled", false))
{
m_log.WarnFormat("{0} Rest Plugins are disabled", MsgID);
return;
@@ -184,10 +184,10 @@ namespace OpenSim.ApplicationPlugins.Rest
_godkey = _config.GetString("god_key", String.Empty);
// Retrive prefix if any.
_prefix = _config.GetString("prefix", "/admin");
-
+
// Get plugin specific config
_pluginConfig = openSim.ConfigSource.Configs[ConfigName];
-
+
m_log.InfoFormat("{0} Rest Plugins Enabled", MsgID);
}
catch (Exception e)
@@ -200,7 +200,7 @@ namespace OpenSim.ApplicationPlugins.Rest
// not possible for the openSim pointer to be null. However
// were the implementation to be changed, this could
// result in a silent initialization failure. Harmless
- // except for lack of function and lack of any
+ // except for lack of function and lack of any
// diagnostic indication as to why. The same is true if
// the HTTP server reference is bad.
// We should at least issue a message...
@@ -214,7 +214,7 @@ namespace OpenSim.ApplicationPlugins.Rest
public void AddRestStreamHandler(string httpMethod, string path, RestMethod method)
{
- if (!path.StartsWith(_prefix))
+ if (!path.StartsWith(_prefix))
{
path = String.Format("{0}{1}", _prefix, path);
}
@@ -226,7 +226,7 @@ namespace OpenSim.ApplicationPlugins.Rest
m_log.DebugFormat("{0} Added REST handler {1} {2}", MsgID, httpMethod, path);
}
-
+
public bool VerifyGod(string key)
{
if (String.IsNullOrEmpty(key)) return false;
diff --git a/OpenSim/Data/Base/BaseDataReader.cs b/OpenSim/Data/Base/BaseDataReader.cs
index b71a966..517f672 100644
--- a/OpenSim/Data/Base/BaseDataReader.cs
+++ b/OpenSim/Data/Base/BaseDataReader.cs
@@ -126,7 +126,7 @@ namespace OpenSim.Data.Base
{
int ordinal = m_source.GetOrdinal(name);
int int32 = m_source.GetInt32(ordinal);
- return int32;
+ return int32;
}
public Int64 GetInt64(string name)
diff --git a/OpenSim/Data/Base/BaseFieldMapper.cs b/OpenSim/Data/Base/BaseFieldMapper.cs
index 64adb32..4fdc7b9 100644
--- a/OpenSim/Data/Base/BaseFieldMapper.cs
+++ b/OpenSim/Data/Base/BaseFieldMapper.cs
@@ -30,7 +30,7 @@ using System.Collections.Generic;
using System.Data.Common;
namespace OpenSim.Data.Base
-{
+{
public delegate TField ObjectGetAccessor(TObj obj);
public delegate void ObjectSetAccessor(TObj obj, TField value);
diff --git a/OpenSim/Data/Base/Properties/AssemblyInfo.cs b/OpenSim/Data/Base/Properties/AssemblyInfo.cs
index f851df0..f165434 100644
--- a/OpenSim/Data/Base/Properties/AssemblyInfo.cs
+++ b/OpenSim/Data/Base/Properties/AssemblyInfo.cs
@@ -29,7 +29,7 @@ using System.Reflection;
using System.Runtime.InteropServices;
using System.Security;
-// General Information about an assembly is controlled through the following
+// General information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
@@ -42,8 +42,8 @@ using System.Security;
[assembly : AssemblyTrademark("")]
[assembly : AssemblyCulture("")]
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly : ComVisible(false)]
@@ -55,11 +55,11 @@ using System.Security;
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Revision and Build Numbers
+// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly : AssemblyVersion("1.0.0.0")]
diff --git a/OpenSim/Data/IGridData.cs b/OpenSim/Data/IGridData.cs
index 7681516..b2a8d26 100644
--- a/OpenSim/Data/IGridData.cs
+++ b/OpenSim/Data/IGridData.cs
@@ -28,7 +28,7 @@
using libsecondlife;
namespace OpenSim.Data
-{
+{
public enum DataResponse
{
RESPONSE_OK,
@@ -74,7 +74,7 @@ namespace OpenSim.Data
RegionProfileData[] GetProfilesInRange(uint Xmin, uint Ymin, uint Xmax, uint Ymax);
///
- /// Authenticates a sim by use of its recv key.
+ /// Authenticates a sim by use of its recv key.
/// WARNING: Insecure
///
/// The UUID sent by the sim
diff --git a/OpenSim/Data/IniConfig.cs b/OpenSim/Data/IniConfig.cs
index 700a681..d8a435d 100644
--- a/OpenSim/Data/IniConfig.cs
+++ b/OpenSim/Data/IniConfig.cs
@@ -28,7 +28,7 @@
using System.IO;
using System.Text.RegularExpressions;
-/*
+/*
Taken from public code listing at by Alex Pinsker
http://alexpinsker.blogspot.com/2005/12/reading-ini-file-from-c_113432097333021549.html
*/
diff --git a/OpenSim/Data/MSSQL/MSSQLAssetData.cs b/OpenSim/Data/MSSQL/MSSQLAssetData.cs
index 5ae60a1..12a03eb 100644
--- a/OpenSim/Data/MSSQL/MSSQLAssetData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLAssetData.cs
@@ -216,7 +216,7 @@ namespace OpenSim.Data.MSSQL
override public string Version
{
-// get { return database.getVersion(); }
+// get { return database.getVersion(); }
get { return database.getVersion(); }
}
diff --git a/OpenSim/Data/MSSQL/MSSQLDataStore.cs b/OpenSim/Data/MSSQL/MSSQLDataStore.cs
index 08217dc..8bb15c8 100644
--- a/OpenSim/Data/MSSQL/MSSQLDataStore.cs
+++ b/OpenSim/Data/MSSQL/MSSQLDataStore.cs
@@ -140,7 +140,7 @@ namespace OpenSim.Data.MSSQL
m_landAccessListTable = createLandAccessListTable();
m_dataSet.Tables.Add(m_landAccessListTable);
setupLandAccessCommands(m_landAccessListDataAdapter, m_connection);
- m_landAccessListDataAdapter.Fill(m_landAccessListTable);
+ m_landAccessListDataAdapter.Fill(m_landAccessListTable);
}
}
@@ -172,7 +172,7 @@ namespace OpenSim.Data.MSSQL
public void RemoveObject(LLUUID obj, LLUUID regionUUID)
{
// Instance.RemoveObject(obj, regionUUID);
-
+
m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID);
DataTable prims = m_primTable;
@@ -222,7 +222,7 @@ namespace OpenSim.Data.MSSQL
///
/// Load persisted objects from region storage.
- ///
+ ///
public List LoadObjects(LLUUID regionUUID)
{
// return Instance.LoadObjects(regionUUID);
@@ -328,12 +328,12 @@ namespace OpenSim.Data.MSSQL
TaskInventoryItem item = buildItem(row);
inventory.Add(item);
- //m_log.DebugFormat("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID);
+ //m_log.DebugFormat("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID);
}
prim.RestoreInventoryItems(inventory);
- // XXX A nasty little hack to recover the folder id for the prim (which is currently stored in
+ // XXX A nasty little hack to recover the folder id for the prim (which is currently stored in
// every item). This data should really be stored in the prim table itself.
if (dbItemRows.Length > 0)
{
@@ -527,7 +527,7 @@ namespace OpenSim.Data.MSSQL
/***********************************************************************
*
* Database Definition Functions
- *
+ *
* This should be db agnostic as we define them in ADO.NET terms
*
**********************************************************************/
@@ -742,7 +742,7 @@ namespace OpenSim.Data.MSSQL
}
/***********************************************************************
- *
+ *
* Convert between ADO.NET <=> OpenSim Objects
*
* These should be database independant
@@ -1198,7 +1198,7 @@ namespace OpenSim.Data.MSSQL
m_log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID);
- // For now, we're just going to crudely remove all the previous inventory items
+ // For now, we're just going to crudely remove all the previous inventory items
// no matter whether they have changed or not, and replace them with the current set.
lock (m_dataSet)
{
@@ -1209,7 +1209,7 @@ namespace OpenSim.Data.MSSQL
{
// m_log.InfoFormat(
// "[REGION DB]: " +
- // "Adding item {0}, {1} to prim ID {2}",
+ // "Adding item {0}, {1} to prim ID {2}",
// newItem.Name, newItem.ItemID, newItem.ParentPartID);
DataRow newItemRow = m_itemsTable.NewRow();
@@ -1282,7 +1282,7 @@ namespace OpenSim.Data.MSSQL
sql += subsql;
sql += " where " + pk;
SqlCommand cmd = new SqlCommand(sql);
-
+
// this provides the binding for all our parameters, so
// much less code than it used to be
@@ -1329,7 +1329,7 @@ namespace OpenSim.Data.MSSQL
/// This is a convenience function that collapses 5 repetitive
/// lines for defining SqlParameters to 2 parameters:
/// column name and database type.
- ///
+ ///
/// It assumes certain conventions like :param as the param
/// name to replace in parametrized queries, and that source
/// version is always current version, both of which are fine
@@ -1424,7 +1424,7 @@ namespace OpenSim.Data.MSSQL
SqlCommand tcmd = new SqlCommand(createTerrain, conn);
SqlCommand lcmd = new SqlCommand(createLand, conn);
SqlCommand lalcmd = new SqlCommand(createLandAccessList, conn);
-
+
conn.Open();
try
{
@@ -1604,6 +1604,6 @@ namespace OpenSim.Data.MSSQL
{
return DbType.String;
}
- }
+ }
}
}
diff --git a/OpenSim/Data/MSSQL/MSSQLGridData.cs b/OpenSim/Data/MSSQL/MSSQLGridData.cs
index cf81bee..0bdd460 100644
--- a/OpenSim/Data/MSSQL/MSSQLGridData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLGridData.cs
@@ -79,7 +79,7 @@ namespace OpenSim.Data.MSSQL
private void TestTables()
{
IDbCommand cmd = database.Query("SELECT TOP 1 * FROM "+m_regionsTableName, new Dictionary());
-
+
try
{
cmd.ExecuteNonQuery();
@@ -88,7 +88,7 @@ namespace OpenSim.Data.MSSQL
catch (Exception)
{
m_log.Info("[GRID DB]: MSSQL Database doesn't exist... creating");
- database.ExecuteResourceSql("Mssql-regions.sql");
+ database.ExecuteResourceSql("Mssql-regions.sql");
}
}
@@ -161,7 +161,7 @@ namespace OpenSim.Data.MSSQL
}
return null;
}
-
+
///
/// Returns a sim profile from its UUID
///
@@ -255,17 +255,17 @@ namespace OpenSim.Data.MSSQL
{
//Insert new region
string sql =
- "UPDATE " + m_regionsTableName + @" SET
- [regionHandle]=@regionHandle, [regionName]=@regionName,
+ "UPDATE " + m_regionsTableName + @" SET
+ [regionHandle]=@regionHandle, [regionName]=@regionName,
[regionRecvKey]=@regionRecvKey, [regionSecret]=@regionSecret, [regionSendKey]=@regionSendKey,
[regionDataURI]=@regionDataURI, [serverIP]=@serverIP, [serverPort]=@serverPort, [serverURI]=@serverURI,
- [locX]=@locX, [locY]=@locY, [locZ]=@locZ, [eastOverrideHandle]=@eastOverrideHandle,
- [westOverrideHandle]=@westOverrideHandle, [southOverrideHandle]=@southOverrideHandle,
- [northOverrideHandle]=@northOverrideHandle, [regionAssetURI]=@regionAssetURI,
+ [locX]=@locX, [locY]=@locY, [locZ]=@locZ, [eastOverrideHandle]=@eastOverrideHandle,
+ [westOverrideHandle]=@westOverrideHandle, [southOverrideHandle]=@southOverrideHandle,
+ [northOverrideHandle]=@northOverrideHandle, [regionAssetURI]=@regionAssetURI,
[regionAssetRecvKey]=@regionAssetRecvKey, [regionAssetSendKey]=@regionAssetSendKey,
[regionUserURI]=@regionUserURI, [regionUserRecvKey]=@regionUserRecvKey, [regionUserSendKey]=@regionUserSendKey,
[regionMapTexture]=@regionMapTexture, [serverHttpPort]=@serverHttpPort,
- [serverRemotingPort]=@serverRemotingPort, [owner_uuid]=@owner_uuid
+ [serverRemotingPort]=@serverRemotingPort, [owner_uuid]=@owner_uuid
where [uuid]=@uuid";
Dictionary parameters = new Dictionary();
diff --git a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
index 611a559..69d45f7 100644
--- a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
@@ -80,7 +80,7 @@ namespace OpenSim.Data.MSSQL
if (tableName == null)
{
database.ExecuteResourceSql("CreateFoldersTable.sql");
- //database.ExecuteResourceSql("UpgradeFoldersTableToVersion2.sql");
+ //database.ExecuteResourceSql("UpgradeFoldersTableToVersion2.sql");
return;
}
}
@@ -236,9 +236,9 @@ namespace OpenSim.Data.MSSQL
// There should only ever be one root folder for a user. However, if there's more
// than one we'll simply use the first one rather than failing. It would be even
- // nicer to print some message to this effect, but this feels like it's too low a
+ // nicer to print some message to this effect, but this feels like it's too low a
// to put such a message out, and it's too minor right now to spare the time to
- // suitably refactor.
+ // suitably refactor.
if (items.Count > 0)
{
rootFolder = items[0];
@@ -326,7 +326,7 @@ namespace OpenSim.Data.MSSQL
item.GroupID = new LLUUID(reader["groupID"].ToString());
item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]);
item.Flags = (uint) reader["flags"];
-
+
return item;
}
catch (SqlException e)
@@ -455,7 +455,7 @@ namespace OpenSim.Data.MSSQL
+ ", @inventoryNextPermissions, @inventoryCurrentPermissions, @invType, @creatorID"
+ ", @inventoryBasePermissions, @inventoryEveryOnePermissions, @salePrice, @saleType"
+ ", @creationDate, @groupID, @groupOwned, @flags);";
-
+
try
{
Dictionary param = new Dictionary();
@@ -472,7 +472,7 @@ namespace OpenSim.Data.MSSQL
param["creatorID"] = item.Creator.ToString();
param["inventoryBasePermissions"] = Convert.ToString(item.BasePermissions);
param["inventoryEveryOnePermissions"] = Convert.ToString(item.EveryOnePermissions);
-
+
param["salePrice"] = Convert.ToString(item.SalePrice);
param["saleType"] = Convert.ToString(item.SaleType);
param["creationDate"] = Convert.ToString(item.CreationDate);
@@ -550,7 +550,7 @@ namespace OpenSim.Data.MSSQL
}
///
- ///
+ ///
///
///
public void deleteInventoryItem(LLUUID itemID)
@@ -667,7 +667,7 @@ namespace OpenSim.Data.MSSQL
}
///
- /// Append a list of all the child folders of a parent folder
+ /// Append a list of all the child folders of a parent folder
///
/// list where folders will be appended
/// ID of parent
diff --git a/OpenSim/Data/MSSQL/MSSQLManager.cs b/OpenSim/Data/MSSQL/MSSQLManager.cs
index 2aea641..3221b3a 100644
--- a/OpenSim/Data/MSSQL/MSSQLManager.cs
+++ b/OpenSim/Data/MSSQL/MSSQLManager.cs
@@ -442,7 +442,7 @@ namespace OpenSim.Data.MSSQL
return returnval;
}
-
+
///
/// Execute a SQL statement stored in a resource, as a string
///
@@ -509,7 +509,7 @@ namespace OpenSim.Data.MSSQL
throw new Exception(string.Format("Resource '{0}' was not found", name));
}
- ///
+ ///
/// Returns the version of this DB provider
///
/// A string containing the DB provider
diff --git a/OpenSim/Data/MSSQL/MSSQLUserData.cs b/OpenSim/Data/MSSQL/MSSQLUserData.cs
index 844b7fa..9dc6812 100644
--- a/OpenSim/Data/MSSQL/MSSQLUserData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLUserData.cs
@@ -105,7 +105,7 @@ namespace OpenSim.Data.MSSQL
{
database.ExecuteResourceSql("Mssql-users.sql");
}
-
+
cmd = database.Query("select top 1 * from " + m_agentsTableName, new Dictionary());
try
{
@@ -747,7 +747,7 @@ namespace OpenSim.Data.MSSQL
/// Appearance
/// TODO: stubs for now to get us to a compiling state gently
- // override public AvatarAppearance GetUserAppearance(LLUUID user)
+ // override public AvatarAppearance GetUserAppearance(LLUUID user)
// {
// return new AvatarAppearance();
// }
@@ -761,12 +761,12 @@ namespace OpenSim.Data.MSSQL
{
return;
}
-
+
override public void RemoveAttachment(LLUUID user, LLUUID item)
{
return;
}
-
+
override public List GetAttachments(LLUUID user)
{
return new List();
diff --git a/OpenSim/Data/MSSQL/Properties/AssemblyInfo.cs b/OpenSim/Data/MSSQL/Properties/AssemblyInfo.cs
index 6b2c214..279e1a9 100644
--- a/OpenSim/Data/MSSQL/Properties/AssemblyInfo.cs
+++ b/OpenSim/Data/MSSQL/Properties/AssemblyInfo.cs
@@ -28,7 +28,7 @@
using System.Reflection;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// General information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices;
[assembly : AssemblyTrademark("")]
[assembly : AssemblyCulture("")]
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly : ComVisible(false)]
@@ -54,11 +54,11 @@ using System.Runtime.InteropServices;
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Revision and Build Numbers
+// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly : AssemblyVersion("1.0.0.0")]
diff --git a/OpenSim/Data/MapperFactory/DataMapperFactory.cs b/OpenSim/Data/MapperFactory/DataMapperFactory.cs
index 1d981f8..0b1fadd 100644
--- a/OpenSim/Data/MapperFactory/DataMapperFactory.cs
+++ b/OpenSim/Data/MapperFactory/DataMapperFactory.cs
@@ -49,7 +49,7 @@ namespace OpenSim.Data.MapperFactory
return new MSSQLDatabaseMapper(connectionString);
default:
throw new ArgumentException("Unknown Database Mapper type [" + type + "].");
- }
+ }
}
}
}
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs
index 7e6289b..e556352 100644
--- a/OpenSim/Data/MySQL/MySQLAssetData.cs
+++ b/OpenSim/Data/MySQL/MySQLAssetData.cs
@@ -79,7 +79,7 @@ namespace OpenSim.Data.MySQL
_dbConnection.Connection);
MySqlParameter p = cmd.Parameters.Add("?id", MySqlDbType.Binary, 16);
p.Value = assetID.GetBytes();
-
+
try
{
using (MySqlDataReader dbReader = cmd.ExecuteReader(CommandBehavior.SingleRow))
@@ -111,7 +111,7 @@ namespace OpenSim.Data.MySQL
}
override public void CreateAsset(AssetBase asset)
- {
+ {
lock (_dbConnection)
{
MySqlCommand cmd =
@@ -119,10 +119,10 @@ namespace OpenSim.Data.MySQL
"REPLACE INTO assets(id, name, description, assetType, invType, local, temporary, data)" +
"VALUES(?id, ?name, ?description, ?assetType, ?invType, ?local, ?temporary, ?data)",
_dbConnection.Connection);
-
+
// need to ensure we dispose
try
- {
+ {
using (cmd)
{
MySqlParameter p = cmd.Parameters.Add("?id", MySqlDbType.Binary, 16);
@@ -145,7 +145,7 @@ namespace OpenSim.Data.MySQL
"MySql failure creating asset {0} with name {1}" + Environment.NewLine + e.ToString()
+ Environment.NewLine + "Attempting reconnection", asset.FullID, asset.Name);
_dbConnection.Reconnect();
- }
+ }
}
}
diff --git a/OpenSim/Data/MySQL/MySQLDataStore.cs b/OpenSim/Data/MySQL/MySQLDataStore.cs
index ac0d382..3c39a5e 100644
--- a/OpenSim/Data/MySQL/MySQLDataStore.cs
+++ b/OpenSim/Data/MySQL/MySQLDataStore.cs
@@ -50,12 +50,12 @@ namespace OpenSim.Data.MySQL
private const string m_terrainSelect = "select * from terrain limit 1";
private const string m_landSelect = "select * from land";
private const string m_landAccessListSelect = "select * from landaccesslist";
-
-
+
+
///
/// We're only using this to version the table!
///
-
+
private DataSet m_dataSet;
private MySqlDataAdapter m_primDataAdapter;
@@ -65,16 +65,16 @@ namespace OpenSim.Data.MySQL
private MySqlDataAdapter m_terrainDataAdapter;
private MySqlDataAdapter m_landDataAdapter;
private MySqlDataAdapter m_landAccessListDataAdapter;
-
+
private DataTable m_primTable;
private DataTable m_shapeTable;
private DataTable m_itemsTable;
private DataTable m_terrainTable;
private DataTable m_landTable;
private DataTable m_landAccessListTable;
-
+
// Temporary attribute while this is experimental
- private bool persistPrimInventories;
+ private bool persistPrimInventories;
/***********************************************************************
*
@@ -98,9 +98,9 @@ namespace OpenSim.Data.MySQL
MySqlCommand shapeSelectCmd = new MySqlCommand(m_shapeSelect, m_connection);
m_shapeDataAdapter = new MySqlDataAdapter(shapeSelectCmd);
-
+
MySqlCommand itemsSelectCmd = new MySqlCommand(m_itemsSelect, m_connection);
- m_itemsDataAdapter = new MySqlDataAdapter(itemsSelectCmd);
+ m_itemsDataAdapter = new MySqlDataAdapter(itemsSelectCmd);
MySqlCommand terrainSelectCmd = new MySqlCommand(m_terrainSelect, m_connection);
m_terrainDataAdapter = new MySqlDataAdapter(terrainSelectCmd);
@@ -111,7 +111,7 @@ namespace OpenSim.Data.MySQL
MySqlCommand landAccessListSelectCmd = new MySqlCommand(m_landAccessListSelect, m_connection);
m_landAccessListDataAdapter = new MySqlDataAdapter(landAccessListSelectCmd);
-
+
TestTables(m_connection);
lock (m_dataSet)
@@ -125,13 +125,13 @@ namespace OpenSim.Data.MySQL
m_dataSet.Tables.Add(m_shapeTable);
SetupShapeCommands(m_shapeDataAdapter, m_connection);
m_shapeDataAdapter.Fill(m_shapeTable);
-
+
if (persistPrimInventories)
{
m_itemsTable = createItemsTable();
m_dataSet.Tables.Add(m_itemsTable);
SetupItemsCommands(m_itemsDataAdapter, m_connection);
- m_itemsDataAdapter.Fill(m_itemsTable);
+ m_itemsDataAdapter.Fill(m_itemsTable);
}
m_terrainTable = createTerrainTable();
@@ -195,7 +195,7 @@ namespace OpenSim.Data.MySQL
UpgradeLandTable(tableList["land"], dbconn);
//database.Close();
-
+
}
///
@@ -290,12 +290,12 @@ namespace OpenSim.Data.MySQL
{
shapeRow.Delete();
}
-
+
if (persistPrimInventories)
- {
+ {
RemoveItems(uuid);
}
-
+
// Remove prim row
row.Delete();
}
@@ -309,18 +309,18 @@ namespace OpenSim.Data.MySQL
///
private void RemoveItems(LLUUID uuid)
{
- String sql = String.Format("primID = '{0}'", uuid);
+ String sql = String.Format("primID = '{0}'", uuid);
DataRow[] itemRows = m_itemsTable.Select(sql);
-
+
foreach (DataRow itemRow in itemRows)
{
itemRow.Delete();
}
}
-
+
///
/// Load persisted objects from region storage.
- ///
+ ///
public List LoadObjects(LLUUID regionUUID)
{
Dictionary createdObjects = new Dictionary();
@@ -341,17 +341,17 @@ namespace OpenSim.Data.MySQL
foreach (DataRow primRow in primsForRegion)
{
- try
+ try
{
string uuid = (string) primRow["UUID"];
string objID = (string) primRow["SceneGroupID"];
-
+
SceneObjectPart prim = buildPrim(primRow);
-
+
if (uuid == objID) //is new SceneObjectGroup ?
{
SceneObjectGroup group = new SceneObjectGroup();
-
+
DataRow shapeRow = shapes.Rows.Find(Util.ToRawUuidString(prim.UUID));
if (shapeRow != null)
{
@@ -384,11 +384,11 @@ namespace OpenSim.Data.MySQL
}
createdObjects[new LLUUID(objID)].AddPart(prim);
}
-
+
if (persistPrimInventories)
{
LoadItems(prim);
- }
+ }
}
catch (Exception e)
{
@@ -403,7 +403,7 @@ namespace OpenSim.Data.MySQL
}
return retvals;
}
-
+
///
/// Load in a prim's persisted inventory.
///
@@ -411,31 +411,31 @@ namespace OpenSim.Data.MySQL
private void LoadItems(SceneObjectPart prim)
{
//m_log.InfoFormat("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID);
-
+
DataTable dbItems = m_itemsTable;
-
- String sql = String.Format("primID = '{0}'", prim.UUID.ToString());
+
+ String sql = String.Format("primID = '{0}'", prim.UUID.ToString());
DataRow[] dbItemRows = dbItems.Select(sql);
-
+
IList inventory = new List();
-
+
foreach (DataRow row in dbItemRows)
{
TaskInventoryItem item = buildItem(row);
inventory.Add(item);
-
- //m_log.DebugFormat("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID);
+
+ //m_log.DebugFormat("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID);
}
-
+
prim.RestoreInventoryItems(inventory);
-
- // XXX A nasty little hack to recover the folder id for the prim (which is currently stored in
+
+ // XXX A nasty little hack to recover the folder id for the prim (which is currently stored in
// every item). This data should really be stored in the prim table itself.
if (dbItemRows.Length > 0)
{
prim.FolderID = inventory[0].ParentID;
}
- }
+ }
public void StoreTerrain(double[,] ter, LLUUID regionID)
{
@@ -474,8 +474,8 @@ namespace OpenSim.Data.MySQL
{
m_connection.Open();
}
-
- lock (m_dataSet)
+
+ lock (m_dataSet)
{
using (MySqlDataReader row = cmd.ExecuteReader())
{
@@ -498,7 +498,7 @@ namespace OpenSim.Data.MySQL
m_log.Info("[REGION DB]: No terrain found for region");
return null;
}
-
+
m_log.Info("[REGION DB]: Loaded terrain revision r" + rev.ToString());
}
}
@@ -558,7 +558,7 @@ namespace OpenSim.Data.MySQL
fillLandAccessRow(newAccessRow, entry, parcel.landData.globalID);
landaccesslist.Rows.Add(newAccessRow);
}
-
+
Commit();
}
}
@@ -624,7 +624,7 @@ namespace OpenSim.Data.MySQL
/***********************************************************************
*
* Database Definition Functions
- *
+ *
* This should be db agnostic as we define them in ADO.NET terms
*
**********************************************************************/
@@ -803,7 +803,7 @@ namespace OpenSim.Data.MySQL
return shapes;
}
-
+
private static DataTable createItemsTable()
{
DataTable items = new DataTable("primitems");
@@ -812,8 +812,8 @@ namespace OpenSim.Data.MySQL
createCol(items, "primID", typeof (String));
createCol(items, "assetID", typeof (String));
createCol(items, "parentFolderID", typeof (String));
-
- createCol(items, "invType", typeof (Int32));
+
+ createCol(items, "invType", typeof (Int32));
createCol(items, "assetType", typeof (Int32));
createCol(items, "name", typeof (String));
@@ -834,10 +834,10 @@ namespace OpenSim.Data.MySQL
items.PrimaryKey = new DataColumn[] {items.Columns["itemID"]};
return items;
- }
+ }
/***********************************************************************
- *
+ *
* Convert between ADO.NET <=> OpenSim Objects
*
* These should be database independant
@@ -932,8 +932,8 @@ namespace OpenSim.Data.MySQL
}
return prim;
}
-
-
+
+
///
/// Build a prim inventory item from the persisted data.
///
@@ -942,15 +942,15 @@ namespace OpenSim.Data.MySQL
private static TaskInventoryItem buildItem(DataRow row)
{
TaskInventoryItem taskItem = new TaskInventoryItem();
-
- taskItem.ItemID = new LLUUID((String)row["itemID"]);
+
+ taskItem.ItemID = new LLUUID((String)row["itemID"]);
taskItem.ParentPartID = new LLUUID((String)row["primID"]);
taskItem.AssetID = new LLUUID((String)row["assetID"]);
taskItem.ParentID = new LLUUID((String)row["parentFolderID"]);
-
+
taskItem.InvType = Convert.ToInt32(row["invType"]);
taskItem.Type = Convert.ToInt32(row["assetType"]);
-
+
taskItem.Name = (String)row["name"];
taskItem.Description = (String)row["description"];
taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]);
@@ -958,15 +958,15 @@ namespace OpenSim.Data.MySQL
taskItem.OwnerID = new LLUUID((String)row["ownerID"]);
taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]);
taskItem.GroupID = new LLUUID((String)row["groupID"]);
-
+
taskItem.NextOwnerMask = Convert.ToUInt32(row["nextPermissions"]);
taskItem.OwnerMask = Convert.ToUInt32(row["currentPermissions"]);
taskItem.BaseMask = Convert.ToUInt32(row["basePermissions"]);
taskItem.EveryoneMask = Convert.ToUInt32(row["everyonePermissions"]);
taskItem.GroupMask = Convert.ToUInt32(row["groupPermissions"]);
-
+
return taskItem;
- }
+ }
private static LandData buildLandData(DataRow row)
{
@@ -1117,17 +1117,17 @@ namespace OpenSim.Data.MySQL
}
}
}
-
+
private static void fillItemRow(DataRow row, TaskInventoryItem taskItem)
{
row["itemID"] = taskItem.ItemID;
row["primID"] = taskItem.ParentPartID;
row["assetID"] = taskItem.AssetID;
row["parentFolderID"] = taskItem.ParentID;
-
+
row["invType"] = taskItem.InvType;
row["assetType"] = taskItem.Type;
-
+
row["name"] = taskItem.Name;
row["description"] = taskItem.Description;
row["creationDate"] = taskItem.CreationDate;
@@ -1140,7 +1140,7 @@ namespace OpenSim.Data.MySQL
row["basePermissions"] = taskItem.BaseMask;
row["everyonePermissions"] = taskItem.EveryoneMask;
row["groupPermissions"] = taskItem.GroupMask;
- }
+ }
private static void fillLandRow(DataRow row, LandData land, LLUUID regionUUID)
{
@@ -1322,39 +1322,39 @@ namespace OpenSim.Data.MySQL
else
{
fillShapeRow(shapeRow, prim);
- }
+ }
}
-
+
// see IRegionDatastore
public void StorePrimInventory(LLUUID primID, ICollection items)
{
if (!persistPrimInventories)
return;
-
+
m_log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID);
-
- // For now, we're just going to crudely remove all the previous inventory items
+
+ // For now, we're just going to crudely remove all the previous inventory items
// no matter whether they have changed or not, and replace them with the current set.
lock (m_dataSet)
- {
- RemoveItems(primID);
-
+ {
+ RemoveItems(primID);
+
// repalce with current inventory details
foreach (TaskInventoryItem newItem in items)
{
// m_log.InfoFormat(
// "[REGION DB]: " +
-// "Adding item {0}, {1} to prim ID {2}",
+// "Adding item {0}, {1} to prim ID {2}",
// newItem.Name, newItem.ItemID, newItem.ParentPartID);
-
+
DataRow newItemRow = m_itemsTable.NewRow();
fillItemRow(newItemRow, newItem);
- m_itemsTable.Rows.Add(newItemRow);
+ m_itemsTable.Rows.Add(newItemRow);
}
}
-
+
Commit();
- }
+ }
/***********************************************************************
*
@@ -1447,9 +1447,9 @@ namespace OpenSim.Data.MySQL
}
sql += subsql;
sql += ")";
-
+
//m_log.InfoFormat("[DATASTORE]: defineTable() sql {0}", sql);
-
+
return sql;
}
@@ -1466,7 +1466,7 @@ namespace OpenSim.Data.MySQL
/// This is a convenience function that collapses 5 repetitive
/// lines for defining MySqlParameters to 2 parameters:
/// column name and database type.
- ///
+ ///
/// It assumes certain conventions like ?param as the param
/// name to replace in parametrized queries, and that source
/// version is always current version, both of which are fine
@@ -1498,7 +1498,7 @@ namespace OpenSim.Data.MySQL
delete.Connection = conn;
da.DeleteCommand = delete;
}
-
+
private void SetupItemsCommands(MySqlDataAdapter da, MySqlConnection conn)
{
da.InsertCommand = createInsertCommand("primitems", m_itemsTable);
@@ -1511,7 +1511,7 @@ namespace OpenSim.Data.MySQL
delete.Parameters.Add(createMySqlParameter("itemID", typeof (String)));
delete.Connection = conn;
da.DeleteCommand = delete;
- }
+ }
private void SetupTerrainCommands(MySqlDataAdapter da, MySqlConnection conn)
{
@@ -1597,7 +1597,7 @@ namespace OpenSim.Data.MySQL
{
m_log.WarnFormat("[REGION DB]: Shapes Table Already Exists: {0}", e);
}
-
+
try
{
icmd.ExecuteNonQuery();
@@ -1605,7 +1605,7 @@ namespace OpenSim.Data.MySQL
catch (MySqlException e)
{
m_log.WarnFormat("[REGION DB]: Items Table Already Exists: {0}", e);
- }
+ }
try
{
@@ -1643,7 +1643,7 @@ namespace OpenSim.Data.MySQL
MySqlCommand shapeSelectCmd = new MySqlCommand(m_shapeSelect, conn);
MySqlDataAdapter sDa = new MySqlDataAdapter(shapeSelectCmd);
MySqlCommand itemsSelectCmd = new MySqlCommand(m_itemsSelect, conn);
- MySqlDataAdapter iDa = new MySqlDataAdapter(itemsSelectCmd);
+ MySqlDataAdapter iDa = new MySqlDataAdapter(itemsSelectCmd);
MySqlCommand terrainSelectCmd = new MySqlCommand(m_terrainSelect, conn);
MySqlDataAdapter tDa = new MySqlDataAdapter(terrainSelectCmd);
MySqlCommand landSelectCmd = new MySqlCommand(m_landSelect, conn);
@@ -1656,10 +1656,10 @@ namespace OpenSim.Data.MySQL
{
pDa.Fill(tmpDS, "prims");
sDa.Fill(tmpDS, "primshapes");
-
+
if (persistPrimInventories)
iDa.Fill(tmpDS, "primitems");
-
+
tDa.Fill(tmpDS, "terrain");
lDa.Fill(tmpDS, "land");
lalDa.Fill(tmpDS, "landaccesslist");
@@ -1672,10 +1672,10 @@ namespace OpenSim.Data.MySQL
pDa.Fill(tmpDS, "prims");
sDa.Fill(tmpDS, "primshapes");
-
+
if (persistPrimInventories)
iDa.Fill(tmpDS, "primitems");
-
+
tDa.Fill(tmpDS, "terrain");
lDa.Fill(tmpDS, "land");
lalDa.Fill(tmpDS, "landaccesslist");
@@ -1688,7 +1688,7 @@ namespace OpenSim.Data.MySQL
return false;
}
}
-
+
foreach (DataColumn col in createShapeTable().Columns)
{
if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName))
@@ -1697,9 +1697,9 @@ namespace OpenSim.Data.MySQL
return false;
}
}
-
+
// XXX primitems should probably go here eventually
-
+
foreach (DataColumn col in createTerrainTable().Columns)
{
if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName))
@@ -1708,7 +1708,7 @@ namespace OpenSim.Data.MySQL
return false;
}
}
-
+
foreach (DataColumn col in createLandTable().Columns)
{
if (!tmpDS.Tables["land"].Columns.Contains(col.ColumnName))
@@ -1717,7 +1717,7 @@ namespace OpenSim.Data.MySQL
return false;
}
}
-
+
foreach (DataColumn col in createLandAccessListTable().Columns)
{
if (!tmpDS.Tables["landaccesslist"].Columns.Contains(col.ColumnName))
@@ -1726,7 +1726,7 @@ namespace OpenSim.Data.MySQL
return false;
}
}
-
+
return true;
}
@@ -1783,7 +1783,7 @@ namespace OpenSim.Data.MySQL
else if (type == typeof (Int64))
{
return "bigint";
- }
+ }
else if (type == typeof (Double))
{
return "float";
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs
index 90664ff..92b005d 100644
--- a/OpenSim/Data/MySQL/MySQLInventoryData.cs
+++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs
@@ -40,7 +40,7 @@ namespace OpenSim.Data.MySQL
///
public class MySQLInventoryData : IInventoryData
{
- private static readonly ILog m_log
+ private static readonly ILog m_log
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
///
@@ -249,7 +249,7 @@ namespace OpenSim.Data.MySQL
// There should only ever be one root folder for a user. However, if there's more
// than one we'll simply use the first one rather than failing. It would be even
- // nicer to print some message to this effect, but this feels like it's too low a
+ // nicer to print some message to this effect, but this feels like it's too low a
// to put such a message out, and it's too minor right now to spare the time to
// suitably refactor.
if (items.Count > 0)
@@ -332,13 +332,13 @@ namespace OpenSim.Data.MySQL
item.InvType = (int) reader["invType"];
item.Creator = new LLUUID((string) reader["creatorID"]);
item.BasePermissions = (uint) reader["inventoryBasePermissions"];
- item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"];
+ item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"];
item.SalePrice = (int) reader["salePrice"];
item.SaleType = Convert.ToByte(reader["saleType"]);
item.CreationDate = (int) reader["creationDate"];
item.GroupID = new LLUUID(reader["groupID"].ToString());
item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]);
- item.Flags = (uint) reader["flags"];
+ item.Flags = (uint) reader["flags"];
return item;
}
@@ -483,12 +483,12 @@ namespace OpenSim.Data.MySQL
result.Parameters.AddWithValue("?groupID", item.GroupID);
result.Parameters.AddWithValue("?groupOwned", item.GroupOwned);
result.Parameters.AddWithValue("?flags", item.Flags);
-
+
lock (database)
{
result.ExecuteNonQuery();
}
-
+
result.Dispose();
}
catch (MySqlException e)
@@ -507,7 +507,7 @@ namespace OpenSim.Data.MySQL
}
///
- ///
+ ///
///
///
public void deleteInventoryItem(LLUUID itemID)
@@ -517,7 +517,7 @@ namespace OpenSim.Data.MySQL
MySqlCommand cmd =
new MySqlCommand("DELETE FROM inventoryitems WHERE inventoryID=?uuid", database.Connection);
cmd.Parameters.AddWithValue("?uuid", itemID.ToString());
-
+
lock (database)
{
cmd.ExecuteNonQuery();
@@ -596,7 +596,7 @@ namespace OpenSim.Data.MySQL
}
///
- /// Append a list of all the child folders of a parent folder
+ /// Append a list of all the child folders of a parent folder
///
/// list where folders will be appended
/// ID of parent
@@ -623,11 +623,11 @@ namespace OpenSim.Data.MySQL
protected void deleteOneFolder(LLUUID folderID)
{
try
- {
+ {
MySqlCommand cmd =
new MySqlCommand("DELETE FROM inventoryfolders WHERE folderID=?uuid", database.Connection);
cmd.Parameters.AddWithValue("?uuid", folderID.ToString());
-
+
lock (database)
{
cmd.ExecuteNonQuery();
@@ -647,7 +647,7 @@ namespace OpenSim.Data.MySQL
MySqlCommand cmd =
new MySqlCommand("DELETE FROM inventoryitems WHERE parentFolderID=?uuid", database.Connection);
cmd.Parameters.AddWithValue("?uuid", folderID.ToString());
-
+
lock (database)
{
cmd.ExecuteNonQuery();
diff --git a/OpenSim/Data/MySQL/MySQLManager.cs b/OpenSim/Data/MySQL/MySQLManager.cs
index 4455c3b..f7baadc 100644
--- a/OpenSim/Data/MySQL/MySQLManager.cs
+++ b/OpenSim/Data/MySQL/MySQLManager.cs
@@ -302,7 +302,7 @@ namespace OpenSim.Data.MySQL
// Region Main gotta-have-or-we-return-null parts
UInt64 tmp64;
if (!UInt64.TryParse(reader["regionHandle"].ToString(), out tmp64))
- {
+ {
return null;
}
else
@@ -310,7 +310,7 @@ namespace OpenSim.Data.MySQL
retval.regionHandle = tmp64;
}
LLUUID tmp_uuid;
- if (!LLUUID.TryParse((string)reader["uuid"], out tmp_uuid))
+ if (!LLUUID.TryParse((string)reader["uuid"], out tmp_uuid))
{
return null;
}
@@ -321,7 +321,7 @@ namespace OpenSim.Data.MySQL
// non-critical parts
retval.regionName = (string)reader["regionName"];
- retval.originUUID = new LLUUID((string) reader["originUUID"]);
+ retval.originUUID = new LLUUID((string) reader["originUUID"]);
// Secrets
retval.regionRecvKey = (string) reader["regionRecvKey"];
@@ -360,8 +360,8 @@ namespace OpenSim.Data.MySQL
// World Map Addition
LLUUID.TryParse((string)reader["regionMapTexture"], out retval.regionMapTextureID);
- LLUUID.TryParse((string)reader["owner_uuid"], out retval.owner_uuid);
- }
+ LLUUID.TryParse((string)reader["owner_uuid"], out retval.owner_uuid);
+ }
else
{
return null;
@@ -418,7 +418,7 @@ namespace OpenSim.Data.MySQL
LLUUID.TryParse((string) reader["sessionID"], out tmp);
retval.SessionID = tmp;
-
+
LLUUID.TryParse((string)reader["secureSessionID"], out tmp);
retval.SecureSessionID = tmp;
@@ -488,7 +488,7 @@ namespace OpenSim.Data.MySQL
if (reader.IsDBNull(reader.GetOrdinal("profileAboutText")))
retval.AboutText = "";
- else
+ else
retval.AboutText = (string) reader["profileAboutText"];
if (reader.IsDBNull(reader.GetOrdinal("profileFirstText")))
@@ -511,7 +511,7 @@ namespace OpenSim.Data.MySQL
LLUUID.TryParse((string)reader["profileFirstImage"], out tmp);
retval.FirstLifeImage = tmp;
}
-
+
if (reader.IsDBNull(reader.GetOrdinal("webLoginKey")))
{
retval.WebLoginKey = LLUUID.Zero;
diff --git a/OpenSim/Data/MySQL/MySQLUserData.cs b/OpenSim/Data/MySQL/MySQLUserData.cs
index a1e1094..0acf47b 100644
--- a/OpenSim/Data/MySQL/MySQLUserData.cs
+++ b/OpenSim/Data/MySQL/MySQLUserData.cs
@@ -59,7 +59,7 @@ namespace OpenSim.Data.MySQL
{
// TODO: actually do something with our connect string
// instead of loading the second config
-
+
IniFile iniFile = new IniFile("mysql_connection.ini");
string settingHostname = iniFile.ParseFileReadValue("hostname");
string settingDatabase = iniFile.ParseFileReadValue("database");
@@ -67,7 +67,7 @@ namespace OpenSim.Data.MySQL
string settingPassword = iniFile.ParseFileReadValue("password");
string settingPooling = iniFile.ParseFileReadValue("pooling");
string settingPort = iniFile.ParseFileReadValue("port");
-
+
m_usersTableName = iniFile.ParseFileReadValue("userstablename");
if (m_usersTableName == null)
{
@@ -206,15 +206,15 @@ namespace OpenSim.Data.MySQL
param["?friendID"] = friend.UUID.ToString();
param["?friendPerms"] = perms.ToString();
param["?datetimestamp"] = dtvalue.ToString();
-
- try
+
+ try
{
lock (database)
{
IDbCommand adder =
database.Query(
"INSERT INTO `" + m_userFriendsTableName + "` " +
- "(`ownerID`,`friendID`,`friendPerms`,`datetimestamp`) " +
+ "(`ownerID`,`friendID`,`friendPerms`,`datetimestamp`) " +
"VALUES " +
"(?ownerID,?friendID,?friendPerms,?datetimestamp)",
param);
@@ -325,7 +325,7 @@ namespace OpenSim.Data.MySQL
// This is not a real column in the database table, it's a joined column from the opposite record
fli.FriendListOwnerPerms = (uint)Convert.ToInt32(reader["ownerperms"]);
-
+
Lfli.Add(fli);
}
reader.Close();
@@ -599,7 +599,7 @@ namespace OpenSim.Data.MySQL
user.UserAssetURI, user.CanDoMask, user.WantDoMask, user.AboutText,
user.FirstLifeAboutText, user.Image, user.FirstLifeImage, user.WebLoginKey);
}
-
+
return true;
}
@@ -630,7 +630,7 @@ namespace OpenSim.Data.MySQL
/// Appearance
/// TODO: stubs for now to get us to a compiling state gently
- // override public AvatarAppearance GetUserAppearance(LLUUID user)
+ // override public AvatarAppearance GetUserAppearance(LLUUID user)
// {
// return new AvatarAppearance();
// }
@@ -644,12 +644,12 @@ namespace OpenSim.Data.MySQL
{
return;
}
-
+
override public void RemoveAttachment(LLUUID user, LLUUID item)
{
return;
}
-
+
override public List GetAttachments(LLUUID user)
{
return new List();
diff --git a/OpenSim/Data/MySQL/Properties/AssemblyInfo.cs b/OpenSim/Data/MySQL/Properties/AssemblyInfo.cs
index 16b2a4f..b3e08a3 100644
--- a/OpenSim/Data/MySQL/Properties/AssemblyInfo.cs
+++ b/OpenSim/Data/MySQL/Properties/AssemblyInfo.cs
@@ -28,7 +28,7 @@
using System.Reflection;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// General information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices;
[assembly : AssemblyTrademark("")]
[assembly : AssemblyCulture("")]
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly : ComVisible(false)]
@@ -54,11 +54,11 @@ using System.Runtime.InteropServices;
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Revision and Build Numbers
+// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly : AssemblyVersion("1.0.0.0")]
diff --git a/OpenSim/Data/NHibernate/LLUUIDUserType.cs b/OpenSim/Data/NHibernate/LLUUIDUserType.cs
index e4f1dc2..0f10344 100644
--- a/OpenSim/Data/NHibernate/LLUUIDUserType.cs
+++ b/OpenSim/Data/NHibernate/LLUUIDUserType.cs
@@ -35,7 +35,7 @@ using NHibernate.UserTypes;
namespace OpenSim.Data.NHibernate
{
[Serializable]
- public class LLUUIDUserType: IUserType
+ public class LLUUIDUserType: IUserType
{
public object Assemble(object cached, object owner)
{
@@ -69,7 +69,7 @@ namespace OpenSim.Data.NHibernate
public object NullSafeGet(IDataReader rs, string[] names, object owner)
{
- object uuid = null;
+ object uuid = null;
int ord = rs.GetOrdinal(names[0]);
if (!rs.IsDBNull(ord))
diff --git a/OpenSim/Data/NHibernate/NHibernateAssetData.cs b/OpenSim/Data/NHibernate/NHibernateAssetData.cs
index 4eb9eef..075f2e9 100644
--- a/OpenSim/Data/NHibernate/NHibernateAssetData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateAssetData.cs
@@ -65,20 +65,20 @@ namespace OpenSim.Data.NHibernate
// TODO: make this a real exception type
throw new Exception("Malformed Inventory connection string '" + connect + "'");
}
-
+
// NHibernate setup
cfg = new Configuration();
- cfg.SetProperty(Environment.ConnectionProvider,
+ cfg.SetProperty(Environment.ConnectionProvider,
"NHibernate.Connection.DriverConnectionProvider");
- cfg.SetProperty(Environment.Dialect,
+ cfg.SetProperty(Environment.Dialect,
"NHibernate.Dialect." + parts[0]);
- cfg.SetProperty(Environment.ConnectionDriver,
+ cfg.SetProperty(Environment.ConnectionDriver,
"NHibernate.Driver." + parts[1]);
cfg.SetProperty(Environment.ConnectionString, parts[2]);
cfg.AddAssembly("OpenSim.Data.NHibernate");
HbmSerializer.Default.Validate = true;
- using ( MemoryStream stream =
+ using ( MemoryStream stream =
HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly()))
cfg.AddInputStream(stream);
diff --git a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
index fa75588..228e0b6 100644
--- a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
@@ -62,23 +62,23 @@ namespace OpenSim.Data.NHibernate
// TODO: make this a real exception type
throw new Exception("Malformed Inventory connection string '" + connect + "'");
}
-
+
// Establish NHibernate Connection
cfg = new Configuration();
- cfg.SetProperty(Environment.ConnectionProvider,
+ cfg.SetProperty(Environment.ConnectionProvider,
"NHibernate.Connection.DriverConnectionProvider");
- cfg.SetProperty(Environment.Dialect,
+ cfg.SetProperty(Environment.Dialect,
"NHibernate.Dialect." + parts[0]);
- cfg.SetProperty(Environment.ConnectionDriver,
+ cfg.SetProperty(Environment.ConnectionDriver,
"NHibernate.Driver." + parts[1]);
cfg.SetProperty(Environment.ConnectionString, parts[2]);
cfg.AddAssembly("OpenSim.Data.NHibernate");
HbmSerializer.Default.Validate = true;
- using ( MemoryStream stream =
+ using ( MemoryStream stream =
HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly()))
cfg.AddInputStream(stream);
-
+
// If uncommented this will auto create tables, but it
// does drops of the old tables, so we need a smarter way
// to acturally manage this.
@@ -120,8 +120,8 @@ namespace OpenSim.Data.NHibernate
/*****************************************************************
*
- * Basic CRUD operations on Data
- *
+ * Basic CRUD operations on Data
+ *
****************************************************************/
// READ
@@ -195,7 +195,7 @@ namespace OpenSim.Data.NHibernate
}
///
- ///
+ ///
///
///
public void deleteInventoryItem(LLUUID itemID)
@@ -279,7 +279,7 @@ namespace OpenSim.Data.NHibernate
}
///
- ///
+ ///
///
///
public void deleteInventoryFolder(LLUUID folderID)
@@ -353,7 +353,7 @@ namespace OpenSim.Data.NHibernate
{
updateInventoryItem(item);
}
-
+
///
@@ -403,9 +403,9 @@ namespace OpenSim.Data.NHibernate
return null;
}
}
-
+
///
- /// Append a list of all the child folders of a parent folder
+ /// Append a list of all the child folders of a parent folder
///
/// list where folders will be appended
/// ID of parent
@@ -413,7 +413,7 @@ namespace OpenSim.Data.NHibernate
{
using (ISession session = factory.OpenSession())
{
-
+
ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase));
criteria.Add(Expression.Eq("ParentID", parentID));
foreach (InventoryFolderBase item in criteria.List())
@@ -443,7 +443,7 @@ namespace OpenSim.Data.NHibernate
for (int i = 0; i < folders.Count; i++)
getInventoryFolders(ref folders, folders[i].ID);
-
+
return folders;
}
}
diff --git a/OpenSim/Data/NHibernate/NHibernateUserData.cs b/OpenSim/Data/NHibernate/NHibernateUserData.cs
index 6ba2783..4de0291 100644
--- a/OpenSim/Data/NHibernate/NHibernateUserData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateUserData.cs
@@ -64,20 +64,20 @@ namespace OpenSim.Data.NHibernate
// This is stubbing for now, it will become dynamic later and support different db backends
cfg = new Configuration();
- cfg.SetProperty(Environment.ConnectionProvider,
+ cfg.SetProperty(Environment.ConnectionProvider,
"NHibernate.Connection.DriverConnectionProvider");
- cfg.SetProperty(Environment.Dialect,
+ cfg.SetProperty(Environment.Dialect,
"NHibernate.Dialect." + parts[0]);
- cfg.SetProperty(Environment.ConnectionDriver,
+ cfg.SetProperty(Environment.ConnectionDriver,
"NHibernate.Driver." + parts[1]);
cfg.SetProperty(Environment.ConnectionString, parts[2]);
cfg.AddAssembly("OpenSim.Data.NHibernate");
HbmSerializer.Default.Validate = true;
- using ( MemoryStream stream =
+ using ( MemoryStream stream =
HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly()))
cfg.AddInputStream(stream);
-
+
// new SchemaExport(cfg).Create(true, true);
factory = cfg.BuildSessionFactory();
@@ -122,7 +122,7 @@ namespace OpenSim.Data.NHibernate
// BUG: CATCHALL IS BAD.
}
catch (Exception) {}
-
+
return (user != null);
}
@@ -151,7 +151,7 @@ namespace OpenSim.Data.NHibernate
// TODO: save agent
transaction.Commit();
}
- }
+ }
}
else
{
@@ -162,7 +162,7 @@ namespace OpenSim.Data.NHibernate
private static void SetAgentData(LLUUID uuid, UserAgentData agent, ISession session)
{
- if (agent == null)
+ if (agent == null)
{
// TODO: got to figure out how to do a delete right
}
@@ -178,7 +178,7 @@ namespace OpenSim.Data.NHibernate
session.Update(agent);
}
}
-
+
}
override public bool UpdateUserProfile(UserProfileData profile)
{
@@ -193,7 +193,7 @@ namespace OpenSim.Data.NHibernate
transaction.Commit();
return true;
}
- }
+ }
}
else
{
@@ -202,7 +202,7 @@ namespace OpenSim.Data.NHibernate
return true;
}
}
-
+
override public void AddNewUserAgent(UserAgentData agent)
{
using (ISession session = factory.OpenSession())
@@ -212,9 +212,9 @@ namespace OpenSim.Data.NHibernate
session.Save(agent);
transaction.Commit();
}
- }
+ }
}
-
+
public void UpdateUserAgent(UserAgentData agent)
{
using (ISession session = factory.OpenSession())
@@ -224,7 +224,7 @@ namespace OpenSim.Data.NHibernate
session.Update(agent);
transaction.Commit();
}
- }
+ }
}
override public UserAgentData GetAgentByUUID(LLUUID uuid)
@@ -262,7 +262,7 @@ namespace OpenSim.Data.NHibernate
{
return GetUserByName(fname, lname).CurrentAgent;
}
-
+
override public UserAgentData GetAgentByName(string name)
{
return GetAgentByName(name.Split(' ')[0], name.Split(' ')[1]);
@@ -273,7 +273,7 @@ namespace OpenSim.Data.NHibernate
List results = new List();
string[] querysplit;
querysplit = query.Split(' ');
-
+
if (querysplit.Length == 2)
{
using (ISession session = factory.OpenSession())
@@ -293,7 +293,7 @@ namespace OpenSim.Data.NHibernate
}
return results;
}
-
+
// TODO: actually implement these
public override void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid) {return;}
public override void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey) {return;}
@@ -306,7 +306,7 @@ namespace OpenSim.Data.NHibernate
/// Appearance
/// TODO: stubs for now to get us to a compiling state gently
- public AvatarAppearance GetUserAppearance(LLUUID user)
+ public AvatarAppearance GetUserAppearance(LLUUID user)
{
AvatarAppearance appearance;
// TODO: I'm sure I'll have to do something silly here
@@ -345,19 +345,19 @@ namespace OpenSim.Data.NHibernate
}
transaction.Commit();
}
- }
+ }
}
override public void AddAttachment(LLUUID user, LLUUID item)
{
return;
}
-
+
override public void RemoveAttachment(LLUUID user, LLUUID item)
{
return;
}
-
+
override public List GetAttachments(LLUUID user)
{
return new List();
diff --git a/OpenSim/Data/Null/NullDataStore.cs b/OpenSim/Data/Null/NullDataStore.cs
index 096171c..487f72e 100644
--- a/OpenSim/Data/Null/NullDataStore.cs
+++ b/OpenSim/Data/Null/NullDataStore.cs
@@ -47,11 +47,11 @@ namespace OpenSim.Data.Null
public void RemoveObject(LLUUID obj, LLUUID regionUUID)
{
}
-
+
// see IRegionDatastore
public void StorePrimInventory(LLUUID primID, ICollection items)
{
- }
+ }
public List LoadObjects(LLUUID regionUUID)
{
diff --git a/OpenSim/Data/Null/Properties/AssemblyInfo.cs b/OpenSim/Data/Null/Properties/AssemblyInfo.cs
index 5db915c..135a64d 100644
--- a/OpenSim/Data/Null/Properties/AssemblyInfo.cs
+++ b/OpenSim/Data/Null/Properties/AssemblyInfo.cs
@@ -28,7 +28,7 @@
using System.Reflection;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// General information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices;
[assembly : AssemblyTrademark("")]
[assembly : AssemblyCulture("")]
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly : ComVisible(false)]
@@ -54,11 +54,11 @@ using System.Runtime.InteropServices;
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Revision and Build Numbers
+// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly : AssemblyVersion("1.0.0.0")]
diff --git a/OpenSim/Data/OpenSimObjectFieldMapper.cs b/OpenSim/Data/OpenSimObjectFieldMapper.cs
index d67881b..ff375fb 100644
--- a/OpenSim/Data/OpenSimObjectFieldMapper.cs
+++ b/OpenSim/Data/OpenSimObjectFieldMapper.cs
@@ -95,6 +95,6 @@ namespace OpenSim.Data
}
return value;
- }
+ }
}
}
diff --git a/OpenSim/Data/PrimitiveBaseShapeTableMapper.cs b/OpenSim/Data/PrimitiveBaseShapeTableMapper.cs
index cb3d33d..a4e39a1 100644
--- a/OpenSim/Data/PrimitiveBaseShapeTableMapper.cs
+++ b/OpenSim/Data/PrimitiveBaseShapeTableMapper.cs
@@ -135,7 +135,7 @@ namespace OpenSim.Data
rowMapperSchema.AddMapping("ExtraParams",
delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.ExtraParams; },
- delegate(PrimitiveBaseShapeRowMapper shape, byte[] value) { shape.Object.ExtraParams = value; });
+ delegate(PrimitiveBaseShapeRowMapper shape, byte[] value) { shape.Object.ExtraParams = value; });
}
public override PrimitiveBaseShapeRowMapper FromReader(BaseDataReader reader)
diff --git a/OpenSim/Data/Properties/AssemblyInfo.cs b/OpenSim/Data/Properties/AssemblyInfo.cs
index 357aaa0..03985c3 100644
--- a/OpenSim/Data/Properties/AssemblyInfo.cs
+++ b/OpenSim/Data/Properties/AssemblyInfo.cs
@@ -28,7 +28,7 @@
using System.Reflection;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// General information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices;
[assembly : AssemblyTrademark("")]
[assembly : AssemblyCulture("")]
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly : ComVisible(false)]
@@ -54,11 +54,11 @@ using System.Runtime.InteropServices;
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Revision and Build Numbers
+// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly : AssemblyVersion("1.0.0.0")]
diff --git a/OpenSim/Data/RegionProfileData.cs b/OpenSim/Data/RegionProfileData.cs
index 000a500..897dcbf 100644
--- a/OpenSim/Data/RegionProfileData.cs
+++ b/OpenSim/Data/RegionProfileData.cs
@@ -120,7 +120,7 @@ namespace OpenSim.Data
public LLUUID regionMapTextureID = new LLUUID("00000000-0000-1111-9999-000000000006");
///
- /// this particular mod to the file provides support within the spec for RegionProfileData for the
+ /// this particular mod to the file provides support within the spec for RegionProfileData for the
/// owner_uuid for the region
///
public LLUUID owner_uuid = LLUUID.Zero;
@@ -128,7 +128,7 @@ namespace OpenSim.Data
///
/// OGS/OpenSim Specific original ID for a region after move/split
///
- public LLUUID originUUID;
+ public LLUUID originUUID;
///
/// Get Sim profile data from grid server when in grid mode
@@ -163,7 +163,7 @@ namespace OpenSim.Data
simData.serverPort = Convert.ToUInt32((string) responseData["sim_port"]);
simData.httpPort = Convert.ToUInt32((string) responseData["http_port"]);
simData.remotingPort = Convert.ToUInt32((string) responseData["remoting_port"]);
- simData.serverURI = (string)responseData["server_uri"];
+ simData.serverURI = (string)responseData["server_uri"];
simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/";
simData.UUID = new LLUUID((string) responseData["region_UUID"]);
simData.regionName = (string) responseData["region_name"];
@@ -206,7 +206,7 @@ namespace OpenSim.Data
simData.httpPort = Convert.ToUInt32((string) responseData["http_port"]);
simData.remotingPort = Convert.ToUInt32((string) responseData["remoting_port"]);
simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/";
- simData.serverURI = (string)responseData["server_uri"];
+ simData.serverURI = (string)responseData["server_uri"];
simData.UUID = new LLUUID((string) responseData["region_UUID"]);
simData.regionName = (string) responseData["region_name"];
diff --git a/OpenSim/Data/SQLite/Properties/AssemblyInfo.cs b/OpenSim/Data/SQLite/Properties/AssemblyInfo.cs
index 4616cbc..221495e 100644
--- a/OpenSim/Data/SQLite/Properties/AssemblyInfo.cs
+++ b/OpenSim/Data/SQLite/Properties/AssemblyInfo.cs
@@ -28,7 +28,7 @@
using System.Reflection;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// General information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices;
[assembly : AssemblyTrademark("")]
[assembly : AssemblyCulture("")]
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly : ComVisible(false)]
@@ -54,11 +54,11 @@ using System.Runtime.InteropServices;
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Revision and Build Numbers
+// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly : AssemblyVersion("1.0.0.0")]
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs
index 34329bb..8d4fb99 100644
--- a/OpenSim/Data/SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Data.SQLite
private const string SelectAssetSQL = "select * from assets where UUID=:UUID";
private const string DeleteAssetSQL = "delete from assets where UUID=:UUID";
private const string InsertAssetSQL = "insert into assets(UUID, Name, Description, Type, InvType, Local, Temporary, Data) values(:UUID, :Name, :Description, :Type, :InvType, :Local, :Temporary, :Data)";
- private const string UpdateAssetSQL = "update assets set Name=:Name, Description=:Description, Type=:Type, InvType=:InvType, Local=:Local, Temporary=:Temporary, Data=:Data where UUID=:UUID";
+ private const string UpdateAssetSQL = "update assets set Name=:Name, Description=:Description, Type=:Type, InvType=:InvType, Local=:Local, Temporary=:Temporary, Data=:Data where UUID=:UUID";
private const string assetSelect = "select * from assets";
private SqliteConnection m_conn;
@@ -70,11 +70,11 @@ namespace OpenSim.Data.SQLite
override public AssetBase FetchAsset(LLUUID uuid)
{
-
+
using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn))
{
cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid)));
- using (IDataReader reader = cmd.ExecuteReader())
+ using (IDataReader reader = cmd.ExecuteReader())
{
if (reader.Read())
{
@@ -98,7 +98,7 @@ namespace OpenSim.Data.SQLite
{
m_log.Info("[ASSET DB]: Asset exists already, ignoring.");
}
- else
+ else
{
using (SqliteCommand cmd = new SqliteCommand(InsertAssetSQL, m_conn))
{
@@ -110,7 +110,7 @@ namespace OpenSim.Data.SQLite
cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local));
cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary));
cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data));
-
+
cmd.ExecuteNonQuery();
}
}
@@ -119,7 +119,7 @@ namespace OpenSim.Data.SQLite
override public void UpdateAsset(AssetBase asset)
{
LogAssetLoad(asset);
-
+
using (SqliteCommand cmd = new SqliteCommand(UpdateAssetSQL, m_conn))
{
cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID)));
@@ -130,7 +130,7 @@ namespace OpenSim.Data.SQLite
cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local));
cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary));
cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data));
-
+
cmd.ExecuteNonQuery();
}
@@ -154,14 +154,14 @@ namespace OpenSim.Data.SQLite
using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn))
{
cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid)));
- using (IDataReader reader = cmd.ExecuteReader())
+ using (IDataReader reader = cmd.ExecuteReader())
{
if (reader.Read())
{
reader.Close();
return true;
}
- else
+ else
{
reader.Close();
return false;
@@ -175,7 +175,7 @@ namespace OpenSim.Data.SQLite
using (SqliteCommand cmd = new SqliteCommand(DeleteAssetSQL, m_conn))
{
cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid)));
-
+
cmd.ExecuteNonQuery();
}
}
@@ -193,7 +193,7 @@ namespace OpenSim.Data.SQLite
/***********************************************************************
*
* Database Definition Functions
- *
+ *
* This should be db agnostic as we define them in ADO.NET terms
*
**********************************************************************/
@@ -216,7 +216,7 @@ namespace OpenSim.Data.SQLite
}
/***********************************************************************
- *
+ *
* Convert between ADO.NET <=> OpenSim Objects
*
* These should be database independant
diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
index 1ab971c..5acc5f2 100644
--- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
+++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
@@ -106,22 +106,22 @@ namespace OpenSim.Data.SQLite
// new fields
if (!Convert.IsDBNull(row["salePrice"]))
item.SalePrice = Convert.ToInt32(row["salePrice"]);
-
+
if (!Convert.IsDBNull(row["saleType"]))
item.SaleType = Convert.ToByte(row["saleType"]);
-
+
if (!Convert.IsDBNull(row["creationDate"]))
item.CreationDate = Convert.ToInt32(row["creationDate"]);
-
+
if (!Convert.IsDBNull(row["groupID"]))
item.GroupID = new LLUUID((string)row["groupID"]);
-
+
if (!Convert.IsDBNull(row["groupOwned"]))
item.GroupOwned = Convert.ToBoolean(row["groupOwned"]);
-
+
if (!Convert.IsDBNull(row["Flags"]))
item.Flags = Convert.ToUInt32(row["Flags"]);
-
+
return item;
}
@@ -221,7 +221,7 @@ namespace OpenSim.Data.SQLite
{
if (add)
m_log.ErrorFormat("[INVENTORY DB]: Interface Misuse: Attempting to Add inventory item that already exists: {0}", item.ID);
-
+
fillItemRow(inventoryRow, item);
}
invItemsDa.Update(ds, "inventoryitems");
@@ -314,9 +314,9 @@ namespace OpenSim.Data.SQLite
// There should only ever be one root folder for a user. However, if there's more
// than one we'll simply use the first one rather than failing. It would be even
- // nicer to print some message to this effect, but this feels like it's too low a
+ // nicer to print some message to this effect, but this feels like it's too low a
// to put such a message out, and it's too minor right now to spare the time to
- // suitably refactor.
+ // suitably refactor.
if (folders.Count > 0)
{
return folders[0];
@@ -327,7 +327,7 @@ namespace OpenSim.Data.SQLite
}
///
- /// Append a list of all the child folders of a parent folder
+ /// Append a list of all the child folders of a parent folder
///
/// list where folders will be appended
/// ID of parent
@@ -435,7 +435,7 @@ namespace OpenSim.Data.SQLite
}
///
- ///
+ ///
///
///
public void deleteInventoryItem(LLUUID itemID)
@@ -664,7 +664,7 @@ namespace OpenSim.Data.SQLite
{
string createInventoryItems = defineTable(createInventoryItemsTable());
string createInventoryFolders = defineTable(createInventoryFoldersTable());
-
+
SqliteCommand pcmd = new SqliteCommand(createInventoryItems, conn);
SqliteCommand scmd = new SqliteCommand(createInventoryFolders, conn);
@@ -697,7 +697,7 @@ namespace OpenSim.Data.SQLite
// Very clumsy way of checking whether we need to upgrade the database table version and then updating. Only
// putting up with this because this code should be blown away soon by nhibernate...
conn.Open();
-
+
SqliteCommand cmd;
try
{
@@ -707,7 +707,7 @@ namespace OpenSim.Data.SQLite
catch (SqliteSyntaxException)
{
m_log.Info("[INVENTORY DB]: Upgrading sqlite inventory database to version 2");
-
+
cmd = new SqliteCommand("alter table inventoryitems add column salePrice integer default 99;", conn);
cmd.ExecuteNonQuery();
cmd = new SqliteCommand("alter table inventoryitems add column saleType integer default 0;", conn);
@@ -719,15 +719,15 @@ namespace OpenSim.Data.SQLite
cmd = new SqliteCommand("alter table inventoryitems add column groupOwned integer default 0;", conn);
cmd.ExecuteNonQuery();
cmd = new SqliteCommand("alter table inventoryitems add column flags integer default 0;", conn);
- cmd.ExecuteNonQuery();
-
+ cmd.ExecuteNonQuery();
+
pDa.Fill(tmpDS, "inventoryitems");
}
finally
{
conn.Close();
}
-
+
foreach (DataColumn col in createInventoryItemsTable().Columns)
{
if (! tmpDS.Tables["inventoryitems"].Columns.Contains(col.ColumnName))
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs
index 1b577db..6a16a88 100644
--- a/OpenSim/Data/SQLite/SQLiteRegionData.cs
+++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs
@@ -90,11 +90,11 @@ namespace OpenSim.Data.SQLite
SqliteCommand shapeSelectCmd = new SqliteCommand(shapeSelect, m_conn);
shapeDa = new SqliteDataAdapter(shapeSelectCmd);
- // SqliteCommandBuilder shapeCb = new SqliteCommandBuilder(shapeDa);
+ // SqliteCommandBuilder shapeCb = new SqliteCommandBuilder(shapeDa);
SqliteCommand itemsSelectCmd = new SqliteCommand(itemsSelect, m_conn);
itemsDa = new SqliteDataAdapter(itemsSelectCmd);
-
+
SqliteCommand terrainSelectCmd = new SqliteCommand(terrainSelect, m_conn);
terrainDa = new SqliteDataAdapter(terrainSelectCmd);
@@ -117,7 +117,7 @@ namespace OpenSim.Data.SQLite
ds.Tables.Add(createShapeTable());
setupShapeCommands(shapeDa, m_conn);
-
+
if (persistPrimInventories)
{
ds.Tables.Add(createItemsTable());
@@ -183,8 +183,8 @@ namespace OpenSim.Data.SQLite
{
foreach (SceneObjectPart prim in obj.Children.Values)
{
- if ((prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == 0
- && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Temporary) == 0
+ if ((prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == 0
+ && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Temporary) == 0
&& (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) == 0)
{
m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID);
@@ -210,7 +210,7 @@ namespace OpenSim.Data.SQLite
public void RemoveObject(LLUUID obj, LLUUID regionUUID)
{
m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID);
-
+
DataTable prims = ds.Tables["prims"];
DataTable shapes = ds.Tables["primshapes"];
@@ -234,7 +234,7 @@ namespace OpenSim.Data.SQLite
}
// Remove prim row
- row.Delete();
+ row.Delete();
}
}
@@ -247,11 +247,11 @@ namespace OpenSim.Data.SQLite
///
private void RemoveItems(LLUUID uuid)
{
- DataTable items = ds.Tables["primitems"];
+ DataTable items = ds.Tables["primitems"];
- String sql = String.Format("primID = '{0}'", uuid);
+ String sql = String.Format("primID = '{0}'", uuid);
DataRow[] itemRows = items.Select(sql);
-
+
foreach (DataRow itemRow in itemRows)
{
itemRow.Delete();
@@ -286,7 +286,7 @@ namespace OpenSim.Data.SQLite
try
{
SceneObjectPart prim = null;
-
+
string uuid = (string) primRow["UUID"];
string objID = (string) primRow["SceneGroupID"];
if (uuid == objID) //is new SceneObjectGroup ?
@@ -353,25 +353,25 @@ namespace OpenSim.Data.SQLite
private void LoadItems(SceneObjectPart prim)
{
//m_log.DebugFormat("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID);
-
+
DataTable dbItems = ds.Tables["primitems"];
-
- String sql = String.Format("primID = '{0}'", prim.UUID.ToString());
+
+ String sql = String.Format("primID = '{0}'", prim.UUID.ToString());
DataRow[] dbItemRows = dbItems.Select(sql);
-
+
IList inventory = new List();
-
+
foreach (DataRow row in dbItemRows)
{
TaskInventoryItem item = buildItem(row);
inventory.Add(item);
-
- //m_log.DebugFormat("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID);
+
+ //m_log.DebugFormat("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID);
}
-
+
prim.RestoreInventoryItems(inventory);
-
- // XXX A nasty little hack to recover the folder id for the prim (which is currently stored in
+
+ // XXX A nasty little hack to recover the folder id for the prim (which is currently stored in
// every item). This data should really be stored in the prim table itself.
if (dbItemRows.Length > 0)
{
@@ -548,12 +548,12 @@ namespace OpenSim.Data.SQLite
{
primDa.Update(ds, "prims");
shapeDa.Update(ds, "primshapes");
-
+
if (persistPrimInventories)
{
itemsDa.Update(ds, "primitems");
}
-
+
terrainDa.Update(ds, "terrain");
landDa.Update(ds, "land");
landAccessListDa.Update(ds, "landaccesslist");
@@ -569,7 +569,7 @@ namespace OpenSim.Data.SQLite
/***********************************************************************
*
* Database Definition Functions
- *
+ *
* This should be db agnostic as we define them in ADO.NET terms
*
**********************************************************************/
@@ -705,8 +705,8 @@ namespace OpenSim.Data.SQLite
createCol(items, "primID", typeof (String));
createCol(items, "assetID", typeof (String));
createCol(items, "parentFolderID", typeof (String));
-
- createCol(items, "invType", typeof (Int32));
+
+ createCol(items, "invType", typeof (Int32));
createCol(items, "assetType", typeof (Int32));
createCol(items, "name", typeof (String));
@@ -784,7 +784,7 @@ namespace OpenSim.Data.SQLite
}
/***********************************************************************
- *
+ *
* Convert between ADO.NET <=> OpenSim Objects
*
* These should be database independant
@@ -897,7 +897,7 @@ namespace OpenSim.Data.SQLite
return prim;
}
-
+
///
/// Build a prim inventory item from the persisted data.
///
@@ -906,15 +906,15 @@ namespace OpenSim.Data.SQLite
private static TaskInventoryItem buildItem(DataRow row)
{
TaskInventoryItem taskItem = new TaskInventoryItem();
-
- taskItem.ItemID = new LLUUID((String)row["itemID"]);
+
+ taskItem.ItemID = new LLUUID((String)row["itemID"]);
taskItem.ParentPartID = new LLUUID((String)row["primID"]);
taskItem.AssetID = new LLUUID((String)row["assetID"]);
taskItem.ParentID = new LLUUID((String)row["parentFolderID"]);
-
+
taskItem.InvType = Convert.ToInt32(row["invType"]);
taskItem.Type = Convert.ToInt32(row["assetType"]);
-
+
taskItem.Name = (String)row["name"];
taskItem.Description = (String)row["description"];
taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]);
@@ -922,13 +922,13 @@ namespace OpenSim.Data.SQLite
taskItem.OwnerID = new LLUUID((String)row["ownerID"]);
taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]);
taskItem.GroupID = new LLUUID((String)row["groupID"]);
-
+
taskItem.NextOwnerMask = Convert.ToUInt32(row["nextPermissions"]);
taskItem.OwnerMask = Convert.ToUInt32(row["currentPermissions"]);
taskItem.BaseMask = Convert.ToUInt32(row["basePermissions"]);
taskItem.EveryoneMask = Convert.ToUInt32(row["everyonePermissions"]);
taskItem.GroupMask = Convert.ToUInt32(row["groupPermissions"]);
-
+
return taskItem;
}
@@ -990,14 +990,14 @@ namespace OpenSim.Data.SQLite
cmd.ExecuteNonQuery();
m_conn.Close();
m_conn.Dispose();
-
+
m_log.Error("[REGION DB]: The land table was recently updated. You need to restart the simulator. Exiting now.");
Thread.Sleep(10000);
// ICK! but it's better then A thousand red SQLITE error messages!
Environment.Exit(0);
-
+
}
catch (Exception)
{
@@ -1006,7 +1006,7 @@ namespace OpenSim.Data.SQLite
Environment.Exit(0);
}
}
-
+
return newData;
}
@@ -1107,17 +1107,17 @@ namespace OpenSim.Data.SQLite
row["SitTargetOrientY"] = sitTargetOrient.Y;
row["SitTargetOrientZ"] = sitTargetOrient.Z;
}
-
+
private static void fillItemRow(DataRow row, TaskInventoryItem taskItem)
{
row["itemID"] = taskItem.ItemID;
row["primID"] = taskItem.ParentPartID;
row["assetID"] = taskItem.AssetID;
row["parentFolderID"] = taskItem.ParentID;
-
+
row["invType"] = taskItem.InvType;
row["assetType"] = taskItem.Type;
-
+
row["name"] = taskItem.Name;
row["description"] = taskItem.Description;
row["creationDate"] = taskItem.CreationDate;
@@ -1294,37 +1294,37 @@ namespace OpenSim.Data.SQLite
fillShapeRow(shapeRow, prim);
}
}
-
+
// see IRegionDatastore
public void StorePrimInventory(LLUUID primID, ICollection items)
{
if (!persistPrimInventories)
return;
-
+
m_log.InfoFormat("[REGION DB]: Entered StorePrimInventory with prim ID {0}", primID);
-
- DataTable dbItems = ds.Tables["primitems"];
-
- // For now, we're just going to crudely remove all the previous inventory items
- // no matter whether they have changed or not, and replace them with the current set.
+
+ DataTable dbItems = ds.Tables["primitems"];
+
+ // For now, we're just going to crudely remove all the previous inventory items
+ // no matter whether they have changed or not, and replace them with the current set.
lock (ds)
{
RemoveItems(primID);
-
+
// repalce with current inventory details
foreach (TaskInventoryItem newItem in items)
{
// m_log.InfoFormat(
-// "[DATASTORE]: ",
-// "Adding item {0}, {1} to prim ID {2}",
+// "[DATASTORE]: ",
+// "Adding item {0}, {1} to prim ID {2}",
// newItem.Name, newItem.ItemID, newItem.ParentPartID);
-
+
DataRow newItemRow = dbItems.NewRow();
fillItemRow(newItemRow, newItem);
- dbItems.Rows.Add(newItemRow);
+ dbItems.Rows.Add(newItemRow);
}
}
-
+
Commit();
}
@@ -1436,7 +1436,7 @@ namespace OpenSim.Data.SQLite
/// This is a convenience function that collapses 5 repetitive
/// lines for defining SqliteParameters to 2 parameters:
/// column name and database type.
- ///
+ ///
/// It assumes certain conventions like :param as the param
/// name to replace in parametrized queries, and that source
/// version is always current version, both of which are fine
@@ -1451,7 +1451,7 @@ namespace OpenSim.Data.SQLite
param.SourceColumn = name;
param.SourceVersion = DataRowVersion.Current;
return param;
- }
+ }
private void setupPrimCommands(SqliteDataAdapter da, SqliteConnection conn)
{
@@ -1466,7 +1466,7 @@ namespace OpenSim.Data.SQLite
delete.Connection = conn;
da.DeleteCommand = delete;
}
-
+
private void setupItemsCommands(SqliteDataAdapter da, SqliteConnection conn)
{
da.InsertCommand = createInsertCommand("primitems", ds.Tables["primitems"]);
@@ -1479,7 +1479,7 @@ namespace OpenSim.Data.SQLite
delete.Parameters.Add(createSqliteParameter("itemID", typeof (String)));
delete.Connection = conn;
da.DeleteCommand = delete;
- }
+ }
private void setupTerrainCommands(SqliteDataAdapter da, SqliteConnection conn)
{
@@ -1660,7 +1660,7 @@ namespace OpenSim.Data.SQLite
return false;
}
}
-
+
// XXX primitems should probably go here eventually
foreach (DataColumn col in createTerrainTable().Columns)
diff --git a/OpenSim/Data/SQLite/SQLiteUserData.cs b/OpenSim/Data/SQLite/SQLiteUserData.cs
index 8f78e0b..d8b140c 100644
--- a/OpenSim/Data/SQLite/SQLiteUserData.cs
+++ b/OpenSim/Data/SQLite/SQLiteUserData.cs
@@ -58,7 +58,7 @@ namespace OpenSim.Data.SQLite
private const string AvatarPickerAndSQL = "select * from users where username like :username and surname like :surname";
private const string AvatarPickerOrSQL = "select * from users where username like :username or surname like :surname";
-
+
private DataSet ds;
private SqliteDataAdapter da;
private SqliteDataAdapter daf;
@@ -67,16 +67,16 @@ namespace OpenSim.Data.SQLite
override public void Initialise(string connect)
{
// default to something sensible
- if (connect == "")
+ if (connect == "")
connect = "URI=file:userprofiles.db,version=3";
-
+
SqliteConnection conn = new SqliteConnection(connect);
TestTables(conn);
// This sucks, but It doesn't seem to work with the dataset Syncing :P
g_conn = conn;
g_conn.Open();
-
+
ds = new DataSet();
da = new SqliteDataAdapter(new SqliteCommand(userSelect, conn));
daf = new SqliteDataAdapter(new SqliteCommand(userFriendsSelect, conn));
@@ -159,7 +159,7 @@ namespace OpenSim.Data.SQLite
override public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms)
{
string InsertFriends = "insert into userfriends(ownerID, friendID, friendPerms) values(:ownerID, :friendID, :perms)";
-
+
using (SqliteCommand cmd = new SqliteCommand(InsertFriends, g_conn))
{
cmd.Parameters.Add(new SqliteParameter(":ownerID", friendlistowner.UUID.ToString()));
@@ -228,11 +228,11 @@ namespace OpenSim.Data.SQLite
m_log.Error("[USER DB]: Exception getting friends list for user: " + ex.ToString());
}
}
-
+
return returnlist;
}
-
-
+
+
#endregion
@@ -380,9 +380,9 @@ namespace OpenSim.Data.SQLite
else
{
fillUserRow(row, user);
-
+
}
- // This is why we're getting the 'logins never log-off'.. because It isn't clearing the
+ // This is why we're getting the 'logins never log-off'.. because It isn't clearing the
// useragents table once the useragent is null
//
// A database guy should look at this and figure out the best way to clear the useragents table.
@@ -403,7 +403,7 @@ namespace OpenSim.Data.SQLite
}
else
{
- // I just added this to help the standalone login situation.
+ // I just added this to help the standalone login situation.
//It still needs to be looked at by a Database guy
DataTable ua = ds.Tables["useragents"];
row = ua.Rows.Find(Util.ToRawUuidString(user.ID));
@@ -480,7 +480,7 @@ namespace OpenSim.Data.SQLite
/// Appearance
/// TODO: stubs for now to get us to a compiling state gently
- // override public AvatarAppearance GetUserAppearance(LLUUID user)
+ // override public AvatarAppearance GetUserAppearance(LLUUID user)
// {
// return new AvatarAppearance();
// }
@@ -494,17 +494,17 @@ namespace OpenSim.Data.SQLite
{
return;
}
-
+
override public void RemoveAttachment(LLUUID user, LLUUID item)
{
return;
}
-
+
override public List GetAttachments(LLUUID user)
{
return new List();
}
-
+
///
/// Returns the name of the storage provider
///
@@ -525,13 +525,13 @@ namespace OpenSim.Data.SQLite
/***********************************************************************
*
- * DataTable creation
+ * DataTable creation
*
**********************************************************************/
/***********************************************************************
*
* Database Definition Functions
- *
+ *
* This should be db agnostic as we define them in ADO.NET terms
*
**********************************************************************/
@@ -610,7 +610,7 @@ namespace OpenSim.Data.SQLite
}
/***********************************************************************
- *
+ *
* Convert between ADO.NET <=> OpenSim Objects
*
* These should be database independant
diff --git a/OpenSim/Data/SQLite/SQLiteUtils.cs b/OpenSim/Data/SQLite/SQLiteUtils.cs
index 5bb22f7..0862de0 100644
--- a/OpenSim/Data/SQLite/SQLiteUtils.cs
+++ b/OpenSim/Data/SQLite/SQLiteUtils.cs
@@ -39,7 +39,7 @@ namespace OpenSim.Data.SQLite
/***********************************************************************
*
* Database Definition Helper Functions
- *
+ *
* This should be db agnostic as we define them in ADO.NET terms
*
**********************************************************************/
@@ -161,7 +161,7 @@ namespace OpenSim.Data.SQLite
/// This is a convenience function that collapses 5 repetitive
/// lines for defining SqliteParameters to 2 parameters:
/// column name and database type.
- ///
+ ///
/// It assumes certain conventions like :param as the param
/// name to replace in parametrized queries, and that source
/// version is always current version, both of which are fine
diff --git a/OpenSim/Data/UserDataBase.cs b/OpenSim/Data/UserDataBase.cs
index 817ac3e..82cbda4 100644
--- a/OpenSim/Data/UserDataBase.cs
+++ b/OpenSim/Data/UserDataBase.cs
@@ -36,11 +36,11 @@ namespace OpenSim.Data
public abstract class UserDataBase : IUserData
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
-
+
private Dictionary aplist = new Dictionary();
public abstract UserProfileData GetUserByUUID(LLUUID user);
- public abstract UserProfileData GetUserByName(string fname, string lname);
+ public abstract UserProfileData GetUserByName(string fname, string lname);
public abstract UserAgentData GetAgentByUUID(LLUUID user);
public abstract UserAgentData GetAgentByName(string name);
public abstract UserAgentData GetAgentByName(string fname, string lname);
diff --git a/OpenSim/Framework/AssemblyInfo.cs b/OpenSim/Framework/AssemblyInfo.cs
index d43b259..3cd3def 100644
--- a/OpenSim/Framework/AssemblyInfo.cs
+++ b/OpenSim/Framework/AssemblyInfo.cs
@@ -28,7 +28,7 @@
using System.Reflection;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// General information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices;
[assembly : AssemblyTrademark("")]
[assembly : AssemblyCulture("")]
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly : ComVisible(false)]
@@ -54,7 +54,7 @@ using System.Runtime.InteropServices;
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
diff --git a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs
index 945163c..7adcb4a 100644
--- a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs
+++ b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs
@@ -38,7 +38,7 @@ using Nini.Config;
/// Loads assets from the filesystem location. Not yet a plugin, though it should be.
///
namespace OpenSim.Framework.AssetLoader.Filesystem
-{
+{
public class AssetLoaderFileSystem : IAssetLoader
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -63,7 +63,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
return asset;
}
-
+
protected static void LoadAsset(AssetBase info, bool image, string path)
{
FileInfo fInfo = new FileInfo(path);
@@ -77,7 +77,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
info.Data = idata;
//info.loaded=true;
}
-
+
public void ForEachDefaultXmlAsset(Action action)
{
string assetSetFilename = Path.Combine(Util.assetsDir(), "AssetSets.xml");
@@ -91,28 +91,28 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
if (File.Exists(assetSetFilename))
{
string assetSetPath = "ERROR";
-
+
try
{
XmlConfigSource source = new XmlConfigSource(assetSetFilename);
-
+
for (int i = 0; i < source.Configs.Count; i++)
{
assetSetPath = source.Configs[i].GetString("file", String.Empty);
-
+
LoadXmlAssetSet(Path.Combine(Util.assetsDir(), assetSetPath), assets);
}
}
catch (XmlException e)
{
m_log.ErrorFormat("[ASSETS]: Error loading {0} : {1}", assetSetPath, e);
- }
+ }
}
else
{
m_log.Error("[ASSETS]: Asset set control file assets/AssetSets.xml does not exist! No assets loaded.");
}
-
+
assets.ForEach(action);
}
@@ -124,7 +124,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
protected static void LoadXmlAssetSet(string assetSetPath, List assets)
{
m_log.InfoFormat("[ASSETS]: Loading asset set {0}", assetSetPath);
-
+
if (File.Exists(assetSetPath))
{
try
@@ -156,6 +156,6 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
{
m_log.ErrorFormat("[ASSETS]: Asset set file {0} does not exist!", assetSetPath);
}
- }
+ }
}
}
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs
index cf9ff58..365df1a 100644
--- a/OpenSim/Framework/AvatarAppearance.cs
+++ b/OpenSim/Framework/AvatarAppearance.cs
@@ -56,7 +56,7 @@ namespace OpenSim.Framework
public readonly static int SKIRT = 12;
private readonly static int MAX_WEARABLES = 13;
-
+
private static LLUUID BODY_ASSET = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73");
private static LLUUID BODY_ITEM = new LLUUID("66c41e39-38f9-f75a-024e-585989bfaba9");
private static LLUUID SKIN_ASSET = new LLUUID("77c41e39-38f9-f75a-024e-585989bbabbb");
@@ -204,7 +204,7 @@ namespace OpenSim.Framework
set { m_wearables[SKIRT].AssetID = value; }
}
- public void SetDefaultWearables()
+ public void SetDefaultWearables()
{
m_wearables[BODY].AssetID = BODY_ASSET;
m_wearables[BODY].ItemID = BODY_ITEM;
@@ -257,7 +257,7 @@ namespace OpenSim.Framework
}
///
- ///
+ ///
///
///
///
diff --git a/OpenSim/Framework/ClientManager.cs b/OpenSim/Framework/ClientManager.cs
index 2395c99..a70f7fa 100644
--- a/OpenSim/Framework/ClientManager.cs
+++ b/OpenSim/Framework/ClientManager.cs
@@ -72,7 +72,7 @@ namespace OpenSim.Framework
public void Remove(uint id)
{
- //m_log.InfoFormat("[CLIENT]: Removing client with code {0}, current count {1}", id, m_clients.Count);
+ //m_log.InfoFormat("[CLIENT]: Removing client with code {0}, current count {1}", id, m_clients.Count);
lock (m_clients)
{
m_clients.Remove(id);
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs
index 1414260..0669ce9 100644
--- a/OpenSim/Framework/Communications/Cache/AssetCache.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs
@@ -40,12 +40,12 @@ namespace OpenSim.Framework.Communications.Cache
///
/// Manages local cache of assets and their sending to viewers.
- ///
+ ///
/// This class actually encapsulates two largely separate mechanisms. One mechanism fetches assets either
/// synchronously or async and passes the data back to the requester. The second mechanism fetches assets and
/// sends packetised data directly back to the client. The only point where they meet is AssetReceived() and
/// AssetNotFound(), which means they do share the same asset and texture caches.
- ///
+ ///
/// TODO Assets in this cache are effectively immortal (they are never disposed off through old age).
/// This is not a huge problem at the moment since other memory use usually dwarfs that used by assets
/// but it's something to bear in mind.
@@ -281,8 +281,8 @@ namespace OpenSim.Framework.Communications.Cache
///
/// Synchronously retreive an asset. If the asset isn't in the cache, a request will be made to the persistent store to
- /// load it into the cache.
- ///
+ /// load it into the cache.
+ ///
/// XXX We'll keep polling the cache until we get the asset or we exceed
/// the allowed number of polls. This isn't a very good way of doing things since a single thread
/// is processing inbound packets, so if the asset server is slow, we could block this for up to
@@ -431,11 +431,11 @@ namespace OpenSim.Framework.Communications.Cache
//making a copy of the list is not ideal
//but the old method of locking around this whole block of code was causing a multi-thread lock
//between this and the TextureDownloadModule
- //while the localAsset thread running this and trying to send a texture to the callback in the
+ //while the localAsset thread running this and trying to send a texture to the callback in the
//texturedownloadmodule , and hitting a lock in there. While the texturedownload thread (which was holding
- // the lock in the texturedownload module) was trying to
+ // the lock in the texturedownload module) was trying to
//request a new asset and hitting a lock in here on the RequestLists.
-
+
List theseRequests = new List(reqList.Requests);
reqList.Requests.Clear();
@@ -460,7 +460,7 @@ namespace OpenSim.Framework.Communications.Cache
{
// m_log.WarnFormat("[ASSET CACHE]: AssetNotFound for {0}", assetID);
- // Notify requesters for this asset
+ // Notify requesters for this asset
AssetRequestsList reqList = null;
lock (RequestLists)
{
@@ -552,7 +552,7 @@ namespace OpenSim.Framework.Communications.Cache
}
return;
}
- //it is in our cache
+ //it is in our cache
AssetInfo asset = Assets[requestID];
// add to the AssetRequests list
@@ -679,14 +679,14 @@ namespace OpenSim.Framework.Communications.Cache
public byte AssetRequestSource = 2;
public byte[] Params = null;
//public bool AssetInCache;
- //public int TimeRequested;
+ //public int TimeRequested;
public int DiscardLevel = -1;
public AssetRequest()
{
}
}
-
+
public class AssetInfo : AssetBase
{
public AssetInfo()
diff --git a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
index 1a7f872..b16512c 100644
--- a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
@@ -36,7 +36,7 @@ namespace OpenSim.Framework.Communications.Cache
{
public abstract class AssetServerBase : IAssetServer
{
- private static readonly ILog m_log
+ private static readonly ILog m_log
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
protected IAssetReceiver m_receiver;
@@ -47,12 +47,12 @@ namespace OpenSim.Framework.Communications.Cache
// Temporarily hardcoded - should be a plugin
protected IAssetLoader assetLoader = new AssetLoaderFileSystem();
-
+
protected abstract void StoreAsset(AssetBase asset);
protected abstract void CommitAssets();
///
- /// This method must be implemented by a subclass to retrieve the asset named in the
+ /// This method must be implemented by a subclass to retrieve the asset named in the
/// AssetRequest. If the asset is not found, null should be returned.
///
///
@@ -60,7 +60,7 @@ namespace OpenSim.Framework.Communications.Cache
protected abstract AssetBase GetAsset(AssetRequest req);
///
- /// Process an asset request. This method will call GetAsset(AssetRequest req)
+ /// Process an asset request. This method will call GetAsset(AssetRequest req)
/// on the subclass.
///
///
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
index 218fd5a..f40f078 100644
--- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
+++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
@@ -36,55 +36,55 @@ using log4net;
namespace OpenSim.Framework.Communications.Cache
{
internal delegate void AddItemDelegate(InventoryItemBase itemInfo);
- internal delegate void UpdateItemDelegate(InventoryItemBase itemInfo);
+ internal delegate void UpdateItemDelegate(InventoryItemBase itemInfo);
internal delegate void DeleteItemDelegate(LLUUID itemID);
-
+
internal delegate void CreateFolderDelegate(string folderName, LLUUID folderID, ushort folderType, LLUUID parentID);
- internal delegate void MoveFolderDelegate(LLUUID folderID, LLUUID parentID);
+ internal delegate void MoveFolderDelegate(LLUUID folderID, LLUUID parentID);
internal delegate void PurgeFolderDelegate(LLUUID folderID);
internal delegate void UpdateFolderDelegate(string name, LLUUID folderID, ushort type, LLUUID parentID);
-
+
internal delegate void SendInventoryDescendentsDelegate(
IClientAPI client, LLUUID folderID, bool fetchFolders, bool fetchItems);
-
+
///
/// Stores user profile and inventory data received from backend services for a particular user.
///
public class CachedUserInfo
{
- private static readonly ILog m_log
+ private static readonly ILog m_log
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
-
+
///
/// The comms manager holds references to services (user, grid, inventory, etc.)
- ///
+ ///
private readonly CommunicationsManager m_commsManager;
-
+
public UserProfileData UserProfile { get { return m_userProfile; } }
- private readonly UserProfileData m_userProfile;
+ private readonly UserProfileData m_userProfile;
///
/// Has we received the user's inventory from the inventory service?
///
private bool m_hasInventory;
-
+
///
/// Inventory requests waiting for receipt of this user's inventory from the inventory service.
///
- private readonly IList m_pendingRequests = new List();
-
+ private readonly IList m_pendingRequests = new List();
+
///
/// Has this user info object yet received its inventory information from the invetnroy service?
///
public bool HasInventory { get { return m_hasInventory; } }
-
+
private InventoryFolderImpl m_rootFolder;
- public InventoryFolderImpl RootFolder { get { return m_rootFolder; } }
-
+ public InventoryFolderImpl RootFolder { get { return m_rootFolder; } }
+
///
/// FIXME: This could be contained within a local variable - it doesn't need to be a field
///
- private IDictionary> pendingCategorizationFolders
+ private IDictionary> pendingCategorizationFolders
= new Dictionary>();
///
@@ -97,7 +97,7 @@ namespace OpenSim.Framework.Communications.Cache
m_commsManager = commsManager;
m_userProfile = userProfile;
}
-
+
///
/// This allows a request to be added to be processed once we receive a user's inventory
/// from the inventory service. If we already have the inventory, the request
@@ -118,7 +118,7 @@ namespace OpenSim.Framework.Communications.Cache
}
}
}
-
+
///
/// Store a folder pending arrival of its parent
///
@@ -126,7 +126,7 @@ namespace OpenSim.Framework.Communications.Cache
private void AddPendingFolder(InventoryFolderImpl folder)
{
LLUUID parentFolderId = folder.ParentID;
-
+
if (pendingCategorizationFolders.ContainsKey(parentFolderId))
{
pendingCategorizationFolders[parentFolderId].Add(folder);
@@ -135,11 +135,11 @@ namespace OpenSim.Framework.Communications.Cache
{
IList folders = new List();
folders.Add(folder);
-
+
pendingCategorizationFolders[parentFolderId] = folders;
}
}
-
+
///
/// Add any pending folders which were received before the given folder
///
@@ -155,18 +155,18 @@ namespace OpenSim.Framework.Communications.Cache
// m_log.DebugFormat(
// "[INVENTORY CACHE]: Resolving pending received folder {0} {1} into {2} {3}",
// folder.name, folder.folderID, parent.name, parent.folderID);
-
+
lock (newFolder.SubFolders)
{
if (!newFolder.SubFolders.ContainsKey(folder.ID))
{
newFolder.SubFolders.Add(folder.ID, folder);
- }
+ }
}
}
}
}
-
+
///
/// Callback invoked when the inventory is received from an async request to the inventory service
///
@@ -177,12 +177,12 @@ namespace OpenSim.Framework.Communications.Cache
// FIXME: Exceptions thrown upwards never appear on the console. Could fix further up if these
// are simply being swallowed
try
- {
+ {
foreach (InventoryFolderImpl folder in folders)
{
FolderReceive(folder);
}
-
+
foreach (InventoryItemBase item in items)
{
ItemReceive(item);
@@ -191,15 +191,15 @@ namespace OpenSim.Framework.Communications.Cache
catch (Exception e)
{
m_log.ErrorFormat("[INVENTORY CACHE]: Error processing inventory received from inventory service, {0}", e);
- }
-
+ }
+
// Deal with pending requests
lock (m_pendingRequests)
{
// We're going to change inventory status within the lock to avoid a race condition
// where requests are processed after the AddRequest() method has been called.
m_hasInventory = true;
-
+
foreach (IInventoryRequest request in m_pendingRequests)
{
request.Execute();
@@ -215,7 +215,7 @@ namespace OpenSim.Framework.Communications.Cache
private void FolderReceive(InventoryFolderImpl newFolder)
{
// m_log.DebugFormat(
-// "[INVENTORY CACHE]: Received folder {0} {1} for user {2}",
+// "[INVENTORY CACHE]: Received folder {0} {1} for user {2}",
// folderInfo.Name, folderInfo.ID, userID);
if (RootFolder == null)
@@ -232,7 +232,7 @@ namespace OpenSim.Framework.Communications.Cache
else
{
InventoryFolderImpl parentFolder = RootFolder.FindFolder(newFolder.ParentID);
-
+
if (parentFolder != null)
{
lock (parentFolder.SubFolders)
@@ -252,44 +252,44 @@ namespace OpenSim.Framework.Communications.Cache
else
{
AddPendingFolder(newFolder);
- }
+ }
}
-
+
ResolvePendingFolders(newFolder);
}
///
/// Callback invoked when an item is received from an async request to the inventory service.
- ///
+ ///
/// We're assuming here that items are always received after all the folders
/// received.
///
- ///
+ ///
private void ItemReceive(InventoryItemBase itemInfo)
{
// m_log.DebugFormat(
-// "[INVENTORY CACHE]: Received item {0} {1} for user {2}",
+// "[INVENTORY CACHE]: Received item {0} {1} for user {2}",
// itemInfo.Name, itemInfo.ID, userID);
InventoryFolderImpl folder = RootFolder.FindFolder(itemInfo.Folder);
-
+
if (null == folder)
{
m_log.WarnFormat(
- "Received item {0} {1} but its folder {2} does not exist",
+ "Received item {0} {1} but its folder {2} does not exist",
itemInfo.Name, itemInfo.ID, itemInfo.Folder);
-
+
return;
}
-
+
lock (folder.Items)
{
folder.Items[itemInfo.ID] = itemInfo;
}
}
-
+
///
- /// Create a folder in this agent's inventory.
- ///
+ /// Create a folder in this agent's inventory.
+ ///
/// If the inventory service has not yet delievered the inventory
/// for this user then the request will be queued.
///
@@ -299,20 +299,20 @@ namespace OpenSim.Framework.Communications.Cache
{
// m_log.DebugFormat(
// "[AGENT INVENTORY]: Creating inventory folder {0} {1} for {2} {3}", folderID, folderName, remoteClient.Name, remoteClient.AgentId);
-
+
if (HasInventory)
{
InventoryFolderImpl parentFolder = RootFolder.FindFolder(parentID);
-
+
if (null == parentFolder)
{
m_log.WarnFormat(
"[AGENT INVENTORY]: Tried to create folder {0} {1} but the parent {2} does not exist",
folderName, folderID, parentID);
-
+
return false;
}
-
+
InventoryFolderImpl createdFolder = parentFolder.CreateChildFolder(folderID, folderName, folderType);
if (createdFolder != null)
@@ -324,17 +324,17 @@ namespace OpenSim.Framework.Communications.Cache
createdBaseFolder.ParentID = createdFolder.ParentID;
createdBaseFolder.Type = createdFolder.Type;
createdBaseFolder.Version = createdFolder.Version;
-
+
m_commsManager.InventoryService.AddFolder(createdBaseFolder);
-
+
return true;
}
else
{
m_log.WarnFormat(
- "[AGENT INVENTORY]: Tried to create folder {0} {1} but the folder already exists",
+ "[AGENT INVENTORY]: Tried to create folder {0} {1} but the folder already exists",
folderName, folderID);
-
+
return false;
}
}
@@ -344,22 +344,22 @@ namespace OpenSim.Framework.Communications.Cache
new InventoryRequest(
Delegate.CreateDelegate(typeof(CreateFolderDelegate), this, "CreateFolder"),
new object[] { folderName, folderID, folderType, parentID }));
-
+
return true;
- }
+ }
}
-
+
///
/// Handle a client request to update the inventory folder
- ///
+ ///
/// If the inventory service has not yet delievered the inventory
/// for this user then the request will be queued.
- ///
+ ///
/// FIXME: We call add new inventory folder because in the data layer, we happen to use an SQL REPLACE
/// so this will work to rename an existing folder. Needless to say, to rely on this is very confusing,
/// and needs to be changed.
///
- ///
+ ///
///
///
///
@@ -367,7 +367,7 @@ namespace OpenSim.Framework.Communications.Cache
public bool UpdateFolder(string name, LLUUID folderID, ushort type, LLUUID parentID)
{
// m_log.DebugFormat(
-// "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId);
+// "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId);
if (HasInventory)
{
@@ -378,7 +378,7 @@ namespace OpenSim.Framework.Communications.Cache
baseFolder.ParentID = parentID;
baseFolder.Type = (short) type;
baseFolder.Version = RootFolder.Version;
-
+
m_commsManager.InventoryService.AddFolder(baseFolder);
}
else
@@ -387,18 +387,18 @@ namespace OpenSim.Framework.Communications.Cache
new InventoryRequest(
Delegate.CreateDelegate(typeof(UpdateFolderDelegate), this, "UpdateFolder"),
new object[] { name, folderID, type, parentID }));
- }
-
+ }
+
return true;
- }
-
+ }
+
///
/// Handle an inventory folder move request from the client.
- ///
+ ///
/// If the inventory service has not yet delievered the inventory
/// for this user then the request will be queued.
///
- ///
+ ///
///
///
public bool MoveFolder(LLUUID folderID, LLUUID parentID)
@@ -413,9 +413,9 @@ namespace OpenSim.Framework.Communications.Cache
baseFolder.Owner = m_userProfile.ID;
baseFolder.ID = folderID;
baseFolder.ParentID = parentID;
-
+
m_commsManager.InventoryService.MoveFolder(baseFolder);
-
+
return true;
}
else
@@ -424,30 +424,30 @@ namespace OpenSim.Framework.Communications.Cache
new InventoryRequest(
Delegate.CreateDelegate(typeof(MoveFolderDelegate), this, "MoveFolder"),
new object[] { folderID, parentID }));
-
+
return true;
- }
- }
-
+ }
+ }
+
///
/// This method will delete all the items and folders in the given folder.
- ///
+ ///
/// If the inventory service has not yet delievered the inventory
/// for this user then the request will be queued.
///
- ///
+ ///
///
public bool PurgeFolder(LLUUID folderID)
{
-// m_log.InfoFormat("[AGENT INVENTORY]: Purging folder {0} for {1} uuid {2}",
+// m_log.InfoFormat("[AGENT INVENTORY]: Purging folder {0} for {1} uuid {2}",
// folderID, remoteClient.Name, remoteClient.AgentId);
-
+
if (HasInventory)
{
InventoryFolderImpl purgedFolder = RootFolder.FindFolder(folderID);
-
+
if (purgedFolder != null)
- {
+ {
// XXX Nasty - have to create a new object to hold details we already have
InventoryFolderBase purgedBaseFolder = new InventoryFolderBase();
purgedBaseFolder.Owner = purgedFolder.Owner;
@@ -455,12 +455,12 @@ namespace OpenSim.Framework.Communications.Cache
purgedBaseFolder.Name = purgedFolder.Name;
purgedBaseFolder.ParentID = purgedFolder.ParentID;
purgedBaseFolder.Type = purgedFolder.Type;
- purgedBaseFolder.Version = purgedFolder.Version;
-
- m_commsManager.InventoryService.PurgeFolder(purgedBaseFolder);
-
+ purgedBaseFolder.Version = purgedFolder.Version;
+
+ m_commsManager.InventoryService.PurgeFolder(purgedBaseFolder);
+
purgedFolder.Purge();
-
+
return true;
}
}
@@ -470,12 +470,12 @@ namespace OpenSim.Framework.Communications.Cache
new InventoryRequest(
Delegate.CreateDelegate(typeof(PurgeFolderDelegate), this, "PurgeFolder"),
new object[] { folderID }));
-
+
return true;
- }
-
+ }
+
return false;
- }
+ }
///
/// Add an item to the user's inventory
@@ -494,7 +494,7 @@ namespace OpenSim.Framework.Communications.Cache
new InventoryRequest(
Delegate.CreateDelegate(typeof(AddItemDelegate), this, "AddItem"),
new object[] { item }));
- }
+ }
}
///
@@ -514,18 +514,18 @@ namespace OpenSim.Framework.Communications.Cache
new InventoryRequest(
Delegate.CreateDelegate(typeof(UpdateItemDelegate), this, "UpdateItem"),
new object[] { item }));
- }
+ }
}
///
/// Delete an item from the user's inventory
- ///
+ ///
/// If the inventory service has not yet delievered the inventory
/// for this user then the request will be queued.
///
///
///
- /// true on a successful delete or a if the request is queued.
+ /// true on a successful delete or a if the request is queued.
/// Returns false on an immediate failure
///
public bool DeleteItem(LLUUID itemID)
@@ -535,14 +535,14 @@ namespace OpenSim.Framework.Communications.Cache
// XXX For historical reasons (grid comms), we need to retrieve the whole item in order to delete, even though
// really only the item id is required.
InventoryItemBase item = RootFolder.FindItem(itemID);
-
+
if (null == item)
{
m_log.WarnFormat("[AGENT INVENTORY]: Tried to delete item {0} which does not exist", itemID);
-
+
return false;
}
-
+
if (RootFolder.DeleteItem(item.ID))
{
return m_commsManager.InventoryService.DeleteItem(item);
@@ -554,13 +554,13 @@ namespace OpenSim.Framework.Communications.Cache
new InventoryRequest(
Delegate.CreateDelegate(typeof(DeleteItemDelegate), this, "DeleteItem"),
new object[] { itemID }));
-
+
return true;
- }
-
+ }
+
return false;
}
-
+
///
/// Send details of the inventory items and/or folders in a given folder to the client.
///
@@ -574,13 +574,13 @@ namespace OpenSim.Framework.Communications.Cache
if (HasInventory)
{
InventoryFolderImpl folder;
-
+
if ((folder = RootFolder.FindFolder(folderID)) != null)
{
// m_log.DebugFormat(
-// "[AGENT INVENTORY]: Found folder {0} for client {1}",
+// "[AGENT INVENTORY]: Found folder {0} for client {1}",
// folderID, remoteClient.AgentId);
-
+
client.SendInventoryFolderDetails(
client.AgentId, folderID, folder.RequestListOfItems(),
folder.RequestListOfFolders(), fetchFolders, fetchItems);
@@ -592,7 +592,7 @@ namespace OpenSim.Framework.Communications.Cache
m_log.WarnFormat(
"[AGENT INVENTORY]: Could not find folder {0} requested by user {1} {2}",
folderID, client.Name, client.AgentId);
-
+
return false;
}
}
@@ -604,13 +604,13 @@ namespace OpenSim.Framework.Communications.Cache
new object[] { client, folderID, fetchFolders, fetchItems }));
return true;
- }
+ }
}
}
-
+
///
/// Should be implemented by callers which require a callback when the user's inventory is received
- ///
+ ///
public interface IInventoryRequest
{
///
@@ -618,7 +618,7 @@ namespace OpenSim.Framework.Communications.Cache
///
void Execute();
}
-
+
///
/// Generic inventory request
///
@@ -626,16 +626,16 @@ namespace OpenSim.Framework.Communications.Cache
{
private Delegate m_delegate;
private Object[] m_args;
-
+
internal InventoryRequest(Delegate delegat, Object[] args)
{
- m_delegate = delegat;
+ m_delegate = delegat;
m_args = args;
}
-
+
public void Execute()
{
m_delegate.DynamicInvoke(m_args);
}
- }
+ }
}
diff --git a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs
index d5b7fea..4b4ef17 100644
--- a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs
+++ b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs
@@ -95,9 +95,9 @@ namespace OpenSim.Framework.Communications.Cache
// XmlSerializer xs = new XmlSerializer(typeof(AssetBase));
// xs.Serialize(s, asset);
// RestClient rc = new RestClient(_assetServerUrl);
-
- string assetUrl = _assetServerUrl + "/assets/";
-
+
+ string assetUrl = _assetServerUrl + "/assets/";
+
//rc.AddResourcePath("assets");
// rc.RequestMethod = "POST";
@@ -105,7 +105,7 @@ namespace OpenSim.Framework.Communications.Cache
//m_log.InfoFormat("[ASSET]: Stored {0}", rc);
m_log.InfoFormat("[GRID ASSET CLIENT]: Sending store request for asset {0}", asset.FullID);
-
+
RestObjectPoster.BeginPostObject(assetUrl, asset);
}
catch (Exception e)
diff --git a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
index c8cec69..0fbc427 100644
--- a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
+++ b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
@@ -36,7 +36,7 @@ namespace OpenSim.Framework.Communications.Cache
public class InventoryFolderImpl : InventoryFolderBase
{
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
-
+
// Fields
public Dictionary Items = new Dictionary();
public Dictionary SubFolders = new Dictionary();
@@ -82,14 +82,14 @@ namespace OpenSim.Framework.Communications.Cache
subFold.ParentID = this.ID;
subFold.Owner = Owner;
SubFolders.Add(subFold.ID, subFold);
-
+
return subFold;
}
}
-
+
return null;
}
-
+
///
/// Delete all the folders and items in this folder.
///
@@ -97,9 +97,9 @@ namespace OpenSim.Framework.Communications.Cache
{
foreach (InventoryFolderImpl folder in SubFolders.Values)
{
- folder.Purge();
+ folder.Purge();
}
-
+
SubFolders.Clear();
Items.Clear();
}
@@ -118,20 +118,20 @@ namespace OpenSim.Framework.Communications.Cache
return Items[itemID];
}
}
-
+
lock (SubFolders)
{
foreach (InventoryFolderImpl folder in SubFolders.Values)
{
InventoryItemBase item = folder.FindItem(itemID);
-
+
if (item != null)
{
return item;
}
}
}
-
+
return null;
}
@@ -143,7 +143,7 @@ namespace OpenSim.Framework.Communications.Cache
public bool DeleteItem(LLUUID itemID)
{
bool found = false;
-
+
lock (Items)
{
if (Items.ContainsKey(itemID))
@@ -152,20 +152,20 @@ namespace OpenSim.Framework.Communications.Cache
return true;
}
}
-
+
lock (SubFolders)
{
foreach (InventoryFolderImpl folder in SubFolders.Values)
{
found = folder.DeleteItem(itemID);
-
+
if (found == true)
{
break;
}
}
}
-
+
return found;
}
@@ -175,25 +175,25 @@ namespace OpenSim.Framework.Communications.Cache
///
/// The requested folder if it exists, null if it does not.
public InventoryFolderImpl FindFolder(LLUUID folderID)
- {
+ {
if (folderID == ID)
{
return this;
}
-
+
lock (SubFolders)
{
foreach (InventoryFolderImpl folder in SubFolders.Values)
{
InventoryFolderImpl returnFolder = folder.FindFolder(folderID);
-
+
if (returnFolder != null)
{
return returnFolder;
}
}
}
-
+
return null;
}
@@ -203,7 +203,7 @@ namespace OpenSim.Framework.Communications.Cache
public List RequestListOfItems()
{
List itemList = new List();
-
+
lock (Items)
{
foreach (InventoryItemBase item in Items.Values)
@@ -211,9 +211,9 @@ namespace OpenSim.Framework.Communications.Cache
itemList.Add(item);
}
}
-
+
//m_log.DebugFormat("[INVENTORY FOLDER IMPL]: Found {0} items", itemList.Count);
-
+
return itemList;
}
@@ -221,9 +221,9 @@ namespace OpenSim.Framework.Communications.Cache
/// Return the list of immediate child folders in this folder.
///
public List RequestListOfFolders()
- {
+ {
List folderList = new List();
-
+
lock (SubFolders)
{
foreach (InventoryFolderBase folder in SubFolders.Values)
@@ -231,7 +231,7 @@ namespace OpenSim.Framework.Communications.Cache
folderList.Add(folder);
}
}
-
+
return folderList;
}
}
diff --git a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
index b3852c0..ca7eb13 100644
--- a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
+++ b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
@@ -45,34 +45,34 @@ namespace OpenSim.Framework.Communications.Cache
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private LLUUID libOwner = new LLUUID("11111111-1111-0000-0000-000100bba000");
-
+
///
/// Holds the root library folder and all its descendents. This is really only used during inventory
/// setup so that we don't have to repeatedly search the tree of library folders.
///
- protected Dictionary libraryFolders
+ protected Dictionary libraryFolders
= new Dictionary();
public LibraryRootFolder()
{
m_log.Info("[LIBRARY INVENTORY]: Loading library inventory");
-
+
Owner = libOwner;
ID = new LLUUID("00000112-000f-0000-0000-000100bba000");
Name = "OpenSim Library";
ParentID = LLUUID.Zero;
Type = (short) 8;
Version = (ushort) 1;
-
+
libraryFolders.Add(ID, this);
-
+
LoadLibraries(Path.Combine(Util.inventoryDir(), "Libraries.xml"));
// CreateLibraryItems();
}
///
- /// Hardcoded item creation. Please don't add any more items here - future items should be created
+ /// Hardcoded item creation. Please don't add any more items here - future items should be created
/// in the xml in the bin/inventory folder.
///
///
@@ -132,7 +132,7 @@ namespace OpenSim.Framework.Communications.Cache
item.NextPermissions = 0x7FFFFFFF;
return item;
}
-
+
///
/// Use the asset set information at path to load assets
///
@@ -142,49 +142,49 @@ namespace OpenSim.Framework.Communications.Cache
{
m_log.InfoFormat(
"[LIBRARY INVENTORY]: Loading libraries control file {0}", librariesControlPath);
-
+
LoadFromFile(librariesControlPath, "Libraries control", ReadLibraryFromConfig);
}
-
+
///
/// Read a library set from config
///
///
protected void ReadLibraryFromConfig(IConfig config)
{
- string foldersPath
+ string foldersPath
= Path.Combine(
Util.inventoryDir(), config.GetString("foldersFile", String.Empty));
-
+
LoadFromFile(foldersPath, "Library folders", ReadFolderFromConfig);
-
- string itemsPath
+
+ string itemsPath
= Path.Combine(
Util.inventoryDir(), config.GetString("itemsFile", String.Empty));
-
+
LoadFromFile(itemsPath, "Library items", ReadItemFromConfig);
}
-
+
///
/// Read a library inventory folder from a loaded configuration
///
///
private void ReadFolderFromConfig(IConfig config)
- {
+ {
InventoryFolderImpl folderInfo = new InventoryFolderImpl();
-
+
folderInfo.ID = new LLUUID(config.GetString("folderID", ID.ToString()));
- folderInfo.Name = config.GetString("name", "unknown");
+ folderInfo.Name = config.GetString("name", "unknown");
folderInfo.ParentID = new LLUUID(config.GetString("parentFolderID", ID.ToString()));
folderInfo.Type = (short)config.GetInt("type", 8);
-
- folderInfo.Owner = libOwner;
- folderInfo.Version = 1;
-
+
+ folderInfo.Owner = libOwner;
+ folderInfo.Version = 1;
+
if (libraryFolders.ContainsKey(folderInfo.ParentID))
- {
+ {
InventoryFolderImpl parentFolder = libraryFolders[folderInfo.ParentID];
-
+
libraryFolders.Add(folderInfo.ID, folderInfo);
parentFolder.SubFolders.Add(folderInfo.ID, folderInfo);
@@ -201,7 +201,7 @@ namespace OpenSim.Framework.Communications.Cache
///
/// Read a library inventory item metadata from a loaded configuration
///
- ///
+ ///
private void ReadItemFromConfig(IConfig config)
{
InventoryItemBase item = new InventoryItemBase();
@@ -218,11 +218,11 @@ namespace OpenSim.Framework.Communications.Cache
item.NextPermissions = (uint)config.GetLong("nextPermissions", 0x7FFFFFFF);
item.EveryOnePermissions = (uint)config.GetLong("everyonePermissions", 0x7FFFFFFF);
item.BasePermissions = (uint)config.GetLong("basePermissions", 0x7FFFFFFF);
-
+
if (libraryFolders.ContainsKey(item.Folder))
{
InventoryFolderImpl parentFolder = libraryFolders[item.Folder];
-
+
parentFolder.Items.Add(item.ID, item);
}
else
@@ -230,11 +230,11 @@ namespace OpenSim.Framework.Communications.Cache
m_log.WarnFormat(
"[LIBRARY INVENTORY]: Couldn't add item {0} ({1}) since parent folder with ID {2} does not exist!",
item.Name, item.ID, item.Folder);
- }
+ }
}
-
- private delegate void ConfigAction(IConfig config);
-
+
+ private delegate void ConfigAction(IConfig config);
+
///
/// Load the given configuration at a path and perform an action on each Config contained within it
///
@@ -242,7 +242,7 @@ namespace OpenSim.Framework.Communications.Cache
///
///
private static void LoadFromFile(string path, string fileDescription, ConfigAction action)
- {
+ {
if (File.Exists(path))
{
try
@@ -250,21 +250,21 @@ namespace OpenSim.Framework.Communications.Cache
XmlConfigSource source = new XmlConfigSource(path);
for (int i = 0; i < source.Configs.Count; i++)
- {
+ {
action(source.Configs[i]);
}
}
catch (XmlException e)
{
m_log.ErrorFormat("[LIBRARY INVENTORY]: Error loading {0} : {1}", path, e);
- }
+ }
}
else
{
m_log.ErrorFormat("[LIBRARY INVENTORY]: {0} file {1} does not exist!", fileDescription, path);
- }
+ }
}
-
+
///
/// Looks like a simple getter, but is written like this for some consistency with the other Request
/// methods in the superclass
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
index 7f911dc..fe61406 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
@@ -33,7 +33,7 @@ using libsecondlife;
using log4net;
namespace OpenSim.Framework.Communications.Cache
-{
+{
///
/// Holds user profile information and retrieves it from backend services.
///
@@ -45,7 +45,7 @@ namespace OpenSim.Framework.Communications.Cache
/// The comms manager holds references to services (user, grid, inventory, etc.)
///
private readonly CommunicationsManager m_commsManager;
-
+
///
/// Each user has a cached profile.
///
@@ -84,8 +84,8 @@ namespace OpenSim.Framework.Communications.Cache
}
}
}
- }
-
+ }
+
///
/// Remove this user's profile cache.
///
@@ -103,9 +103,9 @@ namespace OpenSim.Framework.Communications.Cache
else
{
m_log.ErrorFormat("[USER CACHE]: Tried to remove the profile of user {0}, but this was not in the scene", userID);
- }
+ }
}
-
+
return false;
}
@@ -118,14 +118,14 @@ namespace OpenSim.Framework.Communications.Cache
{
CachedUserInfo userInfo = GetUserDetails(userID);
if (userInfo != null)
- {
+ {
m_commsManager.InventoryService.RequestInventoryForUser(userID, userInfo.InventoryReceive);
}
else
{
m_log.ErrorFormat("[USER CACHE]: RequestInventoryForUser() - user profile for user {0} not found", userID);
}
- }
+ }
///
/// Get the details of the given user. A caller should try this method first if it isn't sure that
@@ -151,7 +151,7 @@ namespace OpenSim.Framework.Communications.Cache
///
public void HandleCreateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort folderType,
string folderName, LLUUID parentID)
- {
+ {
CachedUserInfo userProfile;
if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile))
@@ -159,21 +159,21 @@ namespace OpenSim.Framework.Communications.Cache
if (!userProfile.CreateFolder(folderName, folderID, folderType, parentID))
{
m_log.ErrorFormat(
- "[AGENT INVENTORY]: Failed to create folder for user {0} {1}",
+ "[AGENT INVENTORY]: Failed to create folder for user {0} {1}",
remoteClient.Name, remoteClient.AgentId);
}
}
else
{
m_log.ErrorFormat(
- "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
+ "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
remoteClient.Name, remoteClient.AgentId);
}
}
///
/// Handle a client request to update the inventory folder
- ///
+ ///
/// FIXME: We call add new inventory folder because in the data layer, we happen to use an SQL REPLACE
/// so this will work to rename an existing folder. Needless to say, to rely on this is very confusing,
/// and needs to be changed.
@@ -188,7 +188,7 @@ namespace OpenSim.Framework.Communications.Cache
{
// m_log.DebugFormat(
// "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId);
-
+
CachedUserInfo userProfile;
if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile))
@@ -196,16 +196,16 @@ namespace OpenSim.Framework.Communications.Cache
if (!userProfile.UpdateFolder(name, folderID, type, parentID))
{
m_log.ErrorFormat(
- "[AGENT INVENTORY]: Failed to update folder for user {0} {1}",
+ "[AGENT INVENTORY]: Failed to update folder for user {0} {1}",
remoteClient.Name, remoteClient.AgentId);
}
}
else
{
m_log.ErrorFormat(
- "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
+ "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
remoteClient.Name, remoteClient.AgentId);
- }
+ }
}
///
@@ -223,16 +223,16 @@ namespace OpenSim.Framework.Communications.Cache
if (!userProfile.MoveFolder(folderID, parentID))
{
m_log.ErrorFormat(
- "[AGENT INVENTORY]: Failed to move folder for user {0} {1}",
+ "[AGENT INVENTORY]: Failed to move folder for user {0} {1}",
remoteClient.Name, remoteClient.AgentId);
}
}
else
{
m_log.ErrorFormat(
- "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
+ "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
remoteClient.Name, remoteClient.AgentId);
- }
+ }
}
///
@@ -267,14 +267,14 @@ namespace OpenSim.Framework.Communications.Cache
else
{
m_log.ErrorFormat(
- "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
+ "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
remoteClient.Name, remoteClient.AgentId);
- }
+ }
}
///
/// Handle the caps inventory descendents fetch.
- ///
+ ///
/// Since the folder structure is sent to the client on login, I believe we only need to handle items.
///
///
@@ -288,20 +288,20 @@ namespace OpenSim.Framework.Communications.Cache
bool fetchFolders, bool fetchItems, int sortOrder)
{
// m_log.DebugFormat(
-// "[INVENTORY CACHE]: Fetching folders ({0}), items ({1}) from {2} for agent {3}",
+// "[INVENTORY CACHE]: Fetching folders ({0}), items ({1}) from {2} for agent {3}",
// fetchFolders, fetchItems, folderID, agentID);
-
+
// FIXME MAYBE: We're not handling sortOrder!
InventoryFolderImpl fold;
if ((fold = libraryRoot.FindFolder(folderID)) != null)
{
return fold.RequestListOfItems();
- }
+ }
CachedUserInfo userProfile;
if (m_userProfiles.TryGetValue(agentID, out userProfile))
- {
+ {
// XXX: When a client crosses into a scene, their entire inventory is fetched
// asynchronously. If the client makes a request before the inventory is received, we need
// to give the inventory a chance to come in.
@@ -315,18 +315,18 @@ namespace OpenSim.Framework.Communications.Cache
while (attempts++ < 30)
{
m_log.DebugFormat(
- "[INVENTORY CACHE]: Poll number {0} for inventory items in folder {1} for user {2}",
+ "[INVENTORY CACHE]: Poll number {0} for inventory items in folder {1} for user {2}",
attempts, folderID, agentID);
-
+
Thread.Sleep(2000);
-
+
if (userProfile.HasInventory)
{
break;
}
}
- }
-
+ }
+
if (userProfile.HasInventory)
{
if ((fold = userProfile.RootFolder.FindFolder(folderID)) != null)
@@ -338,9 +338,9 @@ namespace OpenSim.Framework.Communications.Cache
m_log.WarnFormat(
"[AGENT INVENTORY]: Could not find folder {0} requested by user {1}",
folderID, agentID);
-
+
return null;
- }
+ }
}
else
{
@@ -352,7 +352,7 @@ namespace OpenSim.Framework.Communications.Cache
else
{
m_log.ErrorFormat("[AGENT INVENTORY]: Could not find user profile for {0}", agentID);
-
+
return null;
}
}
@@ -371,16 +371,16 @@ namespace OpenSim.Framework.Communications.Cache
if (!userProfile.PurgeFolder(folderID))
{
m_log.ErrorFormat(
- "[AGENT INVENTORY]: Failed to purge folder for user {0} {1}",
+ "[AGENT INVENTORY]: Failed to purge folder for user {0} {1}",
remoteClient.Name, remoteClient.AgentId);
}
}
else
{
m_log.ErrorFormat(
- "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
+ "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
remoteClient.Name, remoteClient.AgentId);
- }
+ }
}
public void HandleFetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID)
@@ -407,9 +407,9 @@ namespace OpenSim.Framework.Communications.Cache
else
{
m_log.ErrorFormat(
- "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
+ "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
remoteClient.Name, remoteClient.AgentId);
- }
+ }
}
}
}
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs
index 705f369..dac2f34 100644
--- a/OpenSim/Framework/Communications/Capabilities/Caps.cs
+++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs
@@ -64,16 +64,16 @@ namespace OpenSim.Framework.Communications.Capabilities
public class Caps
{
- private static readonly ILog m_log =
+ private static readonly ILog m_log =
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
-
+
private string m_httpListenerHostName;
private uint m_httpListenPort;
-
+
///
/// This is the uuid portion of every CAPS path. It is used to make capability urls private to the requester.
///
- private string m_capsObjectPath;
+ private string m_capsObjectPath;
public string CapsObjectPath { get { return m_capsObjectPath; } }
private CapsHandlers m_capsHandlers;
@@ -88,7 +88,7 @@ namespace OpenSim.Framework.Communications.Capabilities
// The following two entries are in a module, however, there also here so that we don't re-assign
// the path to another cap by mistake.
- private static readonly string m_parcelVoiceInfoRequestPath = "0007/"; // This is in a module.
+ private static readonly string m_parcelVoiceInfoRequestPath = "0007/"; // This is in a module.
private static readonly string m_provisionVoiceAccountRequestPath = "0008/";// This is in a module.
//private string eventQueue = "0100/";
@@ -100,7 +100,7 @@ namespace OpenSim.Framework.Communications.Capabilities
private bool m_dumpAssetsToFile;
private string m_regionName;
- // These are callbacks which will be setup by the scene so that we can update scene data when we
+ // These are callbacks which will be setup by the scene so that we can update scene data when we
// receive capability calls
public NewInventoryItem AddNewInventoryItem = null;
public ItemUpdatedCallback ItemUpdatedCall = null;
@@ -128,46 +128,46 @@ namespace OpenSim.Framework.Communications.Capabilities
public void RegisterHandlers()
{
DeregisterHandlers();
-
- string capsBase = "/CAPS/" + m_capsObjectPath;
-
+
+ string capsBase = "/CAPS/" + m_capsObjectPath;
+
try
{
// the root of all evil
m_capsHandlers["SEED"] = new RestStreamHandler("POST", capsBase + m_requestPath, CapsRequest);
- m_capsHandlers["MapLayer"] =
- new LLSDStreamhandler("POST",
- capsBase + m_mapLayerPath,
+ m_capsHandlers["MapLayer"] =
+ new LLSDStreamhandler("POST",
+ capsBase + m_mapLayerPath,
GetMapLayer);
- m_capsHandlers["NewFileAgentInventory"] =
+ m_capsHandlers["NewFileAgentInventory"] =
new LLSDStreamhandler("POST",
capsBase + m_newInventory,
NewAgentInventoryRequest);
- m_capsHandlers["UpdateNotecardAgentInventory"] =
+ m_capsHandlers["UpdateNotecardAgentInventory"] =
new RestStreamHandler("POST", capsBase + m_notecardUpdatePath, NoteCardAgentInventory);
m_capsHandlers["UpdateScriptAgentInventory"] = m_capsHandlers["UpdateNotecardAgentInventory"];
- m_capsHandlers["UpdateScriptTaskInventory"] =
+ m_capsHandlers["UpdateScriptTaskInventory"] =
new RestStreamHandler("POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory);
-
- // justincc: I've disabled the CAPS service for now to fix problems with selecting textures, and
- // subsequent inventory breakage, in the edit object pane (such as mantis 1085). This requires
- // enhancements (probably filling out the folder part of the LLSD reply) to our CAPS service,
- // but when I went on the Linden grid, the
+
+ // justincc: I've disabled the CAPS service for now to fix problems with selecting textures, and
+ // subsequent inventory breakage, in the edit object pane (such as mantis 1085). This requires
+ // enhancements (probably filling out the folder part of the LLSD reply) to our CAPS service,
+ // but when I went on the Linden grid, the
// simulators I visited (version 1.21) were, surprisingly, no longer supplying this capability. Instead,
// the 1.19.1.4 client appeared to be happily flowing inventory data over UDP
//
- // This is very probably just a temporary measure - once the CAPS service appears again on the Linden grid
- // we will be
+ // This is very probably just a temporary measure - once the CAPS service appears again on the Linden grid
+ // we will be
// able to get the data we need to implement the necessary part of the protocol to fix the issue above.
-// m_capsHandlers["FetchInventoryDescendents"] =
+// m_capsHandlers["FetchInventoryDescendents"] =
// new RestStreamHandler("POST", capsBase + m_fetchInventoryPath, FetchInventoryRequest);
-
- // m_capsHandlers["FetchInventoryDescendents"] =
+
+ // m_capsHandlers["FetchInventoryDescendents"] =
// new LLSDStreamhandler("POST",
// capsBase + m_fetchInventory,
// FetchInventory));
// m_capsHandlers["RequestTextureDownload"] = new RestStreamHandler("POST",
- // capsBase + m_requestTexture,
+ // capsBase + m_requestTexture,
// RequestTexture);
}
catch (Exception e)
@@ -181,7 +181,7 @@ namespace OpenSim.Framework.Communications.Capabilities
///
///
///
- public void RegisterHandler(string capName, IRequestHandler handler)
+ public void RegisterHandler(string capName, IRequestHandler handler)
{
m_capsHandlers[capName] = handler;
m_log.DebugFormat("[CAPS]: Registering handler for \"{0}\": path {1}", capName, handler.Path);
@@ -189,14 +189,14 @@ namespace OpenSim.Framework.Communications.Capabilities
///
/// Remove all CAPS service handlers.
- ///
+ ///
///
///
///
///
public void DeregisterHandlers()
{
- foreach (string capsName in m_capsHandlers.Caps)
+ foreach (string capsName in m_capsHandlers.Caps)
{
m_capsHandlers.Remove(capsName);
}
@@ -220,7 +220,7 @@ namespace OpenSim.Framework.Communications.Capabilities
// FIXME: these all should probably go into the respective region
// modules
-
+
///
/// Processes a fetch inventory request and sends the reply
@@ -229,7 +229,7 @@ namespace OpenSim.Framework.Communications.Capabilities
///
///
///
- // Request is like:
+ // Request is like:
//
//
//
//
- // multiple fetch-folder maps are allowed within the larger folders map.
+ // multiple fetch-folder maps are allowed within the larger folders map.
public string FetchInventoryRequest(string request, string path, string param)
{
string unmodifiedRequest = request.ToString();
-
+
//m_log.DebugFormat("[AGENT INVENTORY]: Received CAPS fetch inventory request {0}", unmodifiedRequest);
m_log.Debug("[CAPS]: Inventory Request in region: " + m_regionName);
-
+
Hashtable hash = new Hashtable();
try
{
@@ -258,7 +258,7 @@ namespace OpenSim.Framework.Communications.Capabilities
m_log.Error("[AGENT INVENTORY]: Fetch error: " + pe.Message);
m_log.Error("Request: " + request.ToString());
}
-
+
ArrayList foldersrequested = (ArrayList)hash["folders"];
string response = "";
@@ -275,15 +275,15 @@ namespace OpenSim.Framework.Communications.Capabilities
inventoryitemstr = LLSDHelpers.SerialiseLLSDReply(reply);
inventoryitemstr = inventoryitemstr.Replace("", "");
-
+
response += inventoryitemstr;
}
-
+
if (response.Length == 0)
{
// Ter-guess: If requests fail a lot, the client seems to stop requesting descendants.
// Therefore, I'm concluding that the client only has so many threads available to do requests
- // and when a thread stalls.. is stays stalled.
+ // and when a thread stalls.. is stays stalled.
// Therefore we need to return something valid
response = "";
}
@@ -291,7 +291,7 @@ namespace OpenSim.Framework.Communications.Capabilities
{
response = "";
}
-
+
//m_log.DebugFormat("[AGENT INVENTORY]: Replying to CAPS fetch inventory request with following xml");
//m_log.Debug(Util.GetFormattedXml(response));
@@ -310,7 +310,7 @@ namespace OpenSim.Framework.Communications.Capabilities
contents.agent___id = m_agentID;
contents.owner___id = invFetch.owner_id;
contents.folder___id = invFetch.folder_id;
-
+
// The version number being sent back was originally 1.
// Unfortunately, on 1.19.1.4, this means that we see a problem where on subsequent logins
// without clearing client cache, objects in the root folder disappear until the cache is cleared,
@@ -318,8 +318,8 @@ namespace OpenSim.Framework.Communications.Capabilities
//
// Seeing the version to something other than 0 may be the right thing to do, but there is
// a greater subtlety of the second life protocol that needs to be understood first.
- contents.version = 0;
-
+ contents.version = 0;
+
contents.descendents = 0;
reply.folders.Array.Add(contents);
List itemList = null;
@@ -327,7 +327,7 @@ namespace OpenSim.Framework.Communications.Capabilities
{
itemList = CAPSFetchInventoryDescendents(m_agentID, invFetch.folder_id, invFetch.owner_id, invFetch.fetch_folders, invFetch.fetch_items, invFetch.sort_order);
}
-
+
if (itemList != null)
{
foreach (InventoryItemBase invItem in itemList)
@@ -336,12 +336,12 @@ namespace OpenSim.Framework.Communications.Capabilities
}
}
else
- {
+ {
IClientAPI client = GetClient(m_agentID);
-
- // We're going to both notify the client of inventory service failure and send back a 'no folder contents' response.
+
+ // We're going to both notify the client of inventory service failure and send back a 'no folder contents' response.
// If we don't send back the response,
- // the client becomes unhappy (see Teravus' comment in FetchInventoryRequest())
+ // the client becomes unhappy (see Teravus' comment in FetchInventoryRequest())
if (client != null)
{
client.SendAgentAlertMessage(
@@ -351,11 +351,11 @@ namespace OpenSim.Framework.Communications.Capabilities
else
{
m_log.ErrorFormat(
- "[AGENT INVENTORY]: Could not lookup controlling client for {0} in order to notify them of the inventory service failure",
+ "[AGENT INVENTORY]: Could not lookup controlling client for {0} in order to notify them of the inventory service failure",
m_agentID);
}
}
-
+
contents.descendents = contents.items.Array.Count;
return reply;
}
@@ -375,7 +375,7 @@ namespace OpenSim.Framework.Communications.Capabilities
llsdItem.item_id = invItem.ID;
llsdItem.name = invItem.Name;
llsdItem.parent_id = invItem.Folder;
- llsdItem.type = Enum.GetName(typeof(AssetType), invItem.AssetType).ToLower();
+ llsdItem.type = Enum.GetName(typeof(AssetType), invItem.AssetType).ToLower();
llsdItem.inv_type = Enum.GetName(typeof(InventoryType), invItem.InvType).ToLower();
llsdItem.permissions = new LLSDPermissions();
llsdItem.permissions.creator_id = invItem.Creator;
@@ -395,7 +395,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -408,7 +408,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
protected static LLSDMapLayer GetLLSDMapLayerResponse()
@@ -421,7 +421,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -437,7 +437,7 @@ namespace OpenSim.Framework.Communications.Capabilities
#region EventQueue (Currently not enabled)
///
- ///
+ ///
///
///
///
@@ -463,7 +463,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -482,7 +482,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
public string CreateEmptyEventResponse()
@@ -590,7 +590,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -622,7 +622,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -708,7 +708,7 @@ namespace OpenSim.Framework.Communications.Capabilities
/// Item to update
/// Prim containing item to update
/// Signals whether the script to update is currently running
- /// New asset data
+ /// New asset data
public void TaskScriptUpdated(LLUUID itemID, LLUUID primID, bool isScriptRunning, byte[] data)
{
if (TaskScriptUpdatedCall != null)
@@ -751,7 +751,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -807,7 +807,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- /// This class is a callback invoked when a client sends asset data to
+ /// This class is a callback invoked when a client sends asset data to
/// an agent inventory notecard update url
///
public class ItemUpdater
@@ -831,7 +831,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -889,7 +889,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- /// This class is a callback invoked when a client sends asset data to
+ /// This class is a callback invoked when a client sends asset data to
/// a task inventory script update url
///
public class TaskInventoryScriptUpdater
@@ -921,7 +921,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -931,7 +931,7 @@ namespace OpenSim.Framework.Communications.Capabilities
{
try
{
-// m_log.InfoFormat("[CAPS]: " +
+// m_log.InfoFormat("[CAPS]: " +
// "TaskInventoryScriptUpdater received data: {0}, path: {1}, param: {2}",
// data, path, param));
diff --git a/OpenSim/Framework/Communications/Capabilities/CapsHandlers.cs b/OpenSim/Framework/Communications/Capabilities/CapsHandlers.cs
index e76a5c5..4a3d00f 100644
--- a/OpenSim/Framework/Communications/Capabilities/CapsHandlers.cs
+++ b/OpenSim/Framework/Communications/Capabilities/CapsHandlers.cs
@@ -64,14 +64,14 @@ namespace OpenSim.Framework.Communications.Capabilities
///
/// name of the capability of the cap
/// handler to be removed
- public void Remove(string capsName)
+ public void Remove(string capsName)
{
// This line must be here, or caps will break!
m_httpListener.RemoveStreamHandler("POST", m_capsHandlers[capsName].Path);
m_capsHandlers.Remove(capsName);
}
- public bool ContainsCap(string cap)
+ public bool ContainsCap(string cap)
{
return m_capsHandlers.ContainsKey(cap);
}
@@ -85,14 +85,14 @@ namespace OpenSim.Framework.Communications.Capabilities
/// retrieve a cap handler for a cap that is not contained in
/// CapsHandlers.
///
- public IRequestHandler this[string idx]
+ public IRequestHandler this[string idx]
{
- get
+ get
{
return m_capsHandlers[idx];
}
- set
+ set
{
if (m_capsHandlers.ContainsKey(idx))
{
@@ -111,9 +111,9 @@ namespace OpenSim.Framework.Communications.Capabilities
/// Return the list of cap names for which this CapsHandlers
/// object contains cap handlers.
///
- public string[] Caps
+ public string[] Caps
{
- get
+ get
{
string[] __keys = new string[m_capsHandlers.Keys.Count];
m_capsHandlers.Keys.CopyTo(__keys, 0);
@@ -125,7 +125,7 @@ namespace OpenSim.Framework.Communications.Capabilities
/// Return an LLSD-serializable Hashtable describing the
/// capabilities and their handler details.
///
- public Hashtable CapsDetails
+ public Hashtable CapsDetails
{
get
{
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSD.cs b/OpenSim/Framework/Communications/Capabilities/LLSD.cs
index e869267..bcf7a88 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSD.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSD.cs
@@ -37,12 +37,12 @@ using libsecondlife;
namespace OpenSim.Framework.Communications.Capabilities
{
///
- /// Borrowed from (a older version of) libsl for now, as their new llsd code doesn't work we our decoding code.
+ /// Borrowed from (a older version of) libsl for now, as their new llsd code doesn't work we our decoding code.
///
public static class LLSD
{
///
- ///
+ ///
///
public class LLSDParseException : Exception
{
@@ -52,7 +52,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
public class LLSDSerializeException : Exception
{
@@ -62,7 +62,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -72,7 +72,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -96,7 +96,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -116,7 +116,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -217,7 +217,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -360,7 +360,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -405,7 +405,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -441,7 +441,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -453,7 +453,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -661,7 +661,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
private static void SkipWS(XmlTextReader reader)
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs b/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs
index 409d2e0..507f12b 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs
@@ -35,9 +35,9 @@ namespace OpenSim.Framework.Communications.Capabilities
{
public class LLSDHelpers
{
-// private static readonly log4net.ILog m_log
+// private static readonly log4net.ILog m_log
// = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
-
+
public static string SerialiseLLSDReply(object obj)
{
StringWriter sw = new StringWriter();
@@ -47,9 +47,9 @@ namespace OpenSim.Framework.Communications.Capabilities
SerializeLLSDType(writer, obj);
writer.WriteEndElement();
writer.Close();
-
+
//m_log.DebugFormat("[LLSD Helpers]: Generated serialized LLSD reply {0}", sw.ToString());
-
+
return sw.ToString();
}
@@ -146,7 +146,7 @@ namespace OpenSim.Framework.Communications.Capabilities
fieldValue.GetType().GetField("Array").SetValue(fieldValue, enumerator.Value);
//TODO
// the LLSD map/array types in the array need to be deserialised
- // but first we need to know the right class to deserialise them into.
+ // but first we need to know the right class to deserialise them into.
}
else
{
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDInventoryItem.cs b/OpenSim/Framework/Communications/Capabilities/LLSDInventoryItem.cs
index 31896c2..1a75aba 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDInventoryItem.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDInventoryItem.cs
@@ -91,7 +91,7 @@ namespace OpenSim.Framework.Communications.Capabilities
public int descendents;
public LLUUID folder___id; //as LL can't decide if they are going to use "_" or "-" to separate words in the field names
public LLSDArray items = new LLSDArray();
- public LLUUID owner___id; // and of course we can't have field names with "-" in
+ public LLUUID owner___id; // and of course we can't have field names with "-" in
public int version;
}
}
\ No newline at end of file
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDParcelVoiceInfoResponse.cs b/OpenSim/Framework/Communications/Capabilities/LLSDParcelVoiceInfoResponse.cs
index fb5eaa8..c045dcf 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDParcelVoiceInfoResponse.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDParcelVoiceInfoResponse.cs
@@ -23,7 +23,7 @@
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
+*
*/
using System.Collections;
@@ -41,7 +41,7 @@ namespace OpenSim.Framework.Communications.Capabilities
{
}
- public LLSDParcelVoiceInfoResponse(string region, int localID, Hashtable creds)
+ public LLSDParcelVoiceInfoResponse(string region, int localID, Hashtable creds)
{
region_name = region;
parcel_local_id = localID;
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs b/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs
index 5e8a08f..8683cea 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Framework.Communications.Capabilities
//string requestBody = streamReader.ReadToEnd();
//streamReader.Close();
- // libsecondlife.StructuredData.LLSDMap hash = (libsecondlife.StructuredData.LLSDMap)
+ // libsecondlife.StructuredData.LLSDMap hash = (libsecondlife.StructuredData.LLSDMap)
// libsecondlife.StructuredData.LLSDParser.DeserializeXml(new XmlTextReader(request));
Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(request);
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.cs b/OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.cs
index ee9ff1b..8bfd20c 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.cs
@@ -34,7 +34,7 @@ namespace OpenSim.Framework.Communications.Capabilities
{
///
/// The task inventory item that was updated
- ///
+ ///
public LLUUID item_id;
///
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.cs b/OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.cs
index df32d1a..e45d9de 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.cs
@@ -34,17 +34,17 @@ namespace OpenSim.Framework.Communications.Capabilities
{
///
/// The item containing the script to update
- ///
+ ///
public LLUUID item_id;
///
/// The task containing the script
- ///
+ ///
public LLUUID task_id;
///
/// Signals whether the script is currently active
- ///
+ ///
public int is_script_running;
}
}
\ No newline at end of file
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDVoiceAccountResponse.cs b/OpenSim/Framework/Communications/Capabilities/LLSDVoiceAccountResponse.cs
index 67064b0..8143233 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDVoiceAccountResponse.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDVoiceAccountResponse.cs
@@ -23,7 +23,7 @@
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
+*
*/
namespace OpenSim.Framework.Communications.Capabilities
@@ -38,7 +38,7 @@ namespace OpenSim.Framework.Communications.Capabilities
{
}
- public LLSDVoiceAccountResponse(string user, string pass)
+ public LLSDVoiceAccountResponse(string user, string pass)
{
username = user;
password = pass;
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs
index 2813aa0..37020f6 100644
--- a/OpenSim/Framework/Communications/CommunicationsManager.cs
+++ b/OpenSim/Framework/Communications/CommunicationsManager.cs
@@ -236,7 +236,7 @@ namespace OpenSim.Framework.Communications
public void UpdateAvatarPropertiesRequest(IClientAPI remote_client, UserProfileData UserProfile)
{
- m_userService.UpdateUserProfileProperties(UserProfile);
+ m_userService.UpdateUserProfileProperties(UserProfile);
return;
}
diff --git a/OpenSim/Framework/Communications/GenericAsyncResult.cs b/OpenSim/Framework/Communications/GenericAsyncResult.cs
index 6c5f5f7..48f72a0 100644
--- a/OpenSim/Framework/Communications/GenericAsyncResult.cs
+++ b/OpenSim/Framework/Communications/GenericAsyncResult.cs
@@ -112,7 +112,7 @@ namespace OpenSim.Framework.Communications
public void EndInvoke()
{
- // This method assumes that only 1 thread calls EndInvoke
+ // This method assumes that only 1 thread calls EndInvoke
if (!IsCompleted)
{
// If the operation isn't done, wait for it
@@ -142,7 +142,7 @@ namespace OpenSim.Framework.Communications
// Save the asynchronous operation's result
m_result = result;
- // Tell the base class that the operation completed
+ // Tell the base class that the operation completed
// sucessfully (no exception)
base.SetAsCompleted(completedSynchronously);
}
diff --git a/OpenSim/Framework/Communications/IInventoryServices.cs b/OpenSim/Framework/Communications/IInventoryServices.cs
index c8a3c85..f7a8857 100644
--- a/OpenSim/Framework/Communications/IInventoryServices.cs
+++ b/OpenSim/Framework/Communications/IInventoryServices.cs
@@ -43,62 +43,62 @@ namespace OpenSim.Framework.Communications
public interface IInventoryServices
{
///
- /// Request the inventory for a user. This is an asynchronous operation that will call the callback when the
+ /// Request the inventory for a user. This is an asynchronous operation that will call the callback when the
/// inventory has been received
///
///
///
void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback);
-
+
///
/// Add a new folder to the user's inventory
///
///
/// true if the folder was successfully added
bool AddFolder(InventoryFolderBase folder);
-
+
///
/// Move an inventory folder to a new location
///
/// A folder containing the details of the new location
/// true if the folder was successfully moved
bool MoveFolder(InventoryFolderBase folder);
-
+
///
/// Purge an inventory folder of all its items and subfolders.
///
///
/// true if the folder was successfully purged
bool PurgeFolder(InventoryFolderBase folder);
-
+
///
/// Add a new item to the user's inventory
///
///
/// true if the item was successfully added
bool AddItem(InventoryItemBase item);
-
+
///
/// Update an item in the user's inventory
///
///
/// true if the item was successfully updated
bool UpdateItem(InventoryItemBase item);
-
+
///
/// Delete an item from the user's inventory
///
///
/// true if the item was successfully deleted
bool DeleteItem(InventoryItemBase item);
-
+
///
/// Create a new inventory for the given user.
///
///
/// true if the inventory was successfully created, false otherwise
bool CreateNewUserInventory(LLUUID user);
-
+
bool HasInventoryForUser(LLUUID userID);
///
@@ -107,12 +107,12 @@ namespace OpenSim.Framework.Communications
///
/// null if no root folder was found
InventoryFolderBase RequestRootFolder(LLUUID userID);
-
+
///
/// Returns a list of all the folders in a given user's inventory.
///
///
- /// A flat list of the user's inventory folder tree,
+ /// A flat list of the user's inventory folder tree,
/// null if there is no inventory for this user
List GetInventorySkeleton(LLUUID userId);
}
diff --git a/OpenSim/Framework/Communications/IUserService.cs b/OpenSim/Framework/Communications/IUserService.cs
index 7d71d02..67a8c78 100644
--- a/OpenSim/Framework/Communications/IUserService.cs
+++ b/OpenSim/Framework/Communications/IUserService.cs
@@ -37,7 +37,7 @@ namespace OpenSim.Framework.Communications
///
/// First name
/// Last name
- /// A user profile. Returns null if no profile is found
+ /// A user profile. Returns null if no profile is found
UserProfileData GetUserProfile(string firstName, string lastName);
//UserProfileData GetUserProfile(string name);
@@ -46,7 +46,7 @@ namespace OpenSim.Framework.Communications
/// Loads a user profile from a database by UUID
///
/// The target UUID
- /// A user profile. Returns null if no user profile is found.
+ /// A user profile. Returns null if no user profile is found.
UserProfileData GetUserProfile(LLUUID userId);
void clearUserAgent(LLUUID avatarID);
@@ -57,7 +57,7 @@ namespace OpenSim.Framework.Communications
UserProfileData SetupMasterUser(LLUUID userId);
///
- ///
+ ///
///
///
LLUUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY);
@@ -110,7 +110,7 @@ namespace OpenSim.Framework.Communications
List GetUserFriendList(LLUUID friendlistowner);
///
- /// Get's the User Appearance
+ /// Get's the User Appearance
AvatarAppearance GetUserAppearance(LLUUID user);
void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance);
diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs
index e81d8c4..dffeed3 100644
--- a/OpenSim/Framework/Communications/InventoryServiceBase.cs
+++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs
@@ -40,13 +40,13 @@ namespace OpenSim.Framework.Communications
///
public abstract class InventoryServiceBase : IInventoryServices
{
- private static readonly ILog m_log
+ private static readonly ILog m_log
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
protected Dictionary m_plugins = new Dictionary();
#region Plugin methods
-
+
///
/// Adds a new user server plugin - plugins will be requested in the order they were loaded.
///
@@ -76,42 +76,42 @@ namespace OpenSim.Framework.Communications
}
}
}
-
+
#endregion
-
- #region IInventoryServices methods
-
+
+ #region IInventoryServices methods
+
// See IInventoryServices
public List GetInventorySkeleton(LLUUID userId)
{
// m_log.DebugFormat("[AGENT INVENTORY]: Getting inventory skeleton for {0}", userId);
-
+
InventoryFolderBase rootFolder = RequestRootFolder(userId);
-
+
// Agent has no inventory structure yet.
if (null == rootFolder)
{
- return null;
- }
-
- List userFolders = new List();
-
+ return null;
+ }
+
+ List userFolders = new List();
+
userFolders.Add(rootFolder);
-
+
foreach (KeyValuePair plugin in m_plugins)
{
IList folders = plugin.Value.getFolderHierarchy(rootFolder.ID);
userFolders.AddRange(folders);
- }
-
+ }
+
// foreach (InventoryFolderBase folder in userFolders)
// {
// m_log.DebugFormat("[AGENT INVENTORY]: Got folder {0} {1}", folder.name, folder.folderID);
// }
-
+
return userFolders;
}
-
+
// See IInventoryServices
public virtual bool HasInventoryForUser(LLUUID userID)
{
@@ -133,31 +133,31 @@ namespace OpenSim.Framework.Communications
public bool CreateNewUserInventory(LLUUID user)
{
InventoryFolderBase existingRootFolder = RequestRootFolder(user);
-
+
if (null != existingRootFolder)
{
m_log.WarnFormat(
"[AGENT INVENTORY]: Did not create a new inventory for user {0} since they already have "
- + "a root inventory folder with id {1}",
+ + "a root inventory folder with id {1}",
user, existingRootFolder.ID);
}
else
- {
+ {
UsersInventory inven = new UsersInventory();
inven.CreateNewInventorySet(user);
AddNewInventorySet(inven);
-
+
return true;
}
-
+
return false;
- }
-
+ }
+
// See IInventoryServices
- public abstract void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback);
-
+ public abstract void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback);
+
#endregion
-
+
#region Methods used by GridInventoryService
public List RequestSubFolders(LLUUID parentFolderID)
@@ -180,21 +180,21 @@ namespace OpenSim.Framework.Communications
}
return itemsList;
}
-
+
#endregion
// See IInventoryServices
public bool AddFolder(InventoryFolderBase folder)
{
m_log.DebugFormat(
- "[AGENT INVENTORY]: Adding folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID);
-
+ "[AGENT INVENTORY]: Adding folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID);
+
foreach (KeyValuePair plugin in m_plugins)
{
plugin.Value.addInventoryFolder(folder);
}
-
- // FIXME: Should return false on failure
+
+ // FIXME: Should return false on failure
return true;
}
@@ -203,14 +203,14 @@ namespace OpenSim.Framework.Communications
{
m_log.DebugFormat(
"[AGENT INVENTORY]: Moving folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID);
-
+
foreach (KeyValuePair plugin in m_plugins)
{
plugin.Value.moveInventoryFolder(folder);
}
-
- // FIXME: Should return false on failure
- return true;
+
+ // FIXME: Should return false on failure
+ return true;
}
// See IInventoryServices
@@ -218,14 +218,14 @@ namespace OpenSim.Framework.Communications
{
m_log.DebugFormat(
"[AGENT INVENTORY]: Adding item {0} {1} to folder {2}", item.Name, item.ID, item.Folder);
-
+
foreach (KeyValuePair plugin in m_plugins)
{
plugin.Value.addInventoryItem(item);
}
-
- // FIXME: Should return false on failure
- return true;
+
+ // FIXME: Should return false on failure
+ return true;
}
// See IInventoryServices
@@ -233,14 +233,14 @@ namespace OpenSim.Framework.Communications
{
m_log.InfoFormat(
"[AGENT INVENTORY]: Updating item {0} {1} in folder {2}", item.Name, item.ID, item.Folder);
-
+
foreach (KeyValuePair plugin in m_plugins)
{
plugin.Value.updateInventoryItem(item);
}
-
- // FIXME: Should return false on failure
- return true;
+
+ // FIXME: Should return false on failure
+ return true;
}
// See IInventoryServices
@@ -248,19 +248,19 @@ namespace OpenSim.Framework.Communications
{
m_log.InfoFormat(
"[AGENT INVENTORY]: Deleting item {0} {1} from folder {2}", item.Name, item.ID, item.Folder);
-
+
foreach (KeyValuePair plugin in m_plugins)
{
plugin.Value.deleteInventoryItem(item.ID);
}
-
- // FIXME: Should return false on failure
- return true;
+
+ // FIXME: Should return false on failure
+ return true;
}
-
+
///
/// Purge a folder of all items items and subfolders.
- ///
+ ///
/// FIXME: Really nasty in a sense, because we have to query the database to get information we may
/// already know... Needs heavy refactoring.
///
@@ -269,13 +269,13 @@ namespace OpenSim.Framework.Communications
{
m_log.DebugFormat(
"[AGENT INVENTORY]: Purging folder {0} {1} of its contents", folder.Name, folder.ID);
-
+
List subFolders = RequestSubFolders(folder.ID);
-
+
foreach (InventoryFolderBase subFolder in subFolders)
{
// m_log.DebugFormat("[AGENT INVENTORY]: Deleting folder {0} {1}", subFolder.Name, subFolder.ID);
-
+
foreach (KeyValuePair plugin in m_plugins)
{
plugin.Value.deleteInventoryFolder(subFolder.ID);
@@ -288,17 +288,17 @@ namespace OpenSim.Framework.Communications
{
DeleteItem(item);
}
-
- // FIXME: Should return false on failure
- return true;
+
+ // FIXME: Should return false on failure
+ return true;
}
-
+
private void AddNewInventorySet(UsersInventory inventory)
{
foreach (InventoryFolderBase folder in inventory.Folders.Values)
{
AddFolder(folder);
- }
+ }
}
///
@@ -340,7 +340,7 @@ namespace OpenSim.Framework.Communications
folder.Type = (short)AssetType.Bodypart;
folder.Version = 1;
Folders.Add(folder.ID, folder);
-
+
folder = new InventoryFolderBase();
folder.ParentID = rootFolder;
folder.Owner = user;
@@ -348,7 +348,7 @@ namespace OpenSim.Framework.Communications
folder.Name = "Calling Cards";
folder.Type = (short)AssetType.CallingCard;
folder.Version = 1;
- Folders.Add(folder.ID, folder);
+ Folders.Add(folder.ID, folder);
folder = new InventoryFolderBase();
folder.ParentID = rootFolder;
diff --git a/OpenSim/Framework/Communications/Limit/IRequestLimitStrategy.cs b/OpenSim/Framework/Communications/Limit/IRequestLimitStrategy.cs
index 6ec21d9..1a9cc24 100644
--- a/OpenSim/Framework/Communications/Limit/IRequestLimitStrategy.cs
+++ b/OpenSim/Framework/Communications/Limit/IRequestLimitStrategy.cs
@@ -31,9 +31,9 @@ namespace OpenSim.Framework.Communications.Limit
/// Interface for strategies that can limit requests from the client. Currently only used in the
/// texture modules to deal with repeated requests for certain textures. However, limiting strategies
/// could be used with other requests.
- ///
+ ///
public interface IRequestLimitStrategy
- {
+ {
///
/// Should the request be allowed? If the id is not monitored, then the request is always allowed.
/// Otherwise, the strategy criteria will be applied.
@@ -41,21 +41,21 @@ namespace OpenSim.Framework.Communications.Limit
///
///
bool AllowRequest(TId id);
-
+
///
/// Has the request been refused just once?
///
/// False if the request has not yet been refused, or if the request has been refused more
/// than once.
bool IsFirstRefusal(TId id);
-
+
///
/// Start monitoring for future AllowRequest calls. If the id is already monitored, then monitoring
/// continues.
///
///
void MonitorRequests(TId id);
-
+
///
/// Is the id being monitored?
///
diff --git a/OpenSim/Framework/Communications/Limit/NullLimitStrategy.cs b/OpenSim/Framework/Communications/Limit/NullLimitStrategy.cs
index 72d0586..932f780 100644
--- a/OpenSim/Framework/Communications/Limit/NullLimitStrategy.cs
+++ b/OpenSim/Framework/Communications/Limit/NullLimitStrategy.cs
@@ -26,15 +26,15 @@
*/
namespace OpenSim.Framework.Communications.Limit
-{
+{
///
/// Strategy which polices no limits
///
public class NullLimitStrategy : IRequestLimitStrategy
- {
+ {
public bool AllowRequest(TId id) { return true; }
public bool IsFirstRefusal(TId id) { return false; }
public void MonitorRequests(TId id) { /* intentionally blank */ }
- public bool IsMonitoringRequests(TId id) { return false; }
+ public bool IsMonitoringRequests(TId id) { return false; }
}
}
diff --git a/OpenSim/Framework/Communications/Limit/RepeatLimitStrategy.cs b/OpenSim/Framework/Communications/Limit/RepeatLimitStrategy.cs
index dfa05fa..bb72029 100644
--- a/OpenSim/Framework/Communications/Limit/RepeatLimitStrategy.cs
+++ b/OpenSim/Framework/Communications/Limit/RepeatLimitStrategy.cs
@@ -31,14 +31,14 @@ namespace OpenSim.Framework.Communications.Limit
{
///
/// Limit requests by discarding them after they've been repeated a certain number of times.
- ///
+ ///
public class RepeatLimitStrategy : IRequestLimitStrategy
{
///
/// Record each asset request that we're notified about.
///
private readonly Dictionary requestCounts = new Dictionary();
-
+
///
/// The maximum number of requests that can be made before we drop subsequent requests.
///
@@ -47,7 +47,7 @@ namespace OpenSim.Framework.Communications.Limit
{
get { return m_maxRequests; }
}
-
+
///
/// The maximum number of requests that may be served before all further
/// requests are dropped.
@@ -55,52 +55,52 @@ namespace OpenSim.Framework.Communications.Limit
{
m_maxRequests = maxRequests;
}
-
+
///
///
///
public bool AllowRequest(TId id)
- {
+ {
if (requestCounts.ContainsKey(id))
{
requestCounts[id] += 1;
-
+
if (requestCounts[id] > m_maxRequests)
- {
+ {
return false;
- }
+ }
}
-
+
return true;
}
-
+
///
///
- ///
+ ///
public bool IsFirstRefusal(TId id)
{
if (requestCounts.ContainsKey(id) && m_maxRequests + 1 == requestCounts[id])
{
return true;
- }
-
+ }
+
return false;
}
-
+
///
///
- ///
+ ///
public void MonitorRequests(TId id)
{
if (!IsMonitoringRequests(id))
{
requestCounts.Add(id, 1);
- }
- }
-
+ }
+ }
+
///
///
- ///
+ ///
public bool IsMonitoringRequests(TId id)
{
return requestCounts.ContainsKey(id);
diff --git a/OpenSim/Framework/Communications/Limit/TimeLimitStrategy.cs b/OpenSim/Framework/Communications/Limit/TimeLimitStrategy.cs
index 34b01ff..b5b925e 100644
--- a/OpenSim/Framework/Communications/Limit/TimeLimitStrategy.cs
+++ b/OpenSim/Framework/Communications/Limit/TimeLimitStrategy.cs
@@ -32,17 +32,17 @@ namespace OpenSim.Framework.Communications.Limit
{
///
/// Limit requests by discarding repeat attempts that occur within a given time period
- ///
+ ///
/// XXX Don't use this for limiting texture downloading, at least not until we better handle multiple requests
/// for the same texture at different resolutions.
- ///
+ ///
public class TimeLimitStrategy : IRequestLimitStrategy
{
///
/// Record the time at which an asset request occurs.
///
- private readonly Dictionary requests = new Dictionary();
-
+ private readonly Dictionary requests = new Dictionary();
+
///
/// The minimum time period between which requests for the same data will be serviced.
///
@@ -53,37 +53,37 @@ namespace OpenSim.Framework.Communications.Limit
}
///
- ///
+ ///
public TimeLimitStrategy(TimeSpan repeatPeriod)
{
m_repeatPeriod = repeatPeriod;
}
-
+
///
///
///
public bool AllowRequest(TId id)
- {
+ {
if (IsMonitoringRequests(id))
{
DateTime now = DateTime.Now;
TimeSpan elapsed = now - requests[id].Time;
-
+
if (elapsed < RepeatPeriod)
{
requests[id].Refusals += 1;
return false;
}
-
- requests[id].Time = now;
+
+ requests[id].Time = now;
}
-
+
return true;
}
-
+
///
///
- ///
+ ///
public bool IsFirstRefusal(TId id)
{
if (IsMonitoringRequests(id))
@@ -92,31 +92,31 @@ namespace OpenSim.Framework.Communications.Limit
{
return true;
}
- }
-
+ }
+
return false;
}
-
+
///
///
- ///
+ ///
public void MonitorRequests(TId id)
{
if (!IsMonitoringRequests(id))
{
requests.Add(id, new Request(DateTime.Now));
- }
- }
-
+ }
+ }
+
///
///
- ///
+ ///
public bool IsMonitoringRequests(TId id)
{
return requests.ContainsKey(id);
- }
+ }
}
-
+
///
/// Private request details.
///
@@ -126,12 +126,12 @@ namespace OpenSim.Framework.Communications.Limit
/// Time of last request
///
public DateTime Time;
-
+
///
/// Number of refusals associated with this request
///
public int Refusals;
-
+
public Request(DateTime time)
{
Time = time;
diff --git a/OpenSim/Framework/Communications/LoginResponse.cs b/OpenSim/Framework/Communications/LoginResponse.cs
index bccac74..6fdd06a 100644
--- a/OpenSim/Framework/Communications/LoginResponse.cs
+++ b/OpenSim/Framework/Communications/LoginResponse.cs
@@ -239,7 +239,7 @@ namespace OpenSim.Framework.Communications
"Could not authenticate your avatar. Please check your username and password, and check the grid if problems persist.",
"false");
}
-
+
///
/// Response to indicate that login failed because the agent's inventory was not available.
///
@@ -249,7 +249,7 @@ namespace OpenSim.Framework.Communications
return GenerateFailureResponse(
"key",
"The avatar inventory service is not responding. Please notify your login region operator.",
- "false");
+ "false");
}
public XmlRpcResponse CreateAlreadyLoggedInResponse()
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs
index fa78a30..bd0fa53 100644
--- a/OpenSim/Framework/Communications/LoginService.cs
+++ b/OpenSim/Framework/Communications/LoginService.cs
@@ -48,8 +48,8 @@ namespace OpenSim.Framework.Communications
protected string m_welcomeMessage = "Welcome to OpenSim";
protected UserManagerBase m_userManager = null;
- protected Mutex m_loginMutex = new Mutex(false);
-
+ protected Mutex m_loginMutex = new Mutex(false);
+
///
/// Used during login to send the skeleton of the OpenSim Library to the client.
///
@@ -61,12 +61,12 @@ namespace OpenSim.Framework.Communications
///
///
///
- public LoginService(UserManagerBase userManager, LibraryRootFolder libraryRootFolder,
+ public LoginService(UserManagerBase userManager, LibraryRootFolder libraryRootFolder,
string welcomeMess)
{
m_userManager = userManager;
m_libraryRootFolder = libraryRootFolder;
-
+
if (welcomeMess != String.Empty)
{
m_welcomeMessage = welcomeMess;
@@ -79,15 +79,15 @@ namespace OpenSim.Framework.Communications
/// The existing response
/// The user profile
public abstract void CustomiseResponse(LoginResponse response, UserProfileData theUser, string startLocationRequest);
-
+
///
/// Get the initial login inventory skeleton (in other words, the folder structure) for the given user.
///
///
///
/// This will be thrown if there is a problem with the inventory service
- protected abstract InventoryData GetInventorySkeleton(LLUUID userID);
-
+ protected abstract InventoryData GetInventorySkeleton(LLUUID userID);
+
///
/// Called when we receive the client's initial XMLRPC login_to_simulator request message
///
@@ -112,7 +112,7 @@ namespace OpenSim.Framework.Communications
UserProfileData userProfile;
LoginResponse logResponse = new LoginResponse();
-
+
string firstname = String.Empty;
string lastname = String.Empty;
@@ -120,23 +120,23 @@ namespace OpenSim.Framework.Communications
{
firstname = (string) requestData["first"];
lastname = (string) requestData["last"];
-
+
m_log.InfoFormat(
- "[LOGIN BEGIN]: Received login request message from user {0} {1}",
+ "[LOGIN BEGIN]: Received login request message from user {0} {1}",
firstname, lastname);
string clientVersion = "Unknown";
-
+
if (requestData.Contains("version"))
{
- clientVersion = (string)requestData["version"];
+ clientVersion = (string)requestData["version"];
}
-
+
if (requestData.Contains("start"))
{
startLocationRequest = (string)requestData["start"];
- }
-
+ }
+
m_log.DebugFormat(
"[LOGIN]: Client is {0}, start location is {1}", clientVersion, startLocationRequest);
@@ -163,9 +163,9 @@ namespace OpenSim.Framework.Communications
catch (Exception e)
{
m_log.InfoFormat(
- "[LOGIN END]: Bad web_login_key: {0} for user {1} {2}, exception {3}",
+ "[LOGIN END]: Bad web_login_key: {0} for user {1} {2}, exception {3}",
requestData["web_login_key"], firstname, lastname, e);
-
+
return logResponse.CreateFailedResponse();
}
GoodLogin = AuthenticateUser(userProfile, webloginkey);
@@ -176,14 +176,14 @@ namespace OpenSim.Framework.Communications
{
m_log.Info(
"[LOGIN END]: login_to_simulator login message did not contain all the required data");
-
+
return logResponse.CreateGridErrorResponse();
}
if (!GoodLogin)
{
m_log.InfoFormat("[LOGIN END]: User {0} {1} failed authentication", firstname, lastname);
-
+
return logResponse.CreateLoginFailedResponse();
}
else
@@ -199,11 +199,11 @@ namespace OpenSim.Framework.Communications
m_userManager.CommitAgent(ref userProfile);
// Reject the login
-
+
m_log.InfoFormat(
- "[LOGIN END]: Notifying user {0} {1} that they are already logged in",
+ "[LOGIN END]: Notifying user {0} {1} that they are already logged in",
firstname, lastname);
-
+
return logResponse.CreateAlreadyLoggedInResponse();
}
// Otherwise...
@@ -214,9 +214,9 @@ namespace OpenSim.Framework.Communications
{
LLUUID agentID = userProfile.ID;
InventoryData inventData = null;
-
+
try
- {
+ {
inventData = GetInventorySkeleton(agentID);
}
catch (Exception e)
@@ -224,10 +224,10 @@ namespace OpenSim.Framework.Communications
m_log.ErrorFormat(
"[LOGIN END]: Error retrieving inventory skeleton of agent {0}, {1} - {2}",
agentID, e.GetType(), e.Message);
-
- return logResponse.CreateLoginInventoryFailedResponse();
- }
-
+
+ return logResponse.CreateLoginInventoryFailedResponse();
+ }
+
ArrayList AgentInventoryArray = inventData.InventoryArray;
Hashtable InventoryRootHash = new Hashtable();
@@ -235,7 +235,7 @@ namespace OpenSim.Framework.Communications
ArrayList InventoryRoot = new ArrayList();
InventoryRoot.Add(InventoryRootHash);
userProfile.RootInventoryFolderID = inventData.RootFolderID;
-
+
// Inventory Library Section
Hashtable InventoryLibRootHash = new Hashtable();
InventoryLibRootHash["folder_id"] = "00000112-000f-0000-0000-000100bba000";
@@ -244,10 +244,10 @@ namespace OpenSim.Framework.Communications
logResponse.InventoryLibRoot = InventoryLibRoot;
logResponse.InventoryLibraryOwner = GetLibraryOwner();
-
+
logResponse.InventoryRoot = InventoryRoot;
logResponse.InventorySkeleton = AgentInventoryArray;
- logResponse.InventoryLibrary = GetInventoryLibrary();
+ logResponse.InventoryLibrary = GetInventoryLibrary();
// Circuit Code
uint circode = (uint) (Util.RandomClass.Next());
@@ -280,15 +280,15 @@ namespace OpenSim.Framework.Communications
//return logResponse.ToXmlRpcResponse();
}
CommitAgent(ref userProfile);
-
+
// If we reach this point, then the login has successfully logged onto the grid
if (StatsManager.UserStats != null)
StatsManager.UserStats.AddSuccessfulLogin();
-
+
m_log.DebugFormat(
"[LOGIN END]: Authentication of user {0} {1} successful. Sending response to client.",
firstname, lastname);
-
+
return logResponse.ToXmlRpcResponse();
}
catch (Exception e)
@@ -422,10 +422,10 @@ namespace OpenSim.Framework.Communications
}
CommitAgent(ref userProfile);
-
+
// If we reach this point, then the login has successfully logged onto the grid
if (StatsManager.UserStats != null)
- StatsManager.UserStats.AddSuccessfulLogin();
+ StatsManager.UserStats.AddSuccessfulLogin();
return logResponse.ToLLSDResponse();
}
@@ -449,7 +449,7 @@ namespace OpenSim.Framework.Communications
// period, space, parens, and dash.
Regex wfcut = new Regex("[^a-zA-Z0-9_\\.\\$ \\(\\)\\-]");
-
+
Hashtable returnactions = new Hashtable();
int statuscode = 200;
@@ -467,7 +467,7 @@ namespace OpenSim.Framework.Communications
// the client requires the HTML form field be named 'username'
// however, the data it sends when it loads the first time is 'firstname'
// another one of those little nuances.
-
+
if (keysvals.Contains("firstname"))
firstname = wfcut.Replace((string)keysvals["firstname"], String.Empty, 99999);
@@ -494,7 +494,7 @@ namespace OpenSim.Framework.Communications
if (keysvals.Contains("lang"))
lang = wfcut.Replace((string)keysvals["lang"], String.Empty, 99999);
-
+
if (keysvals.Contains("password"))
password = wfcut.Replace((string)keysvals["password"], String.Empty, 99999);
@@ -541,8 +541,8 @@ namespace OpenSim.Framework.Communications
return returnactions;
}
- public string GetLoginForm(string firstname, string lastname, string location, string region,
- string grid, string channel, string version, string lang,
+ public string GetLoginForm(string firstname, string lastname, string location, string region,
+ string grid, string channel, string version, string lang,
string password, string errormessages)
{
// inject our values in the form at the markers
@@ -559,7 +559,7 @@ namespace OpenSim.Framework.Communications
loginform = sr.ReadToEnd();
sr.Close();
}
-
+
loginform = loginform.Replace("[$firstname]", firstname);
loginform = loginform.Replace("[$lastname]", lastname);
loginform = loginform.Replace("[$location]", location);
@@ -586,7 +586,7 @@ namespace OpenSim.Framework.Communications
responseString += "OpenSim Login";
responseString += " ";
responseString += "