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: // // folders // @@ -240,14 +240,14 @@ namespace OpenSim.Framework.Communications.Capabilities // // // - // 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("folders", ""); 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 = "folders"; } @@ -291,7 +291,7 @@ namespace OpenSim.Framework.Communications.Capabilities { response = "folders" + 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 += "
"; - + responseString += "
"; responseString += "
[$errors]
"; @@ -670,13 +670,13 @@ namespace OpenSim.Framework.Communications password = "$1$" + Util.Md5Hash(password); password = password.Remove(0, 3); //remove $1$ - + string s = Util.Md5Hash(password + ":" + profile.PasswordSalt); - // Testing... + // Testing... //m_log.Info("[LOGIN]: SubHash:" + s + " userprofile:" + profile.passwordHash); //m_log.Info("[LOGIN]: userprofile:" + profile.passwordHash + " SubCT:" + password); - passwordSuccess = (profile.PasswordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase) + passwordSuccess = (profile.PasswordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase) || profile.PasswordHash.Equals(password, StringComparison.InvariantCultureIgnoreCase)); return passwordSuccess; @@ -694,7 +694,7 @@ namespace OpenSim.Framework.Communications } /// - /// + /// /// /// /// @@ -709,7 +709,7 @@ namespace OpenSim.Framework.Communications } /// - /// + /// /// /// /// @@ -720,7 +720,7 @@ namespace OpenSim.Framework.Communications } /// - /// + /// /// /// public virtual string GetMessage() @@ -741,17 +741,17 @@ namespace OpenSim.Framework.Communications } return buddylistreturn; } - + /// /// Converts the inventory library skeleton into the form required by the rpc request. /// /// protected virtual ArrayList GetInventoryLibrary() { - Dictionary rootFolders + Dictionary rootFolders = m_libraryRootFolder.RequestSelfAndDescendentFolders(); ArrayList folderHashes = new ArrayList(); - + foreach (InventoryFolderBase folder in rootFolders.Values) { Hashtable TempHash = new Hashtable(); @@ -762,12 +762,12 @@ namespace OpenSim.Framework.Communications TempHash["folder_id"] = folder.ID.ToString(); folderHashes.Add(TempHash); } - + return folderHashes; } /// - /// + /// /// /// protected virtual ArrayList GetLibraryOwner() diff --git a/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs b/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs index 9a53499..2df5fbc 100644 --- a/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs +++ b/OpenSim/Framework/Communications/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/Framework/Communications/RestClient.cs b/OpenSim/Framework/Communications/RestClient.cs index 4ed62bf..7c8876a 100644 --- a/OpenSim/Framework/Communications/RestClient.cs +++ b/OpenSim/Framework/Communications/RestClient.cs @@ -16,14 +16,14 @@ namespace OpenSim.Framework.Communications /// /// This class is a generic implementation of a REST (Representational State Transfer) web service. This /// class is designed to execute both synchronously and asynchronously. - /// + /// /// Internally the implementation works as a two stage asynchronous web-client. /// When the request is initiated, RestClient will query asynchronously for for a web-response, /// sleeping until the initial response is returned by the server. Once the initial response is retrieved /// the second stage of asynchronous requests will be triggered, in an attempt to read of the response /// object into a memorystream as a sequence of asynchronous reads. - /// - /// The asynchronisity of RestClient is designed to move as much processing into the back-ground, allowing + /// + /// The asynchronisity of RestClient is designed to move as much processing into the back-ground, allowing /// other threads to execute, while it waits for a response from the web-service. RestClient itself can be /// invoked by the caller in either synchronous mode or asynchronous modes. /// @@ -36,7 +36,7 @@ namespace OpenSim.Framework.Communications #region member variables /// - /// The base Uri of the web-service e.g. http://www.google.com + /// The base Uri of the web-service e.g. http://www.google.com /// private string _url; @@ -92,7 +92,7 @@ namespace OpenSim.Framework.Communications /// - /// if an exception occours during async processing, we need to save it, so it can be + /// if an exception occours during async processing, we need to save it, so it can be /// rethrown on the primary thread; /// private Exception _asyncException; @@ -341,7 +341,7 @@ namespace OpenSim.Framework.Communications { AsyncResult ar = (AsyncResult) asyncResult; - // Wait for operation to complete, then return result or + // Wait for operation to complete, then return result or // throw exception return ar.EndInvoke(); } diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index 8e0b75c..5a62682 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs @@ -43,12 +43,12 @@ namespace OpenSim.Framework.Communications /// public abstract class UserManagerBase : IUserService { - private static readonly ILog m_log + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public UserConfig _config; private Dictionary _plugins = new Dictionary(); - + /// /// Adds a new user server plugin - user servers will be requested in the order they were loaded. /// @@ -85,7 +85,7 @@ namespace OpenSim.Framework.Communications m_log.Info("[USERSTORAGE]: Added IUserData Interface"); } - #region Get UserProfile + #region Get UserProfile // see IUserService public UserProfileData GetUserProfile(string fname, string lname) @@ -103,8 +103,8 @@ namespace OpenSim.Framework.Communications return null; } - - // see IUserService + + // see IUserService public UserProfileData GetUserProfile(LLUUID uuid) { foreach (KeyValuePair plugin in _plugins) @@ -408,7 +408,7 @@ namespace OpenSim.Framework.Communications profile.CurrentAgent = agent; } - + /// /// Process a user logoff from OpenSim. /// @@ -422,7 +422,7 @@ namespace OpenSim.Framework.Communications { if (StatsManager.UserStats != null) StatsManager.UserStats.AddLogout(); - + UserProfileData userProfile; UserAgentData userAgent; LLVector3 currentPos = new LLVector3(posx, posy, posz); @@ -433,7 +433,7 @@ namespace OpenSim.Framework.Communications { // This line needs to be in side the above if statement or the UserServer will crash on some logouts. m_log.Info("[LOGOUT]: " + userProfile.FirstName + " " + userProfile.SurName + " from " + regionhandle + "(" + posx + "," + posy + "," + posz + ")"); - + userAgent = userProfile.CurrentAgent; if (userAgent != null) { @@ -462,7 +462,7 @@ namespace OpenSim.Framework.Communications m_log.Warn("[LOGOUT]: Unknown User logged out"); } } - + public void CreateAgent(UserProfileData profile, LLSD request) { UserAgentData agent = new UserAgentData(); @@ -516,7 +516,7 @@ namespace OpenSim.Framework.Communications #endregion /// - /// + /// /// /// public LLUUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY) @@ -598,7 +598,7 @@ namespace OpenSim.Framework.Communications /// Appearance /// TODO: stubs for now to get us to a compiling state gently - public AvatarAppearance GetUserAppearance(LLUUID user) + public AvatarAppearance GetUserAppearance(LLUUID user) { foreach (KeyValuePair plugin in _plugins) { @@ -643,7 +643,7 @@ namespace OpenSim.Framework.Communications } } } - + public void RemoveAttachment(LLUUID user, LLUUID item) { foreach (KeyValuePair plugin in _plugins) @@ -658,7 +658,7 @@ namespace OpenSim.Framework.Communications } } } - + public List GetAttachments(LLUUID user) { foreach (KeyValuePair plugin in _plugins) diff --git a/OpenSim/Framework/Console/ConsoleBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs index 79fe1d4..74e64e3 100644 --- a/OpenSim/Framework/Console/ConsoleBase.cs +++ b/OpenSim/Framework/Console/ConsoleBase.cs @@ -58,7 +58,7 @@ namespace OpenSim.Framework.Console } /// - /// derive an ansi color from a string, ignoring the darker colors. + /// derive an ansi color from a string, ignoring the darker colors. /// This is used to help automatically bin component tags with colors /// in various print functions. /// @@ -195,7 +195,7 @@ namespace OpenSim.Framework.Console System.Console.WriteLine(args); } } - } + } catch (ObjectDisposedException) { } @@ -232,7 +232,7 @@ namespace OpenSim.Framework.Console { } } - + public string ReadLine() { try @@ -245,7 +245,7 @@ namespace OpenSim.Framework.Console return String.Empty; } } - + public int Read() { return System.Console.Read(); diff --git a/OpenSim/Framework/Console/OpenSimAppender.cs b/OpenSim/Framework/Console/OpenSimAppender.cs index d381179..ddd6d9a 100644 --- a/OpenSim/Framework/Console/OpenSimAppender.cs +++ b/OpenSim/Framework/Console/OpenSimAppender.cs @@ -40,32 +40,32 @@ namespace OpenSim.Framework.Console string loggingMessage = RenderLoggingEvent(le); string regex = @"^(?.*?)\[(?[^\]]+)\]:?(?.*)"; - + Regex RE = new Regex(regex, RegexOptions.Multiline); MatchCollection matches = RE.Matches(loggingMessage); - // Get some direct matches $1 $4 is a + // Get some direct matches $1 $4 is a if (matches.Count == 1) { System.Console.Write(matches[0].Groups["Front"].Value); System.Console.Write("["); - + WriteColorText(DeriveColor(matches[0].Groups["Category"].Value), matches[0].Groups["Category"].Value); System.Console.Write("]:"); - - if (le.Level == Level.Error) + + if (le.Level == Level.Error) { WriteColorText(ConsoleColor.Red, matches[0].Groups["End"].Value); } - else if (le.Level == Level.Warn) + else if (le.Level == Level.Warn) { WriteColorText(ConsoleColor.Yellow, matches[0].Groups["End"].Value); } - else + else { System.Console.Write(matches[0].Groups["End"].Value); } System.Console.WriteLine(); - } + } else { System.Console.Write(loggingMessage); diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 098e721..343b5a6 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -156,7 +156,7 @@ namespace OpenSim.Framework } /// - /// + /// /// public IScene Scene { @@ -181,7 +181,7 @@ namespace OpenSim.Framework } /// - /// + /// /// public uint PacketNumber { @@ -190,7 +190,7 @@ namespace OpenSim.Framework } /// - /// + /// /// public sbyte DiscardLevel { @@ -199,7 +199,7 @@ namespace OpenSim.Framework } /// - /// + /// /// public LLUUID RequestedAssetID { @@ -213,7 +213,7 @@ namespace OpenSim.Framework private List m_nowWearing = new List(); /// - /// + /// /// public List NowWearing { @@ -381,7 +381,7 @@ namespace OpenSim.Framework public delegate void ImprovedInstantMessage(IClientAPI remoteclient, LLUUID fromAgentID, LLUUID fromAgentSession, LLUUID toAgentID, LLUUID imSessionID, uint timestamp, string fromAgentName, string message, byte dialog, bool fromGroup, byte offline, uint ParentEstateID, - LLVector3 Position, LLUUID RegionID, byte[] binaryBucket); // This shouldn't be cut down... + LLVector3 Position, LLUUID RegionID, byte[] binaryBucket); // This shouldn't be cut down... // especially if we're ever going to implement groups, presence, estate message dialogs... public delegate void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 RayEnd, LLVector3 RayStart, @@ -607,7 +607,7 @@ namespace OpenSim.Framework public delegate void RequestPayPrice(IClientAPI remoteClient, LLUUID objectID); public delegate void ForceReleaseControls(IClientAPI remoteClient, LLUUID agentID); - + //Estate Requests public delegate void DetailedEstateDataRequest(IClientAPI remoteClient, LLUUID invoice); public delegate void SetEstateFlagsRequest(bool blockTerraform, bool noFly, bool allowDamage, bool blockLandResell, int maxAgents, float objectBonusFactor, int matureLevel, bool restrictPushObject, bool allowParcelChanges); @@ -764,7 +764,7 @@ namespace OpenSim.Framework event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; event ParcelSelectObjects OnParcelSelectObjects; event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; - event ParcelAbandonRequest OnParcelAbandonRequest; + event ParcelAbandonRequest OnParcelAbandonRequest; event RegionInfoRequest OnRegionInfoRequest; event EstateCovenantRequest OnEstateCovenantRequest; @@ -808,7 +808,7 @@ namespace OpenSim.Framework event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest; - + [Obsolete("IClientAPI.OutPacket SHOULD NOT EXIST outside of LLClientView please refactor appropriately.")] void OutPacket(Packet newPack, ThrottleOutPacketType packType); void SendWearables(AvatarWearable[] wearables, int serial); @@ -858,16 +858,16 @@ namespace OpenSim.Framework void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint); void SetChildAgentThrottle(byte[] throttle); - void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, + void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, LLVector3 vel, LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, byte clickAction, byte[] textureanim, bool attachment, uint AttachPoint, LLUUID AssetId); - - void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, + + void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, LLVector3 vel, LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, - uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color, + uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, byte clickAction); void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, @@ -889,7 +889,7 @@ namespace OpenSim.Framework void SendInventoryItemCreateUpdate(InventoryItemBase Item); void SendRemoveInventoryItem(LLUUID itemID); - + void SendTakeControls(int controls, bool passToAgent, bool TakeControls); void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName); @@ -950,7 +950,7 @@ namespace OpenSim.Framework void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, LLUUID AssetFullID); void SendConfirmXfer(ulong xferID, uint PacketID); void SendXferRequest(ulong XferID, short AssetType, LLUUID vFileID, byte FilePath, byte[] FileName); - + void SendImagePart(ushort numParts, LLUUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec); void SendShutdownConnectionNotice(); @@ -973,9 +973,9 @@ namespace OpenSim.Framework LLVector3 CameraAtOffset, LLVector3 CameraEyeOffset, bool ForceMouseLook); void SendAdminResponse(LLUUID Token, uint AdminLevel); - + void SendGroupMembership(GroupData[] GroupMembership); - + byte[] GetThrottlesPacked(float multiplier); diff --git a/OpenSim/Framework/IClientAPI2.cs b/OpenSim/Framework/IClientAPI2.cs index 684f3e8..aa70dc3 100644 --- a/OpenSim/Framework/IClientAPI2.cs +++ b/OpenSim/Framework/IClientAPI2.cs @@ -5,14 +5,14 @@ namespace OpenSim.Framework #region Args Classes public class ICA2_ConnectionArgs : EventArgs { - + } public class ICA2_DisconnectionArgs : EventArgs { public bool Forced; - // Static Constructor + // Static Constructor // Allows us to recycle these classes later more easily from a pool. public static ICA2_DisconnectionArgs Create(bool forced) { diff --git a/OpenSim/Framework/IInventoryData.cs b/OpenSim/Framework/IInventoryData.cs index f283085..fabcbe2 100644 --- a/OpenSim/Framework/IInventoryData.cs +++ b/OpenSim/Framework/IInventoryData.cs @@ -120,7 +120,7 @@ namespace OpenSim.Framework void updateInventoryItem(InventoryItemBase item); /// - /// + /// /// /// void deleteInventoryItem(LLUUID item); diff --git a/OpenSim/Framework/IUserData.cs b/OpenSim/Framework/IUserData.cs index be05094..0b25f7e 100644 --- a/OpenSim/Framework/IUserData.cs +++ b/OpenSim/Framework/IUserData.cs @@ -87,7 +87,7 @@ namespace OpenSim.Framework void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey); /// - /// Adds a new User profile to the database + /// Adds a new User profile to the database /// /// UserProfile to add void AddNewUserProfile(UserProfileData user); @@ -181,8 +181,8 @@ namespace OpenSim.Framework AvatarAppearance GetUserAppearance(LLUUID user); void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance); - - + + void AddAttachment(LLUUID user, LLUUID item); void RemoveAttachment(LLUUID user, LLUUID item); List GetAttachments(LLUUID user); diff --git a/OpenSim/Framework/InventoryFolderBase.cs b/OpenSim/Framework/InventoryFolderBase.cs index 910f7da..31bb02f 100644 --- a/OpenSim/Framework/InventoryFolderBase.cs +++ b/OpenSim/Framework/InventoryFolderBase.cs @@ -50,7 +50,7 @@ namespace OpenSim.Framework private LLUUID _owner; /// - /// The folder this folder is contained in + /// The folder this folder is contained in /// private LLUUID _parentID; diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs index dbf2085..8d873db 100644 --- a/OpenSim/Framework/InventoryItemBase.cs +++ b/OpenSim/Framework/InventoryItemBase.cs @@ -45,7 +45,7 @@ namespace OpenSim.Framework private int _assetType; /// - /// + /// /// private uint _basePermissions; @@ -69,12 +69,12 @@ namespace OpenSim.Framework private string _description; /// - /// + /// /// private uint _everyOnePermissions; /// - /// The folder this item is contained in + /// The folder this item is contained in /// private LLUUID _folder; @@ -93,34 +93,34 @@ namespace OpenSim.Framework /// private string _name; - + /// - /// + /// /// private LLUUID _groupID; /// - /// + /// /// private bool _groupOwned; /// - /// + /// /// private int _salePrice; /// - /// + /// /// private byte _saleType; /// - /// + /// /// private uint _flags; /// - /// + /// /// public int _creationDate; diff --git a/OpenSim/Framework/RegionCommsListener.cs b/OpenSim/Framework/RegionCommsListener.cs index 422c939..c4c5813 100644 --- a/OpenSim/Framework/RegionCommsListener.cs +++ b/OpenSim/Framework/RegionCommsListener.cs @@ -63,7 +63,7 @@ namespace OpenSim.Framework #endregion /// - /// + /// /// /// /// @@ -171,7 +171,7 @@ namespace OpenSim.Framework } /// - /// + /// /// /// TODO: Doesnt take any args?? /// @@ -188,7 +188,7 @@ namespace OpenSim.Framework } /// - /// + /// /// /// Added to avoid a unused compiler warning on OnNeighboursUpdate, TODO: Check me /// diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index 158ddde..d9d41d6 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs @@ -37,7 +37,7 @@ namespace OpenSim.Framework [Serializable] public class SimpleRegionInfo { - // private static readonly log4net.ILog m_log + // private static readonly log4net.ILog m_log // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); protected bool Allow_Alternate_Ports; @@ -114,7 +114,7 @@ namespace OpenSim.Framework /// /// This accessor can throw all the exceptions that Dns.GetHostAddresses can throw. - /// + /// /// XXX Isn't this really doing too much to be a simple getter, rather than an explict method? /// public IPEndPoint ExternalEndPoint @@ -187,7 +187,7 @@ namespace OpenSim.Framework public class RegionInfo : SimpleRegionInfo { - // private static readonly log4net.ILog m_log + // private static readonly log4net.ILog m_log // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); public bool commFailTF = false; @@ -327,7 +327,7 @@ namespace OpenSim.Framework if (errorMessage != String.Empty) { - // a error + // a error } } diff --git a/OpenSim/Framework/Remoting.cs b/OpenSim/Framework/Remoting.cs index cb0911e..4f56d52 100644 --- a/OpenSim/Framework/Remoting.cs +++ b/OpenSim/Framework/Remoting.cs @@ -87,7 +87,7 @@ namespace OpenSim.Framework /// /// Signs a new bit of data with the current hash. Returns a byte array which should be affixed to the message. - /// Signing a piece of data will automatically increment the hash - if you sign data and do not send it, the + /// Signing a piece of data will automatically increment the hash - if you sign data and do not send it, the /// hashes will get out of sync and throw an exception when validation is attempted. /// /// The outgoing data diff --git a/OpenSim/Framework/SerializableInventory.cs b/OpenSim/Framework/SerializableInventory.cs index 81f993c..fcf13a8 100644 --- a/OpenSim/Framework/SerializableInventory.cs +++ b/OpenSim/Framework/SerializableInventory.cs @@ -30,7 +30,7 @@ using System.Xml.Serialization; namespace OpenSim.Framework { - /* + /* * .Net has some issues, serializing a dictionary, so we cannot reuse the InventoryFolder * class defined in Communications.Framework.Communications.Caches. So we serialize/deserialize * into this simpler class, and then use that. diff --git a/OpenSim/Framework/SerializableRegionInfo.cs b/OpenSim/Framework/SerializableRegionInfo.cs index 44081b2..4965a43 100644 --- a/OpenSim/Framework/SerializableRegionInfo.cs +++ b/OpenSim/Framework/SerializableRegionInfo.cs @@ -40,8 +40,8 @@ namespace OpenSim.Framework /// /// The port by which http communication occurs with the region (most noticeably, CAPS communication) - /// - /// FIXME: Defaulting to 9000 temporarily (on the basis that this is the http port most region + /// + /// FIXME: Defaulting to 9000 temporarily (on the basis that this is the http port most region /// servers are running) until the revision in which this change is made propogates around grids. /// protected uint m_httpPort = 9000; diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index 50f4e23..1eb1da9 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs @@ -82,10 +82,10 @@ namespace OpenSim.Framework.Servers string path = handler.Path; string handlerKey = GetHandlerKey(httpMethod, path); - + if (!m_streamHandlers.ContainsKey(handlerKey)) { - //m_log.DebugFormat("[BASE HTTP SERVER]: Adding handler key {0}", handlerKey); + //m_log.DebugFormat("[BASE HTTP SERVER]: Adding handler key {0}", handlerKey); m_streamHandlers.Add(handlerKey, handler); } } @@ -135,20 +135,20 @@ namespace OpenSim.Framework.Servers try { HttpListenerContext context = (HttpListenerContext) stateinfo; - + HttpListenerRequest request = context.Request; HttpListenerResponse response = context.Response; - + response.KeepAlive = false; response.SendChunked = false; - + string path = request.RawUrl; string handlerKey = GetHandlerKey(request.HttpMethod, path); - + //m_log.DebugFormat("[BASE HTTP SERVER]: Handling {0} request for {1}", request.HttpMethod, path); - + IRequestHandler requestHandler; - + if (TryGetStreamHandler(handlerKey, out requestHandler)) { // Okay, so this is bad, but should be considered temporary until everything is IStreamHandler. @@ -156,13 +156,13 @@ namespace OpenSim.Framework.Servers if (requestHandler is IStreamedRequestHandler) { IStreamedRequestHandler streamedRequestHandler = requestHandler as IStreamedRequestHandler; - + buffer = streamedRequestHandler.Handle(path, request.InputStream); } else { IStreamHandler streamHandler = (IStreamHandler) requestHandler; - + using (MemoryStream memoryStream = new MemoryStream()) { streamHandler.Handle(path, request.InputStream, memoryStream); @@ -170,11 +170,11 @@ namespace OpenSim.Framework.Servers buffer = memoryStream.ToArray(); } } - + request.InputStream.Close(); response.ContentType = requestHandler.ContentType; response.ContentLength64 = buffer.LongLength; - + try { response.OutputStream.Write(buffer, 0, buffer.Length); @@ -273,7 +273,7 @@ namespace OpenSim.Framework.Servers return true; } } - + /// /// Try all the registered xmlrpc handlers when an xmlrpc request is received. /// Sends back an XMLRPC unknown request response if no handler is registered for the requested method. @@ -434,7 +434,7 @@ namespace OpenSim.Framework.Servers { // This is a test. There's a workable alternative.. as this way sucks. // We'd like to put this into a text file parhaps that's easily editable. - // + // // For this test to work, I used the following secondlife.exe parameters // "C:\Program Files\SecondLifeWindLight\SecondLifeWindLight.exe" -settings settings_windlight.xml -channel "Second Life WindLight" -set SystemLanguage en-us -loginpage http://10.1.1.2:8002/?show_login_form=TRUE -loginuri http://10.1.1.2:8002 -user 10.1.1.2 // @@ -461,7 +461,7 @@ namespace OpenSim.Framework.Servers string[] querystringkeys = request.QueryString.AllKeys; string[] rHeaders = request.Headers.AllKeys; - + foreach (string queryname in querystringkeys) { keysvals.Add(queryname, request.QueryString[queryname]); @@ -489,7 +489,7 @@ namespace OpenSim.Framework.Servers { Hashtable responsedata = requestprocessor(keysvals); DoHTTPGruntWork(responsedata,response); - + //SendHTML500(response); } else @@ -519,7 +519,7 @@ namespace OpenSim.Framework.Servers contentType = "text/html"; } - // We're forgoing the usual error status codes here because the client + // We're forgoing the usual error status codes here because the client // ignores anything but 200 and 301 response.StatusCode = 200; @@ -649,10 +649,10 @@ namespace OpenSim.Framework.Servers public void RemoveStreamHandler(string httpMethod, string path) { - string handlerKey = GetHandlerKey(httpMethod, path); - + string handlerKey = GetHandlerKey(httpMethod, path); + //m_log.DebugFormat("[BASE HTTP SERVER]: Removing handler key {0}", handlerKey); - + m_streamHandlers.Remove(handlerKey); } @@ -660,7 +660,7 @@ namespace OpenSim.Framework.Servers { m_HTTPHandlers.Remove(GetHandlerKey(httpMethod, path)); } - + public string GetHTTP404(string host) { string file = Path.Combine(Util.configDir(), "http_404.html"); diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index 811a0db..fcbc5a1 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs @@ -44,16 +44,16 @@ namespace OpenSim.Framework.Servers { get { return m_httpServer; } } - + /// /// Holds the non-viewer statistics collection object for this service/server /// protected IStatsCollector m_stats; - + public BaseOpenSimServer() { m_startuptime = DateTime.Now; - } + } /// /// Should be overriden by descendents if they need to perform extra shutdown processing @@ -66,7 +66,7 @@ namespace OpenSim.Framework.Servers } Environment.Exit(0); } - + /// /// Runs commands issued by the server console from the operator /// @@ -75,17 +75,17 @@ namespace OpenSim.Framework.Servers public virtual void RunCmd(string command, string[] cmdparams) { switch (command) - { + { case "help": Notice("quit - equivalent to shutdown."); - + if (m_stats != null) Notice("show stats - statistical information for this server"); - + Notice("show uptime - show server startup and uptime."); Notice("shutdown - shutdown the server.\n"); break; - + case "show": if (cmdparams.Length > 0) { @@ -96,10 +96,10 @@ namespace OpenSim.Framework.Servers case "quit": case "shutdown": Shutdown(); - break; + break; } } - + /// /// Outputs to the console information about the region /// @@ -107,18 +107,18 @@ namespace OpenSim.Framework.Servers public virtual void Show(string ShowWhat) { switch (ShowWhat) - { + { case "stats": if (m_stats != null) { Notice(m_stats.Report()); } - break; - + break; + case "uptime": Notice("Server has been running since " + m_startuptime.DayOfWeek + ", " + m_startuptime.ToString()); Notice("That is an elapsed time of " + (DateTime.Now - m_startuptime).ToString()); - break; + break; } } diff --git a/OpenSim/Framework/Servers/RestObjectPosterResponse.cs b/OpenSim/Framework/Servers/RestObjectPosterResponse.cs index 1410afd..05bfaa1 100644 --- a/OpenSim/Framework/Servers/RestObjectPosterResponse.cs +++ b/OpenSim/Framework/Servers/RestObjectPosterResponse.cs @@ -38,12 +38,12 @@ namespace OpenSim.Framework.Servers /// /// Makes an asynchronous REST request with a callback to invoke with the response. - /// + /// public class RestObjectPosterResponse { -// private static readonly log4net.ILog m_log +// private static readonly log4net.ILog m_log // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - + public ReturnResponse ResponseCallback; public void BeginPostObject(string requestUrl, TRequest obj) @@ -87,11 +87,11 @@ namespace OpenSim.Framework.Servers TResponse deserial; XmlSerializer deserializer = new XmlSerializer(typeof (TResponse)); Stream stream = resp.GetResponseStream(); - + // This is currently a bad debug stanza since it gobbles us the response... // StreamReader reader = new StreamReader(stream); // m_log.DebugFormat("[REST OBJECT POSTER RESPONSE]: Received {0}", reader.ReadToEnd()); - + deserial = (TResponse) deserializer.Deserialize(stream); if (deserial != null && ResponseCallback != null) diff --git a/OpenSim/Framework/Servers/RestStreamHandler.cs b/OpenSim/Framework/Servers/RestStreamHandler.cs index cab5208..76dbd73 100644 --- a/OpenSim/Framework/Servers/RestStreamHandler.cs +++ b/OpenSim/Framework/Servers/RestStreamHandler.cs @@ -34,7 +34,7 @@ namespace OpenSim.Framework.Servers { private RestMethod m_restMethod; - public RestMethod Method + public RestMethod Method { get { return m_restMethod; } } diff --git a/OpenSim/Framework/Servers/SynchronousRestObjectPoster.cs b/OpenSim/Framework/Servers/SynchronousRestObjectPoster.cs index 103fbe5..1b8e4ea 100644 --- a/OpenSim/Framework/Servers/SynchronousRestObjectPoster.cs +++ b/OpenSim/Framework/Servers/SynchronousRestObjectPoster.cs @@ -75,7 +75,7 @@ namespace OpenSim.Framework.Servers using (WebResponse resp = request.GetResponse()) { XmlSerializer deserializer = new XmlSerializer(typeof (TResponse)); - deserial = (TResponse) deserializer.Deserialize(resp.GetResponseStream()); + deserial = (TResponse) deserializer.Deserialize(resp.GetResponseStream()); } return deserial; } diff --git a/OpenSim/Framework/Statistics/AssetStatsCollector.cs b/OpenSim/Framework/Statistics/AssetStatsCollector.cs index bd36c3f..ed6779d 100644 --- a/OpenSim/Framework/Statistics/AssetStatsCollector.cs +++ b/OpenSim/Framework/Statistics/AssetStatsCollector.cs @@ -37,35 +37,35 @@ namespace OpenSim.Framework.Statistics { private Timer ageStatsTimer = new Timer(24 * 60 * 60 * 1000); private DateTime startTime = DateTime.Now; - - private long assetRequestsToday; + + private long assetRequestsToday; private long assetRequestsNotFoundToday; private long assetRequestsYesterday; private long assetRequestsNotFoundYesterday; - + public long AssetRequestsToday { get { return assetRequestsToday; } } - public long AssetRequestsNotFoundToday { get { return assetRequestsNotFoundToday; } } + public long AssetRequestsNotFoundToday { get { return assetRequestsNotFoundToday; } } public long AssetRequestsYesterday { get { return assetRequestsYesterday; } } - public long AssetRequestsNotFoundYesterday { get { return assetRequestsNotFoundYesterday; } } - + public long AssetRequestsNotFoundYesterday { get { return assetRequestsNotFoundYesterday; } } + public AssetStatsCollector() { ageStatsTimer.Elapsed += new ElapsedEventHandler(OnAgeing); ageStatsTimer.Enabled = true; } - + private void OnAgeing(object source, ElapsedEventArgs e) { assetRequestsYesterday = assetRequestsToday; - + // There is a possibility that an asset request could occur between the execution of these // two statements. But we're better off without the synchronization overhead. - assetRequestsToday = 0; - + assetRequestsToday = 0; + assetRequestsNotFoundYesterday = assetRequestsNotFoundToday; assetRequestsNotFoundToday = 0; } - + /// /// Record that an asset request failed to find an asset /// @@ -73,7 +73,7 @@ namespace OpenSim.Framework.Statistics { assetRequestsNotFoundToday++; } - + /// /// Record that a request was made to the asset server /// @@ -90,10 +90,10 @@ namespace OpenSim.Framework.Statistics { double elapsedHours = (DateTime.Now - startTime).TotalHours; if (elapsedHours <= 0) { elapsedHours = 1; } // prevent divide by zero - + long assetRequestsTodayPerHour = (long)Math.Round(AssetRequestsToday / elapsedHours); long assetRequestsYesterdayPerHour = (long)Math.Round(AssetRequestsYesterday / 24.0); - + return string.Format( @"Asset requests today : {0} ({1} per hour) of which {2} were not found Asset requests yesterday : {3} ({4} per hour) of which {5} were not found", diff --git a/OpenSim/Framework/Statistics/Interfaces/IStatsCollector.cs b/OpenSim/Framework/Statistics/Interfaces/IStatsCollector.cs index 768cd22..e468fb2 100644 --- a/OpenSim/Framework/Statistics/Interfaces/IStatsCollector.cs +++ b/OpenSim/Framework/Statistics/Interfaces/IStatsCollector.cs @@ -26,7 +26,7 @@ */ namespace OpenSim.Framework.Statistics -{ +{ /// /// Implemented by classes which collect up non-viewer statistical information /// @@ -36,6 +36,6 @@ namespace OpenSim.Framework.Statistics /// Report back collected statistical information. /// /// - string Report(); + string Report(); } } diff --git a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs index fd021bc..2e7278b 100644 --- a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs +++ b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs @@ -32,20 +32,20 @@ using libsecondlife; using OpenSim.Framework.Statistics.Interfaces; namespace OpenSim.Framework.Statistics -{ +{ /// /// Collects sim statistics which aren't already being collected for the linden viewer's statistics pane /// public class SimExtraStatsCollector : IStatsCollector - { + { private long assetsInCache; - private long texturesInCache; + private long texturesInCache; private long assetCacheMemoryUsage; private long textureCacheMemoryUsage; private long blockedMissingTextureRequests; - + private long inventoryServiceRetrievalFailures; - + public long AssetsInCache { get { return assetsInCache; } } public long TexturesInCache { get { return texturesInCache; } } public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } } @@ -58,47 +58,47 @@ namespace OpenSim.Framework.Statistics /// driver bugs on clients (though this seems less likely). /// public long BlockedMissingTextureRequests { get { return blockedMissingTextureRequests; } } - + /// /// Number of known failures to retrieve avatar inventory from the inventory service. This does not /// cover situations where the inventory service accepts the request but never returns any data, since /// we do not yet timeout this situation. /// public long InventoryServiceRetrievalFailures { get { return inventoryServiceRetrievalFailures; } } - + /// /// Retain a dictionary of all packet queues stats reporters /// private IDictionary packetQueueStatsCollectors = new Dictionary(); - + public void AddAsset(AssetBase asset) { assetsInCache++; assetCacheMemoryUsage += asset.Data.Length; } - + public void AddTexture(AssetBase image) { if (image.Data != null) { texturesInCache++; - + // This could have been a pull stat, though there was originally a nebulous idea to measure flow rates textureCacheMemoryUsage += image.Data.Length; } - } - + } + public void AddBlockedMissingTextureRequest() { blockedMissingTextureRequests++; } - + public void AddInventoryServiceRetrievalFailure() { inventoryServiceRetrievalFailures++; } - + /// /// Register as a packet queue stats provider /// @@ -111,7 +111,7 @@ namespace OpenSim.Framework.Statistics packetQueueStatsCollectors[uuid] = new PacketQueueStatsCollector(provider); } } - + /// /// Deregister a packet queue stats provider /// @@ -129,25 +129,25 @@ namespace OpenSim.Framework.Statistics /// /// public string Report() - { + { StringBuilder sb = new StringBuilder(Environment.NewLine); sb.Append("ASSET STATISTICS"); - sb.Append(Environment.NewLine); + sb.Append(Environment.NewLine); sb.Append( string.Format( @"Asset cache contains {0,6} assets using {1,10:0.000}K" + Environment.NewLine, AssetsInCache, AssetCacheMemoryUsage / 1024.0)); - + sb.Append(Environment.NewLine); sb.Append("TEXTURE STATISTICS"); - sb.Append(Environment.NewLine); + sb.Append(Environment.NewLine); sb.Append( string.Format( @"Texture cache contains {0,6} textures using {1,10:0.000}K Blocked requests for missing textures: {2}" + Environment.NewLine, TexturesInCache, TextureCacheMemoryUsage / 1024.0, - BlockedMissingTextureRequests)); - + BlockedMissingTextureRequests)); + sb.Append(Environment.NewLine); sb.Append("INVENTORY STATISTICS"); sb.Append(Environment.NewLine); @@ -155,26 +155,26 @@ Blocked requests for missing textures: {2}" + Environment.NewLine, string.Format( "Initial inventory caching failures: {0}" + Environment.NewLine, InventoryServiceRetrievalFailures)); - + sb.Append(Environment.NewLine); sb.Append("PACKET QUEUE STATISTICS"); sb.Append(Environment.NewLine); sb.Append("Agent UUID "); sb.Append( string.Format( - " {0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7}", + " {0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7}", "Send", "In", "Out", "Resend", "Land", "Wind", "Cloud", "Task", "Texture", "Asset")); - sb.Append(Environment.NewLine); - + sb.Append(Environment.NewLine); + foreach (LLUUID key in packetQueueStatsCollectors.Keys) { sb.Append(string.Format("{0}: ", key)); sb.Append(packetQueueStatsCollectors[key].Report()); sb.Append(Environment.NewLine); } - + return sb.ToString(); - } + } } /// @@ -183,16 +183,16 @@ Blocked requests for missing textures: {2}" + Environment.NewLine, public class PacketQueueStatsCollector : IStatsCollector { private IPullStatsProvider m_statsProvider; - + public PacketQueueStatsCollector(IPullStatsProvider provider) { - m_statsProvider = provider; + m_statsProvider = provider; } - + /// /// Report back collected statistical information. /// - /// + /// public string Report() { return m_statsProvider.GetStats(); diff --git a/OpenSim/Framework/Statistics/StatsManager.cs b/OpenSim/Framework/Statistics/StatsManager.cs index 3c97dde..41de3f3 100644 --- a/OpenSim/Framework/Statistics/StatsManager.cs +++ b/OpenSim/Framework/Statistics/StatsManager.cs @@ -26,7 +26,7 @@ */ namespace OpenSim.Framework.Statistics -{ +{ /// /// Singleton used to provide access to statistics reporters /// @@ -34,44 +34,44 @@ namespace OpenSim.Framework.Statistics { private static AssetStatsCollector assetStats; private static UserStatsCollector userStats; - private static SimExtraStatsCollector simExtraStats; - + private static SimExtraStatsCollector simExtraStats; + public static AssetStatsCollector AssetStats { get { return assetStats; } } public static UserStatsCollector UserStats { get { return userStats; } } public static SimExtraStatsCollector SimExtraStats { get { return simExtraStats; } } - + private StatsManager() {} - + /// /// Start collecting statistics related to assets. /// Should only be called once. - /// + /// public static AssetStatsCollector StartCollectingAssetStats() { assetStats = new AssetStatsCollector(); - + return assetStats; } - + /// /// Start collecting statistics related to users. /// Should only be called once. - /// + /// public static UserStatsCollector StartCollectingUserStats() { userStats = new UserStatsCollector(); - + return userStats; - } - + } + /// - /// Start collecting extra sim statistics apart from those collected for the client. + /// Start collecting extra sim statistics apart from those collected for the client. /// Should only be called once. /// public static SimExtraStatsCollector StartCollectingSimExtraStats() { simExtraStats = new SimExtraStatsCollector(); - + return simExtraStats; } } diff --git a/OpenSim/Framework/Statistics/UserStatsCollector.cs b/OpenSim/Framework/Statistics/UserStatsCollector.cs index f0f0417..c7fe7c2 100644 --- a/OpenSim/Framework/Statistics/UserStatsCollector.cs +++ b/OpenSim/Framework/Statistics/UserStatsCollector.cs @@ -35,43 +35,43 @@ namespace OpenSim.Framework.Statistics public class UserStatsCollector : IStatsCollector { private Timer ageStatsTimer = new Timer(24 * 60 * 60 * 1000); - + private int successfulLoginsToday; public int SuccessfulLoginsToday { get { return successfulLoginsToday; } } - + private int successfulLoginsYesterday; - public int SuccessfulLoginsYesterday { get { return successfulLoginsYesterday; } } - + public int SuccessfulLoginsYesterday { get { return successfulLoginsYesterday; } } + private int successfulLogins; public int SuccessfulLogins { get { return successfulLogins; } } - + private int logouts; public int Logouts { get { return logouts; } } - + public UserStatsCollector() { ageStatsTimer.Elapsed += new ElapsedEventHandler(OnAgeing); ageStatsTimer.Enabled = true; } - + private void OnAgeing(object source, ElapsedEventArgs e) { successfulLoginsYesterday = successfulLoginsToday; - + // There is a possibility that an asset request could occur between the execution of these // two statements. But we're better off without the synchronization overhead. - successfulLoginsToday = 0; + successfulLoginsToday = 0; } - + /// /// Record a successful login /// public void AddSuccessfulLogin() { - successfulLogins++; + successfulLogins++; successfulLoginsToday++; } - + public void AddLogout() { logouts++; diff --git a/OpenSim/Framework/TaskInventoryItem.cs b/OpenSim/Framework/TaskInventoryItem.cs index d01c4c1..f92d150 100644 --- a/OpenSim/Framework/TaskInventoryItem.cs +++ b/OpenSim/Framework/TaskInventoryItem.cs @@ -38,7 +38,7 @@ namespace OpenSim.Framework { /// /// A dictionary for task inventory. - /// + /// /// This class is not thread safe. Callers must synchronize on Dictionary methods. /// public class TaskInventoryDictionary : Dictionary, @@ -72,10 +72,10 @@ namespace OpenSim.Framework // // System.TypeInitializationException: An exception was thrown by the type initializer for OpenSim.Framework.TaskInventoryDictionary ---> System.ArgumentOutOfRangeException: < 0 // Parameter name: length - // at System.String.Substring (Int32 startIndex, Int32 length) [0x00088] in /build/buildd/mono-1.2.4/mcs/class/corlib/System/String.cs:381 - // at System.Xml.Serialization.TypeTranslator.GetTypeData (System.Type runtimeType, System.String xmlDataType) [0x001f6] in /build/buildd/mono-1.2.4/mcs/class/System.XML/System.Xml.Serialization/TypeTranslator.cs:217 + // at System.String.Substring (Int32 startIndex, Int32 length) [0x00088] in /build/buildd/mono-1.2.4/mcs/class/corlib/System/String.cs:381 + // at System.Xml.Serialization.TypeTranslator.GetTypeData (System.Type runtimeType, System.String xmlDataType) [0x001f6] in /build/buildd/mono-1.2.4/mcs/class/System.XML/System.Xml.Serialization/TypeTranslator.cs:217 // ... -// private static XmlSerializer tiiSerializer +// private static XmlSerializer tiiSerializer // = new XmlSerializer(typeof(Dictionary.ValueCollection)); // see IXmlSerializable @@ -110,7 +110,7 @@ namespace OpenSim.Framework m_log.DebugFormat("[TASK INVENTORY]: Skipping empty element {0}", reader.Name); } - // For some .net implementations, this last read is necessary so that we advance beyond the end tag + // For some .net implementations, this last read is necessary so that we advance beyond the end tag // of the element wrapping this object so that the rest of the serialization can complete normally. reader.Read(); @@ -221,7 +221,7 @@ namespace OpenSim.Framework public uint NextOwnerMask = FULL_MASK_PERMISSIONS_GENERAL; public LLUUID OwnerID = LLUUID.Zero; public uint OwnerMask = FULL_MASK_PERMISSIONS_GENERAL; - public LLUUID ParentID = LLUUID.Zero; //parent folder id + public LLUUID ParentID = LLUUID.Zero; //parent folder id public LLUUID ParentPartID = LLUUID.Zero; public LLUUID PermsGranter; public int PermsMask; diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 5577140..8e5b02d 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs @@ -165,10 +165,10 @@ namespace OpenSim.Framework // (but those probably wont work anyway) return file; } - + /// /// Debug utility function to convert unbroken strings of XML into something human readable for occasional debugging purposes. - /// + /// /// Please don't delete me even if I appear currently unused! /// /// @@ -177,22 +177,22 @@ namespace OpenSim.Framework { XmlDocument xd = new XmlDocument(); xd.LoadXml(rawXml); - + StringBuilder sb = new StringBuilder(); - StringWriter sw = new StringWriter(sb); - + StringWriter sw = new StringWriter(sb); + XmlTextWriter xtw = new XmlTextWriter(sw); xtw.Formatting = Formatting.Indented; - + try { xd.WriteTo(xtw); } finally { - xtw.Close(); + xtw.Close(); } - + return sb.ToString(); } @@ -284,11 +284,11 @@ namespace OpenSim.Framework /// Convert a variable length field (byte array) to a string, with a /// field name prepended to each line of the output /// - /// If the byte array has unprintable characters in it, a + /// If the byte array has unprintable characters in it, a /// hex dump will be put in the string instead /// The byte array to convert to a string /// A field name to prepend to each line of output - /// An ASCII string or a string containing a hex dump, minus + /// An ASCII string or a string containing a hex dump, minus /// the null terminator public static string FieldToString(byte[] bytes, string fieldName) { diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs index 1b1f9c7..2aca8ff 100644 --- a/OpenSim/Grid/AssetServer/Main.cs +++ b/OpenSim/Grid/AssetServer/Main.cs @@ -48,11 +48,11 @@ namespace OpenSim.Grid.AssetServer public AssetConfig m_config; - public static OpenAsset_Main assetserver; - + public static OpenAsset_Main assetserver; + // Temporarily hardcoded - should be a plugin - protected IAssetLoader assetLoader = new AssetLoaderFileSystem(); - + protected IAssetLoader assetLoader = new AssetLoaderFileSystem(); + private IAssetProvider m_assetProvider; [STAThread] @@ -81,7 +81,7 @@ namespace OpenSim.Grid.AssetServer public OpenAsset_Main() { m_console = new ConsoleBase("OpenAsset", this); - + MainConsole.Instance = m_console; } @@ -166,7 +166,7 @@ namespace OpenSim.Grid.AssetServer public void LoadDefaultAssets() { - assetLoader.ForEachDefaultXmlAsset(StoreAsset); + assetLoader.ForEachDefaultXmlAsset(StoreAsset); } protected void StoreAsset(AssetBase asset) @@ -177,9 +177,9 @@ namespace OpenSim.Grid.AssetServer public override void RunCmd(string cmd, string[] cmdparams) { base.RunCmd(cmd, cmdparams); - + switch (cmd) - { + { case "shutdown": m_console.Close(); Environment.Exit(0); diff --git a/OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs b/OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs index 6f219a6..52c6e8e 100644 --- a/OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs +++ b/OpenSim/Grid/AssetServer/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,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/Grid/AssetServer/RestService.cs b/OpenSim/Grid/AssetServer/RestService.cs index ece826e..fcf99cd 100644 --- a/OpenSim/Grid/AssetServer/RestService.cs +++ b/OpenSim/Grid/AssetServer/RestService.cs @@ -58,7 +58,7 @@ namespace OpenSim.Grid.AssetServer m_assetManager = assetManager; m_assetProvider = assetProvider; } - + public override byte[] Handle(string path, Stream request) { string param = GetParam(path); @@ -68,18 +68,18 @@ namespace OpenSim.Grid.AssetServer if (p.Length > 0) { - LLUUID assetID = null; - + LLUUID assetID = null; + if (!LLUUID.TryParse(p[0], out assetID)) { m_log.InfoFormat( "[REST]: GET:/asset ignoring request with malformed UUID {0}", p[0]); return result; - } + } if (StatsManager.AssetStats != null) StatsManager.AssetStats.AddRequest(); - + AssetBase asset = m_assetProvider.FetchAsset(assetID); if (asset != null) { @@ -94,7 +94,7 @@ namespace OpenSim.Grid.AssetServer //StreamReader sr = new StreamReader(ms); result = ms.GetBuffer(); - + m_log.InfoFormat( "[REST]: GET:/asset found {0} with name {1}, size {2} bytes", assetID, asset.Name, result.Length); @@ -105,13 +105,13 @@ namespace OpenSim.Grid.AssetServer { if (StatsManager.AssetStats != null) StatsManager.AssetStats.AddNotFoundRequest(); - + m_log.InfoFormat("[REST]: GET:/asset failed to find {0}", assetID); } } - return result; - } + return result; + } } public class PostAssetStreamHandler : BaseStreamHandler diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs index c2c212c..83b5319 100644 --- a/OpenSim/Grid/GridServer/GridManager.cs +++ b/OpenSim/Grid/GridServer/GridManager.cs @@ -243,22 +243,22 @@ namespace OpenSim.Grid.GridServer /// /// Checks that it's valid to replace the existing region data with new data - /// - /// Currently, this means ensure that the keys passed in by the new region + /// + /// Currently, this means ensure that the keys passed in by the new region /// match those in the original region. (XXX Is this correct? Shouldn't we simply check /// against the keys in the current configuration?) /// /// - /// + /// protected virtual void ValidateOverwriteKeys(RegionProfileData sim, RegionProfileData existingSim) - { + { if (!(existingSim.regionRecvKey == sim.regionRecvKey && existingSim.regionSendKey == sim.regionSendKey)) { throw new LoginException( String.Format( "Authentication failed when trying to login existing region {0} at location {1} {2} currently occupied by {3}" + " with the region's send key {4} (expected {5}) and the region's receive key {6} (expected {7})", - sim.regionName, sim.regionLocX, sim.regionLocY, existingSim.regionName, + sim.regionName, sim.regionLocX, sim.regionLocY, existingSim.regionName, sim.regionSendKey, existingSim.regionSendKey, sim.regionRecvKey, existingSim.regionRecvKey), "The keys required to login your region did not match the grid server keys. Please check your grid send and receive keys."); } @@ -266,25 +266,25 @@ namespace OpenSim.Grid.GridServer /// /// Checks that the new region data is valid. - /// - /// Currently, this means checking that the keys passed in by the new region + /// + /// Currently, this means checking that the keys passed in by the new region /// match those in the grid server's configuration. /// - /// + /// /// /// Thrown if region login failed protected virtual void ValidateNewRegionKeys(RegionProfileData sim) - { + { if (!(sim.regionRecvKey == Config.SimSendKey && sim.regionSendKey == Config.SimRecvKey)) { throw new LoginException( String.Format( "Authentication failed when trying to login new region {0} at location {1} {2}" + " with the region's send key {3} (expected {4}) and the region's receive key {5} (expected {6})", - sim.regionName, sim.regionLocX, sim.regionLocY, + sim.regionName, sim.regionLocX, sim.regionLocY, sim.regionSendKey, Config.SimRecvKey, sim.regionRecvKey, Config.SimSendKey), "The keys required to login your region did not match your existing region keys. Please check your grid send and receive keys."); - } + } } /// @@ -295,13 +295,13 @@ namespace OpenSim.Grid.GridServer protected virtual void ValidateRegionContactable(RegionProfileData sim) { string regionStatusUrl = String.Format("{0}{1}", sim.httpServerURI, "simstatus/"); - string regionStatusResponse; - + string regionStatusResponse; + RestClient rc = new RestClient(regionStatusUrl); - rc.RequestMethod = "GET"; - + rc.RequestMethod = "GET"; + m_log.DebugFormat("[LOGIN]: Contacting {0} for status of region {1}", regionStatusUrl, sim.regionName); - + try { Stream rs = rc.Request(); @@ -314,21 +314,21 @@ namespace OpenSim.Grid.GridServer throw new LoginException( String.Format("Region status request to {0} failed", regionStatusUrl), String.Format( - "The grid service could not contact the http url {0} at your region. Please make sure this url is reachable by the grid service", + "The grid service could not contact the http url {0} at your region. Please make sure this url is reachable by the grid service", regionStatusUrl), e); - } - + } + if (!regionStatusResponse.Equals("OK")) { throw new LoginException( String.Format( - "Region {0} at {1} returned status response {2} rather than {3}", + "Region {0} at {1} returned status response {2} rather than {3}", sim.regionName, regionStatusUrl, regionStatusResponse, "OK"), String.Format( "When the grid service asked for the status of your region, it received the response {0} rather than {1}. Please check your status", regionStatusResponse, "OK")); - } + } } /// @@ -373,11 +373,11 @@ namespace OpenSim.Grid.GridServer m_log.Warn("[LOGIN PRELUDE]: Invalid login parameters, sending back error response."); return ErrorResponse("Wrong format in login parameters. Please verify parameters." + e.ToString()); } - + m_log.InfoFormat("[LOGIN BEGIN]: Received login request from simulator: {0}", sim.regionName); existingSim = GetRegion(sim.regionHandle); - + if (existingSim == null || existingSim.UUID == sim.UUID || sim.UUID != sim.originUUID) { try @@ -390,13 +390,13 @@ namespace OpenSim.Grid.GridServer { ValidateOverwriteKeys(sim, existingSim); } - + ValidateRegionContactable(sim); } catch (LoginException e) { m_log.WarnFormat("[LOGIN END]: {0}", e.Message); - + return e.XmlRpcErrorResponse; } @@ -489,7 +489,7 @@ namespace OpenSim.Grid.GridServer responseData["allow_forceful_banlines"] = Config.AllowForcefulBanlines; // Instead of sending a multitude of message servers to the registering sim - // we should probably be sending a single one and parhaps it's backup + // we should probably be sending a single one and parhaps it's backup // that has responsibility over routing it's messages. // The Sim won't be contacting us again about any of the message server stuff during it's time up. @@ -583,7 +583,7 @@ namespace OpenSim.Grid.GridServer sim.regionRecvKey = String.Empty; sim.regionSendKey = String.Empty; - + if (requestData.ContainsKey("region_secret")) { string regionsecret = (string)requestData["region_secret"]; @@ -596,8 +596,8 @@ namespace OpenSim.Grid.GridServer else { sim.regionSecret = Config.SimRecvKey; - } - + } + sim.regionDataURI = String.Empty; sim.regionAssetURI = Config.DefaultAssetServer; sim.regionAssetRecvKey = Config.AssetRecvKey; @@ -626,7 +626,7 @@ namespace OpenSim.Grid.GridServer // not at all. Current strategy is to put the code in place to support the validity of this information // and to roll forward debugging any issues from that point // - // this particular section of the mod attempts to receive a value from the region's xml file by way of + // this particular section of the mod attempts to receive a value from the region's xml file by way of // OSG1GridServices for the region's owner sim.owner_uuid = (string)requestData["master_avatar_uuid"]; @@ -1120,7 +1120,7 @@ namespace OpenSim.Grid.GridServer return response; } } - + /// /// Exception generated when a simulator fails to login to the grid /// @@ -1147,6 +1147,6 @@ namespace OpenSim.Grid.GridServer { // FIXME: Might be neater to refactor and put the method inside here m_xmlRpcErrorResponse = GridManager.ErrorResponse(xmlRpcMessage); - } + } } } diff --git a/OpenSim/Grid/GridServer/IGridPlugin.cs b/OpenSim/Grid/GridServer/IGridPlugin.cs index fbadfce..47273a2 100644 --- a/OpenSim/Grid/GridServer/IGridPlugin.cs +++ b/OpenSim/Grid/GridServer/IGridPlugin.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 Mono.Addins; diff --git a/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs b/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs index 1468edd..67cff8f 100644 --- a/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs +++ b/OpenSim/Grid/GridServer/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,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/Grid/InventoryServer/GridInventoryService.cs b/OpenSim/Grid/InventoryServer/GridInventoryService.cs index 80f0c5e..5388263 100644 --- a/OpenSim/Grid/InventoryServer/GridInventoryService.cs +++ b/OpenSim/Grid/InventoryServer/GridInventoryService.cs @@ -43,7 +43,7 @@ namespace OpenSim.Grid.InventoryServer /// public class GridInventoryService : InventoryServiceBase { - private static readonly ILog m_log + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public override void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback) @@ -56,31 +56,31 @@ namespace OpenSim.Grid.InventoryServer /// /// The user's inventory. If an inventory cannot be found then an empty collection is returned. public InventoryCollection GetUserInventory(Guid rawUserID) - { + { LLUUID userID = new LLUUID(rawUserID); m_log.InfoFormat("[GRID AGENT INVENTORY]: Processing request for inventory of {0}", userID); - + // Uncomment me to simulate a slow responding inventory server //Thread.Sleep(16000); InventoryCollection invCollection = new InventoryCollection(); - + List allFolders = GetInventorySkeleton(userID); - + if (null == allFolders) { m_log.WarnFormat("[GRID AGENT INVENTORY]: No inventory found for user {0}", rawUserID); - + return invCollection; } - + List allItems = new List(); foreach (InventoryFolderBase folder in allFolders) { List items = RequestFolderItems(folder.ID); - + if (items != null) { allItems.InsertRange(0, items); @@ -88,36 +88,36 @@ namespace OpenSim.Grid.InventoryServer } invCollection.UserID = userID; - invCollection.Folders = allFolders; - invCollection.Items = allItems; - + invCollection.Folders = allFolders; + invCollection.Items = allItems; + // foreach (InventoryFolderBase folder in invCollection.Folders) // { // m_log.DebugFormat("[GRID AGENT INVENTORY]: Sending back folder {0} {1}", folder.Name, folder.ID); // } -// +// // foreach (InventoryItemBase item in invCollection.Items) // { // m_log.DebugFormat("[GRID AGENT INVENTORY]: Sending back item {0} {1}, folder {2}", item.Name, item.ID, item.Folder); // } - + m_log.InfoFormat( "[GRID AGENT INVENTORY]: Sending back inventory response to user {0} containing {1} folders and {2} items", - invCollection.UserID, invCollection.Folders.Count, invCollection.Items.Count); - + invCollection.UserID, invCollection.Folders.Count, invCollection.Items.Count); + return invCollection; } - + /// /// Guid to UUID wrapper for same name IInventoryServices method /// /// - /// + /// public List GetInventorySkeleton(Guid rawUserID) - { + { LLUUID userID = new LLUUID(rawUserID); return GetInventorySkeleton(userID); - } + } /// /// Create an inventory for the given user. diff --git a/OpenSim/Grid/InventoryServer/Main.cs b/OpenSim/Grid/InventoryServer/Main.cs index 2279191..b7c46c2 100644 --- a/OpenSim/Grid/InventoryServer/Main.cs +++ b/OpenSim/Grid/InventoryServer/Main.cs @@ -41,7 +41,7 @@ namespace OpenSim.Grid.InventoryServer public class OpenInventory_Main : BaseOpenSimServer, conscmd_callback { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - + private InventoryConfig m_config; private GridInventoryService m_inventoryService; @@ -73,7 +73,7 @@ namespace OpenSim.Grid.InventoryServer m_inventoryService.AddPlugin(m_config.DatabaseProvider, m_config.DatabaseConnect); m_log.Info("[" + LogName + "]: Starting HTTP server ..."); - + m_httpServer = new BaseHttpServer(m_config.HttpPort); AddHttpHandlers(); m_httpServer.Start(); @@ -86,11 +86,11 @@ namespace OpenSim.Grid.InventoryServer m_httpServer.AddStreamHandler( new RestDeserialisehandler( "POST", "/GetInventory/", m_inventoryService.GetUserInventory)); - + m_httpServer.AddStreamHandler( new RestDeserialisehandler( "POST", "/CreateInventory/", m_inventoryService.CreateUsersInventory)); - + m_httpServer.AddStreamHandler( new RestDeserialisehandler( "POST", "/NewFolder/", m_inventoryService.AddFolder)); @@ -98,15 +98,15 @@ namespace OpenSim.Grid.InventoryServer m_httpServer.AddStreamHandler( new RestDeserialisehandler( "POST", "/MoveFolder/", m_inventoryService.MoveFolder)); - + m_httpServer.AddStreamHandler( new RestDeserialisehandler( - "POST", "/PurgeFolder/", m_inventoryService.PurgeFolder)); + "POST", "/PurgeFolder/", m_inventoryService.PurgeFolder)); m_httpServer.AddStreamHandler( new RestDeserialisehandler( "POST", "/NewItem/", m_inventoryService.AddItem)); - + m_httpServer.AddStreamHandler( new RestDeserialisehandler( "POST", "/DeleteItem/", m_inventoryService.DeleteItem)); @@ -134,7 +134,7 @@ namespace OpenSim.Grid.InventoryServer public override void RunCmd(string cmd, string[] cmdparams) { base.RunCmd(cmd, cmdparams); - + switch (cmd) { case "add-user": diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/Util.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/Util.cs index aff4719..06e2f8a 100644 --- a/OpenSim/Grid/Manager/OpenGridServices.Manager/Util.cs +++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/Util.cs @@ -82,11 +82,11 @@ namespace OpenSim.Framework.Utilities /// Convert a variable length field (byte array) to a string, with a /// field name prepended to each line of the output /// - /// If the byte array has unprintable characters in it, a + /// If the byte array has unprintable characters in it, a /// hex dump will be put in the string instead /// The byte array to convert to a string /// A field name to prepend to each line of output - /// An ASCII string or a string containing a hex dump, minus + /// An ASCII string or a string containing a hex dump, minus /// the null terminator public static string FieldToString(byte[] bytes, string fieldName) { diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs index a5a4ec8..27f0d8a 100644 --- a/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs +++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs @@ -29,8 +29,8 @@ // // This code was generated by a tool. // Mono Runtime Version: 2.0.50727.42 -// -// Changes to this file may cause incorrect behavior and will be lost if +// +// Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // // ------------------------------------------------------------------------------ @@ -52,7 +52,7 @@ namespace OpenGridServices.Manager private Gtk.Entry entry3; private Gtk.Button button2; private Gtk.Button button8; - + protected virtual void Build() { Stetic.Gui.Initialize(); diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs index 9707aee..068b9c6 100644 --- a/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs +++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs @@ -29,8 +29,8 @@ // // This code was generated by a tool. // Mono Runtime Version: 2.0.50727.42 -// -// Changes to this file may cause incorrect behavior and will be lost if +// +// Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // // ------------------------------------------------------------------------------ @@ -74,7 +74,7 @@ namespace OpenGridServices.Manager private Gtk.DrawingArea drawingarea1; private Gtk.TreeView treeview1; private Gtk.Statusbar statusbar1; - + protected virtual void Build() { Stetic.Gui.Initialize(); diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/generated.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/generated.cs index 46dec05..b5fd3f7 100644 --- a/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/generated.cs +++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/generated.cs @@ -29,8 +29,8 @@ // // This code was generated by a tool. // Mono Runtime Version: 2.0.50727.42 -// -// Changes to this file may cause incorrect behavior and will be lost if +// +// Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // // ------------------------------------------------------------------------------ @@ -40,20 +40,20 @@ namespace Stetic internal class Gui { private static bool initialized; - + internal static void Initialize() { Stetic.Gui.initialized = true; } } - + internal class ActionGroups { public static Gtk.ActionGroup GetActionGroup(System.Type type) { return Stetic.ActionGroups.GetActionGroup(type.FullName); } - + public static Gtk.ActionGroup GetActionGroup(string name) { return null; diff --git a/OpenSim/Grid/MessagingServer/Main.cs b/OpenSim/Grid/MessagingServer/Main.cs index 9020ca4..7e9456d 100644 --- a/OpenSim/Grid/MessagingServer/Main.cs +++ b/OpenSim/Grid/MessagingServer/Main.cs @@ -45,7 +45,7 @@ namespace OpenSim.Grid.MessagingServer private MessageServerConfig Cfg; private MessageService msgsvc; - + private LLUUID m_lastCreatedUser = LLUUID.Random(); [STAThread] @@ -55,7 +55,7 @@ namespace OpenSim.Grid.MessagingServer m_log.Info("Launching MessagingServer..."); - + OpenMessage_Main messageserver = new OpenMessage_Main(); @@ -118,7 +118,7 @@ namespace OpenSim.Grid.MessagingServer switch (what) { case "user": - + try { //userID = @@ -140,12 +140,12 @@ namespace OpenSim.Grid.MessagingServer // m_lastCreatedUser = userID; break; } - } + } public override void Shutdown() { msgsvc.deregisterWithUserServer(); - + base.Shutdown(); } } diff --git a/OpenSim/Grid/MessagingServer/MessageService.cs b/OpenSim/Grid/MessagingServer/MessageService.cs index f9f3669..e1beef1 100644 --- a/OpenSim/Grid/MessagingServer/MessageService.cs +++ b/OpenSim/Grid/MessagingServer/MessageService.cs @@ -63,13 +63,13 @@ namespace OpenSim.Grid.MessagingServer { m_cfg = cfg; } - + #region RegionComms Methods #endregion #region FriendList Methods - + /// /// Process Friendlist subscriptions for a user /// The login method calls this for a User @@ -93,7 +93,7 @@ namespace OpenSim.Grid.MessagingServer { UserPresenceData friendup = (UserPresenceData)m_presences[uFriendList[i].Friend]; // Add backreference - + SubscribeToPresenceUpdates(userpresence, friendup, uFriendList[i],i); } } @@ -101,14 +101,14 @@ namespace OpenSim.Grid.MessagingServer /// /// Does the necessary work to subscribe one agent to another's presence notifications - /// Gets called by ProcessFriendListSubscriptions. You shouldn't call this directly + /// Gets called by ProcessFriendListSubscriptions. You shouldn't call this directly /// unless you know what you're doing /// /// P1 /// P2 /// /// - public void SubscribeToPresenceUpdates(UserPresenceData userpresence, UserPresenceData friendpresence, + public void SubscribeToPresenceUpdates(UserPresenceData userpresence, UserPresenceData friendpresence, FriendListItem uFriendListItem, int uFriendListIndex) { if ((uFriendListItem.FriendListOwnerPerms & (uint)FriendRights.CanSeeOnline) != 0) @@ -117,7 +117,7 @@ namespace OpenSim.Grid.MessagingServer if (!friendpresence.subscriptionData.Contains(friendpresence.agentData.AgentID)) { userpresence.subscriptionData.Add(friendpresence.agentData.AgentID); - //Send Region Notice.... + //Send Region Notice.... } else { @@ -149,13 +149,13 @@ namespace OpenSim.Grid.MessagingServer WaitCallback cb2 = new WaitCallback(friendlistupdater.go); ThreadPool.QueueUserWorkItem(cb2); - + //SendRegionPresenceUpdate(userpresence, friendpresence); } } /// - /// Adds a backreference so presence specific data doesn't have to be + /// Adds a backreference so presence specific data doesn't have to be /// enumerated for each logged in user every time someone logs on or off. /// /// @@ -194,7 +194,7 @@ namespace OpenSim.Grid.MessagingServer presenseBackReferences.Remove(agentID); } - // If there are no more backreferences for this agent, + // If there are no more backreferences for this agent, // remove it to free up memory. if (presenseBackReferences.Count == 0) { @@ -276,7 +276,7 @@ namespace OpenSim.Grid.MessagingServer } } } - + #endregion #region UserServer Comms @@ -342,7 +342,7 @@ namespace OpenSim.Grid.MessagingServer /// /// UserServer sends an expect_user method - /// this handles the method and provisions the + /// this handles the method and provisions the /// necessary info for presence to work /// /// UserServer Data @@ -398,9 +398,9 @@ namespace OpenSim.Grid.MessagingServer return new XmlRpcResponse(); } - + /// - /// The UserServer got a Logoff message + /// The UserServer got a Logoff message /// Cleanup time for that user. Send out presence notifications /// /// @@ -408,7 +408,7 @@ namespace OpenSim.Grid.MessagingServer public XmlRpcResponse UserLoggedOff(XmlRpcRequest request) { Hashtable requestData = (Hashtable)request.Params[0]; - + LLUUID AgentID = new LLUUID((string)requestData["agentid"]); ProcessLogOff(AgentID); @@ -433,7 +433,7 @@ namespace OpenSim.Grid.MessagingServer { regionInfo = (RegionProfileData)m_regionInfoCache[regionhandle]; } - else + else { regionInfo = RequestRegionInfo(regionhandle); } @@ -457,7 +457,7 @@ namespace OpenSim.Grid.MessagingServer SendParams.Add(requestData); XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams); XmlRpcResponse GridResp = GridReq.Send(m_cfg.GridServerURL, 3000); - + Hashtable responseData = (Hashtable)GridResp.Value; if (responseData.ContainsKey("error")) @@ -479,7 +479,7 @@ namespace OpenSim.Grid.MessagingServer regionProfile.regionHandle = Helpers.UIntsToLong((regX * Constants.RegionSize), (regY * Constants.RegionSize)); regionProfile.regionLocX = regX; regionProfile.regionLocY = regY; - + regionProfile.remotingPort = Convert.ToUInt32((string)responseData["remoting_port"]); regionProfile.UUID = new LLUUID((string)responseData["region_UUID"]); regionProfile.regionName = (string)responseData["region_name"]; @@ -498,7 +498,7 @@ namespace OpenSim.Grid.MessagingServer " - Is the GridServer down?"); return null; } - + return regionProfile; } @@ -506,19 +506,19 @@ namespace OpenSim.Grid.MessagingServer { Hashtable UserParams = new Hashtable(); // Login / Authentication - + if (m_cfg.HttpSSL) { UserParams["uri"] = "https://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort; } - else + else { UserParams["uri"] = "http://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort; } UserParams["recvkey"] = m_cfg.UserRecvKey; UserParams["sendkey"] = m_cfg.UserRecvKey; - + // Package into an XMLRPC Request ArrayList SendParams = new ArrayList(); SendParams.Add(UserParams); diff --git a/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs b/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs index df3bc22..a0aeacc 100644 --- a/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs +++ b/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs @@ -48,9 +48,9 @@ namespace OpenSim.Grid.MessagingServer : base("GET", "/presence") { m_log.Info("[REST]: In Get Request"); - + } - + public override byte[] Handle(string path, Stream request) { string param = GetParam(path); @@ -61,8 +61,8 @@ namespace OpenSim.Grid.MessagingServer if (p.Length > 0) { - LLUUID assetID = null; - + LLUUID assetID = null; + if (!LLUUID.TryParse(p[0], out assetID)) { m_log.InfoFormat( @@ -101,7 +101,7 @@ namespace OpenSim.Grid.MessagingServer public PostXMPPStreamHandler() : base("POST", "/presence") { - + } } diff --git a/OpenSim/Grid/ScriptEngine/Common/Properties/AssemblyInfo.cs b/OpenSim/Grid/ScriptEngine/Common/Properties/AssemblyInfo.cs index 3d06232..d18822c 100644 --- a/OpenSim/Grid/ScriptEngine/Common/Properties/AssemblyInfo.cs +++ b/OpenSim/Grid/ScriptEngine/Common/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,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/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs index 072c86c..639cd54 100644 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs +++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs @@ -165,7 +165,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSL // if level == 0, add to return if (ilevel == 1 && lastlevel == 0) { - // 0 => 1: Get last + // 0 => 1: Get last Match m = Regex.Match(cache, @"(?![a-zA-Z_]+)\s*([a-zA-Z_]+)[^a-zA-Z_\(\)]*{", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs index f957d63..60f4d42 100644 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs +++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs @@ -98,9 +98,9 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSL ads.ConfigurationFile ); - // Display the name of the calling AppDomain and the name + // Display the name of the calling AppDomain and the name // of the second domain. - // NOTE: The application's thread has transitioned between + // NOTE: The application's thread has transitioned between // AppDomains. Console.WriteLine("Calling to '{0}'.", Thread.GetDomain().FriendlyName diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSO/Engine.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSO/Engine.cs index 4ec8618..f7c8fb1 100644 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSO/Engine.cs +++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSO/Engine.cs @@ -167,7 +167,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSO Common.SendToDebug("IL_CREATE_CONSTRUCTOR()"); //ConstructorBuilder constructor = typeBuilder.DefineConstructor( // MethodAttributes.Public, - // CallingConventions.Standard, + // CallingConventions.Standard, // new Type[0]); ConstructorBuilder constructor = typeBuilder.DefineConstructor( MethodAttributes.Public | @@ -191,8 +191,8 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSO //// Create state object //FieldName = "State"; //FieldBuilder State_fb = typeBuilder.DefineField( - // FieldName, - // typeof(UInt32), + // FieldName, + // typeof(UInt32), // FieldAttributes.Public); //il.Emit(OpCodes.Ldarg_0); //il.Emit(OpCodes.Ldc_I4, 0); @@ -205,8 +205,8 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSO //FieldName = "LSL_BuiltIns"; //FieldBuilder LSL_BuiltIns_fb = typeBuilder.DefineField( - // FieldName, - // objType1, + // FieldName, + // objType1, // FieldAttributes.Public); ////LSL_BuiltIn_Commands_TestImplementation _ti = new LSL_BuiltIn_Commands_TestImplementation(); diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_BaseClass_OPCODES.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_BaseClass_OPCODES.cs index 05f7611..11b567e 100644 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_BaseClass_OPCODES.cs +++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_BaseClass_OPCODES.cs @@ -36,9 +36,9 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSO * * These are internal "assembly" commands, * basic operators like "ADD", "PUSH" and "POP" - * + * * It also contains managed stack and keeps track of internal variables, etc. - * + * */ diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSO/LSO_Parser.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSO/LSO_Parser.cs index 9189bf6..25d1211 100644 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSO/LSO_Parser.cs +++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSO/LSO_Parser.cs @@ -75,7 +75,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSO /// public void Parse() { - // The LSO Format consist of 6 major blocks: header, statics, functions, states, heap, and stack. + // The LSO Format consist of 6 major blocks: header, statics, functions, states, heap, and stack. // HEADER BLOCK @@ -295,7 +295,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSO myEventCodeChunk = new LSO_Struct.CodeChunk[myStateFrameBlock.StateCount]; for (int i = 0; i < myStateFrameBlock.StateCount; i++) { - // TODO: Somehow organize events and functions so they can be found again, + // TODO: Somehow organize events and functions so they can be found again, // two level search ain't no good for (int ii = 0; ii < myStateFrameBlock.StatePointer[i].EventMask.Count - 1; ii++) { @@ -373,7 +373,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSO //private byte[] br_read_smallendian(int len) //{ - // byte[] bytes = new byte[len]; + // byte[] bytes = new byte[len]; // br.Read(bytes,0, len); // return bytes; //} diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/EventManager.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/EventManager.cs index d724d22..0d2d7cf 100644 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/EventManager.cs +++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/EventManager.cs @@ -67,7 +67,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine public void OnRezScript(uint localID, LLUUID itemID, string script) { //myScriptEngine.myScriptManager.StartScript( - // Path.Combine("ScriptEngines", "Default.lsl"), + // Path.Combine("ScriptEngines", "Default.lsl"), // new OpenSim.Region.Environment.Scenes.Scripting.NullScriptHost() //); Console.WriteLine("OnRezScript localID: " + localID + " LLUID: " + itemID.ToString() + " Size: " + @@ -78,7 +78,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine public void OnRemoveScript(uint localID, LLUUID itemID) { //myScriptEngine.myScriptManager.StartScript( - // Path.Combine("ScriptEngines", "Default.lsl"), + // Path.Combine("ScriptEngines", "Default.lsl"), // new OpenSim.Region.Environment.Scenes.Scripting.NullScriptHost() //); Console.WriteLine("OnRemoveScript localID: " + localID + " LLUID: " + itemID.ToString()); diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/Properties/AssemblyInfo.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/Properties/AssemblyInfo.cs index 351f26b..060ae0b 100644 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/Properties/AssemblyInfo.cs +++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/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/Grid/ScriptServer/Properties/AssemblyInfo.cs b/OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs index e4161d3..0ec6d6c 100644 --- a/OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs +++ b/OpenSim/Grid/ScriptServer/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,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/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index 00b7f76..79524b4 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs @@ -48,10 +48,10 @@ namespace OpenSim.Grid.UserServer private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private UserConfig Cfg; - + public UserManager m_userManager; public UserLoginService m_loginService; - public MessageServersConnector m_messagesService; + public MessageServersConnector m_messagesService; private LLUUID m_lastCreatedUser = LLUUID.Random(); @@ -87,13 +87,13 @@ namespace OpenSim.Grid.UserServer public void Startup() { Cfg = new UserConfig("USER SERVER", (Path.Combine(Util.configDir(), "UserServer_Config.xml"))); - + m_stats = StatsManager.StartCollectingUserStats(); m_log.Info("[REGION]: Establishing data connection"); - m_userManager = new UserManager(); + m_userManager = new UserManager(); m_userManager._config = Cfg; - m_userManager.AddPlugin(Cfg.DatabaseProvider, Cfg.DatabaseConnect); + m_userManager.AddPlugin(Cfg.DatabaseProvider, Cfg.DatabaseConnect); m_loginService = new UserLoginService( m_userManager, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg); @@ -104,7 +104,7 @@ namespace OpenSim.Grid.UserServer m_userManager.OnLogOffUser += NotifyMessageServersUserLoggOff; m_log.Info("[REGION]: Starting HTTP process"); - + m_httpServer = new BaseHttpServer(Cfg.HttpPort); AddHttpHandlers(); m_httpServer.Start(); @@ -117,7 +117,7 @@ namespace OpenSim.Grid.UserServer m_httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod); m_httpServer.AddHTTPHandler("login", m_loginService.ProcessHTMLLogin); - + m_httpServer.SetLLSDHandler(m_loginService.LLSDLoginMethod); m_httpServer.AddXmlRPCHandler("get_user_by_name", m_userManager.XmlRPCGetUserMethodName); @@ -128,7 +128,7 @@ namespace OpenSim.Grid.UserServer m_httpServer.AddXmlRPCHandler("update_user_friend_perms", m_userManager.XmlRpcResponseXmlRPCUpdateUserFriendPerms); m_httpServer.AddXmlRPCHandler("get_user_friend_list", m_userManager.XmlRpcResponseXmlRPCGetUserFriendList); m_httpServer.AddXmlRPCHandler("logout_of_simulator", m_userManager.XmlRPCLogOffUserMethodUUID); - + // Message Server ---> User Server m_httpServer.AddXmlRPCHandler("register_messageserver", m_messagesService.XmlRPCRegisterMessageServer); m_httpServer.AddXmlRPCHandler("agent_change_region", m_messagesService.XmlRPCUserMovedtoRegion); @@ -163,17 +163,17 @@ namespace OpenSim.Grid.UserServer { m_log.ErrorFormat( "[USERS]: A user with the name {0} {1} already exists!", tempfirstname, templastname); - + break; } - + tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + String.Empty); LLUUID userID = new LLUUID(); try { userID = m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); - } + } catch (Exception ex) { m_log.ErrorFormat("[USERS]: Error creating user: {0}", ex.ToString()); @@ -181,31 +181,31 @@ namespace OpenSim.Grid.UserServer try { - bool created + bool created = SynchronousRestObjectPoster.BeginPostObject( "POST", m_userManager._config.InventoryUrl + "CreateInventory/", userID.UUID); - + if (!created) { throw new Exception( String.Format( "The inventory creation request for user {0} did not succeed." - + " Please contact your inventory service provider for more information.", + + " Please contact your inventory service provider for more information.", userID)); } - + } catch (WebException) { m_log.ErrorFormat( - "[USERS]: Could not contact the inventory service at {0} to create an inventory for {1}", + "[USERS]: Could not contact the inventory service at {0} to create an inventory for {1}", m_userManager._config.InventoryUrl + "CreateInventory/", userID.UUID); } catch (Exception e) { m_log.ErrorFormat("[USERS]: Error creating inventory for user: {0}", e); } - + m_lastCreatedUser = userID; break; } @@ -214,7 +214,7 @@ namespace OpenSim.Grid.UserServer public override void RunCmd(string cmd, string[] cmdparams) { base.RunCmd(cmd, cmdparams); - + switch (cmd) { case "help": @@ -223,7 +223,7 @@ namespace OpenSim.Grid.UserServer case "create": do_create(cmdparams[0]); - break; + break; case "test-inventory": // RestObjectPosterResponse> requester = new RestObjectPosterResponse>(); @@ -242,10 +242,10 @@ namespace OpenSim.Grid.UserServer public override void Shutdown() { m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation; - + base.Shutdown(); } - + public void TestResponse(List resp) { m_console.Notice("response got"); @@ -257,10 +257,10 @@ namespace OpenSim.Grid.UserServer } public void NotifyMessageServersUserLoggedInToLocation(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, - ulong regionhandle, float positionX, float positionY, + ulong regionhandle, float positionX, float positionY, float positionZ, string firstname, string lastname) { - + m_messagesService.TellMessageServersAboutUser(agentID, sessionID, RegionID, regionhandle, positionX, positionY, positionZ, firstname, lastname); } diff --git a/OpenSim/Grid/UserServer/MessageServersConnector.cs b/OpenSim/Grid/UserServer/MessageServersConnector.cs index 4e9728e..529c089 100644 --- a/OpenSim/Grid/UserServer/MessageServersConnector.cs +++ b/OpenSim/Grid/UserServer/MessageServersConnector.cs @@ -41,12 +41,12 @@ namespace OpenSim.Grid.UserServer private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public Dictionary MessageServers; - + public MessageServersConnector() { MessageServers = new Dictionary(); } - + public void RegisterMessageServer(string URI, MessageServerInfo serverData) { lock (MessageServers) @@ -55,7 +55,7 @@ namespace OpenSim.Grid.UserServer MessageServers.Add(URI, serverData); } } - + public void DeRegisterMessageServer(string URI) { lock (MessageServers) @@ -64,7 +64,7 @@ namespace OpenSim.Grid.UserServer MessageServers.Remove(URI); } } - + public void AddResponsibleRegion(string URI, ulong regionhandle) { if (!MessageServers.ContainsKey(URI)) @@ -76,7 +76,7 @@ namespace OpenSim.Grid.UserServer MessageServerInfo msginfo = MessageServers["URI"]; msginfo.responsibleForRegions.Add(regionhandle); MessageServers["URI"] = msginfo; - } + } } public void RemoveResponsibleRegion(string URI, ulong regionhandle) { @@ -92,7 +92,7 @@ namespace OpenSim.Grid.UserServer msginfo.responsibleForRegions.Remove(regionhandle); MessageServers["URI"] = msginfo; } - } + } } public XmlRpcResponse XmlRPCRegisterMessageServer(XmlRpcRequest request) @@ -148,7 +148,7 @@ namespace OpenSim.Grid.UserServer string scurrentpos = (string)requestData["currentpos"]; //LLVector3.TryParse((string)reader["currentPos"], out retval.currentPos); // TODO: Okay now raise event so the user server can pass this data to the Usermanager - + responseData["responsestring"] = "TRUE"; response.Value = responseData; } @@ -156,7 +156,7 @@ namespace OpenSim.Grid.UserServer } public void TellMessageServersAboutUser(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, - ulong regionhandle, float positionX, float positionY, + ulong regionhandle, float positionX, float positionY, float positionZ, string firstname, string lastname) { // Loop over registered Message Servers (AND THERE WILL BE MORE THEN ONE :D) @@ -218,9 +218,9 @@ namespace OpenSim.Grid.UserServer m_log.Info("[LOGOUT]: Notified : " + serv.URI + " about user logout"); } - private void NotifyMessageServerAboutUser(MessageServerInfo serv, + private void NotifyMessageServerAboutUser(MessageServerInfo serv, LLUUID agentID, LLUUID sessionID, LLUUID RegionID, - ulong regionhandle, float positionX, float positionY, float positionZ, + ulong regionhandle, float positionX, float positionY, float positionZ, string firstname, string lastname) { Hashtable reqparams = new Hashtable(); @@ -250,7 +250,7 @@ namespace OpenSim.Grid.UserServer { m_log.Warn("[MSGCONNECTOR]: Unable to notify Message Server about login. Presence might be borked for this user"); } - + } } } diff --git a/OpenSim/Grid/UserServer/Properties/AssemblyInfo.cs b/OpenSim/Grid/UserServer/Properties/AssemblyInfo.cs index 680b357..926f680 100644 --- a/OpenSim/Grid/UserServer/Properties/AssemblyInfo.cs +++ b/OpenSim/Grid/UserServer/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,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/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index 32b1ada..3c9d650 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs @@ -50,11 +50,11 @@ namespace OpenSim.Grid.UserServer public event UserLoggedInAtLocation OnUserLoggedInAtLocation; private UserLoggedInAtLocation handlerUserLoggedInAtLocation = null; - + public UserConfig m_config; public UserLoginService( - UserManagerBase userManager, LibraryRootFolder libraryRootFolder, + UserManagerBase userManager, LibraryRootFolder libraryRootFolder, UserConfig config, string welcomeMess) : base(userManager, libraryRootFolder, welcomeMess) { @@ -138,9 +138,9 @@ namespace OpenSim.Grid.UserServer theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "]}"; // Destination - //CFK: The "Notifying" message always seems to appear, so subsume the data from this message into + //CFK: The "Notifying" message always seems to appear, so subsume the data from this message into //CFK: the next one for X & Y and comment this one. - //CFK: m_log.Info("[LOGIN]: CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + + //CFK: m_log.Info("[LOGIN]: CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + //CFK: "; Region Y: " + SimInfo.regionLocY); response.SimAddress = Util.GetHostFromDNS(SimInfo.serverURI.Split(new char[] { '/', ':' })[3]).ToString(); response.SimPort = uint.Parse(SimInfo.serverURI.Split(new char[] { '/', ':' })[4]); @@ -150,15 +150,15 @@ namespace OpenSim.Grid.UserServer //Not sure if the + "/CAPS/" should in fact be +"CAPS/" depending if there is already a / as part of httpServerURI string capsPath = Util.GetRandomCapsPath(); response.SeedCapability = SimInfo.httpServerURI + "CAPS/" + capsPath + "0000/"; - + m_log.DebugFormat( - "[LOGIN]: Sending new CAPS seed url {0} to client {1}", - response.SeedCapability, response.AgentID); + "[LOGIN]: Sending new CAPS seed url {0} to client {1}", + response.SeedCapability, response.AgentID); // Notify the target of an incoming user - //CFK: The "Notifying" message always seems to appear, so subsume the data from this message into + //CFK: The "Notifying" message always seems to appear, so subsume the data from this message into //CFK: the next one for X & Y and comment this one. - //CFK: m_log.Info("[LOGIN]: " + SimInfo.regionName + " (" + SimInfo.serverURI + ") " + + //CFK: m_log.Info("[LOGIN]: " + SimInfo.regionName + " (" + SimInfo.serverURI + ") " + //CFK: SimInfo.regionLocX + "," + SimInfo.regionLocY); theUser.CurrentAgent.Region = SimInfo.UUID; @@ -187,23 +187,23 @@ namespace OpenSim.Grid.UserServer // Update agent with target sim m_log.InfoFormat( - "[LOGIN]: Telling region {0} @ {1},{2} ({3}) to expect user connection", - SimInfo.regionName, response.RegionX, response.RegionY, SimInfo.httpServerURI); + "[LOGIN]: Telling region {0} @ {1},{2} ({3}) to expect user connection", + SimInfo.regionName, response.RegionX, response.RegionY, SimInfo.httpServerURI); - XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams); + XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams); XmlRpcResponse GridResp = GridReq.Send(SimInfo.httpServerURI, 6000); - + if (GridResp.IsFault) { m_log.ErrorFormat( - "[LOGIN]: XMLRPC request for {0} failed, fault code: {1}, reason: {2}", + "[LOGIN]: XMLRPC request for {0} failed, fault code: {1}, reason: {2}", SimInfo.httpServerURI, GridResp.FaultCode, GridResp.FaultString); } handlerUserLoggedInAtLocation = OnUserLoggedInAtLocation; if (handlerUserLoggedInAtLocation != null) { //m_log.Info("[LOGIN]: Letting other objects know about login"); - handlerUserLoggedInAtLocation(theUser.ID, theUser.CurrentAgent.SessionID, theUser.CurrentAgent.Region, + handlerUserLoggedInAtLocation(theUser.ID, theUser.CurrentAgent.SessionID, theUser.CurrentAgent.Region, theUser.CurrentAgent.Handle, theUser.CurrentAgent.Position.X,theUser.CurrentAgent.Position.Y,theUser.CurrentAgent.Position.Z, theUser.FirstName,theUser.SurName); } @@ -213,7 +213,7 @@ namespace OpenSim.Grid.UserServer { tryDefault = true; } - + if (tryDefault) { // Send him to default region instead @@ -301,8 +301,8 @@ namespace OpenSim.Grid.UserServer protected override InventoryData GetInventorySkeleton(LLUUID userID) { m_log.DebugFormat( - "[LOGIN]: Contacting inventory service at {0} for inventory skeleton of user {1}", - m_config.InventoryUrl, userID); + "[LOGIN]: Contacting inventory service at {0} for inventory skeleton of user {1}", + m_config.InventoryUrl, userID); List folders = SynchronousRestObjectPoster.BeginPostObject>( @@ -317,23 +317,23 @@ namespace OpenSim.Grid.UserServer // tools are creating the user profile directly in the database without creating the inventory. At // this time we'll accomodate them by lazily creating the user inventory now if it doesn't already // exist. - bool created = + bool created = SynchronousRestObjectPoster.BeginPostObject( "POST", m_config.InventoryUrl + "CreateInventory/", userID.UUID); - + if (!created) { throw new Exception( String.Format( "The inventory creation request for user {0} did not succeed." - + " Please contact your inventory service provider for more information.", + + " Please contact your inventory service provider for more information.", userID)); } else { m_log.InfoFormat("[LOGIN]: A new inventory skeleton was successfully created for user {0}", userID); } - + folders = SynchronousRestObjectPoster.BeginPostObject>( "POST", m_config.InventoryUrl + "RootFolders/", userID.UUID); } @@ -343,11 +343,11 @@ namespace OpenSim.Grid.UserServer LLUUID rootID = LLUUID.Zero; ArrayList AgentInventoryArray = new ArrayList(); Hashtable TempHash; - + foreach (InventoryFolderBase InvFolder in folders) { // m_log.DebugFormat("[LOGIN]: Received agent inventory folder {0}", InvFolder.name); - + if (InvFolder.ParentID == LLUUID.Zero) { rootID = InvFolder.ID; @@ -360,14 +360,14 @@ namespace OpenSim.Grid.UserServer TempHash["folder_id"] = InvFolder.ID.ToString(); AgentInventoryArray.Add(TempHash); } - + return new InventoryData(AgentInventoryArray, rootID); } else { throw new Exception( String.Format( - "A root inventory folder for user {0} could not be retrieved from the inventory service", + "A root inventory folder for user {0} could not be retrieved from the inventory service", userID)); } } diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index 5d0e1d6..8372d6a 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs @@ -41,7 +41,7 @@ namespace OpenSim.Grid.UserServer public delegate void logOffUser(LLUUID AgentID); public class UserManager : UserManagerBase - { + { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public event logOffUser OnLogOffUser; @@ -91,7 +91,7 @@ namespace OpenSim.Grid.UserServer responseData["lastname" + i.ToString()] = returnUsers[i].lastName; } response.Value = responseData; - + return response; } @@ -182,7 +182,7 @@ namespace OpenSim.Grid.UserServer Hashtable responseData = new Hashtable(); string returnString = "FALSE"; // Query Result Information - + if (requestData.Contains("ownerID") && requestData.Contains("friendID") && requestData.Contains("friendPerms")) { // UserManagerBase.AddNewuserFriend @@ -201,7 +201,7 @@ namespace OpenSim.Grid.UserServer Hashtable responseData = new Hashtable(); string returnString = "FALSE"; // Query Result Information - + if (requestData.Contains("ownerID") && requestData.Contains("friendID")) { // UserManagerBase.AddNewuserFriend @@ -219,7 +219,7 @@ namespace OpenSim.Grid.UserServer Hashtable requestData = (Hashtable)request.Params[0]; Hashtable responseData = new Hashtable(); string returnString = "FALSE"; - + if (requestData.Contains("ownerID") && requestData.Contains("friendID") && requestData.Contains("friendPerms")) { UpdateUserFriendPerms(new LLUUID((string)requestData["ownerID"]), new LLUUID((string)requestData["friendID"]), (uint)Convert.ToInt32((string)requestData["friendPerms"])); @@ -243,7 +243,7 @@ namespace OpenSim.Grid.UserServer { returndata = this.GetUserFriendList(new LLUUID((string)requestData["ownerID"])); } - + return FriendListItemListtoXmlRPCResponse(returndata); } @@ -350,7 +350,7 @@ namespace OpenSim.Grid.UserServer } // dont' know how yet if (requestData.Contains("MaturePublish")) - { + { } if (requestData.Contains("AboutText")) { @@ -362,7 +362,7 @@ namespace OpenSim.Grid.UserServer } // not in DB yet. if (requestData.Contains("ProfileURL")) - { + { } if (requestData.Contains("home_region")) { @@ -382,7 +382,7 @@ namespace OpenSim.Grid.UserServer { m_log.Error("[PROFILE]:Failed to set home region, Value was too large"); } - + } if (requestData.Contains("home_pos_x")) { @@ -442,7 +442,7 @@ namespace OpenSim.Grid.UserServer } if (requestData.Contains("home_look_z")) { - try + try { userProfile.HomeLookAtZ = (float)Convert.ToDecimal((string)requestData["home_look_z"]); } diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index d349d37..b2c710a 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs @@ -59,7 +59,7 @@ namespace OpenSim } Console.WriteLine("Starting...\n"); - + Culture.SetCurrentCulture(); ArgvConfigSource configSource = new ArgvConfigSource(args); @@ -110,7 +110,7 @@ namespace OpenSim _IsHandlingException = true; // TODO: Add config option to allow users to turn off error reporting // TODO: Post error report (disabled for now) - + string msg = String.Empty; msg += "\r\n"; msg += "APPLICATION EXCEPTION DETECTED: " + e.ToString() + "\r\n"; @@ -122,7 +122,7 @@ namespace OpenSim msg += "InnerException: " + ex.InnerException.ToString() + "\r\n"; msg += "\r\n"; - msg += "Application is terminating: " + e.IsTerminating.ToString() + "\r\n"; + msg += "Application is terminating: " + e.IsTerminating.ToString() + "\r\n"; // Do we not always want to see exception messages? // if (e.IsTerminating) @@ -132,7 +132,7 @@ namespace OpenSim try { // DISABLED UNTIL WE CAN DISCUSS IF THIS IS MORALLY RIGHT OR NOT - // Note! Needs reference to System.Web + // Note! Needs reference to System.Web //System.Net.WebClient wc = new WebClient(); //wc.DownloadData("http://www.opensimulator.org/ErrorReport.php?Msg=" + // System.Web.HttpUtility.UrlEncode(msg)); diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index a8f4bd4..7f13281 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -50,14 +50,14 @@ using OpenSim.Region.Physics.Manager; namespace OpenSim { public class OpenSimMain : RegionApplicationBase - { + { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); /// /// Holds a human readable build version for this server. /// protected string buildVersion; - + protected string proxyUrl; protected int proxyOffset = 0; @@ -90,42 +90,42 @@ namespace OpenSim private string m_standaloneUserSource; protected string m_assetStorage = "local"; - + public ConsoleCommand CreateAccount = null; protected bool m_dumpAssetsToFile; - + protected List m_plugins = new List(); protected IConfigSource m_finalConfig = null; protected IniConfigSource m_config; - + public IniConfigSource ConfigSource { get { return m_config; } set { m_config = value; } } - + public List ClientServers { get { return m_clientServers; } } - + public List RegionData { get { return m_regionData; } } - + public new BaseHttpServer HttpServer { get { return m_httpServer; } } - + public new uint HttpServerPort { get { return m_httpServerPort; } } - + protected ModuleLoader m_moduleLoader; public ModuleLoader ModuleLoader @@ -146,10 +146,10 @@ namespace OpenSim if (Directory.Exists("addin-db-001")) Directory.Delete("addin-db-001", true); - - + + m_log.Info("[OPENSIM MAIN]: PLEASE IGNORE THE SCANNING ERRORS BELOW. These are the result of a temporary problem with our plugins manager."); - + AddinManager.Initialize("."); AddinManager.Registry.Update(null); @@ -270,13 +270,13 @@ namespace OpenSim m_sandbox = !startupConfig.GetBoolean("gridmode", false); m_physicsEngine = startupConfig.GetString("physics", "basicphysics"); m_meshEngineName = startupConfig.GetString("meshing", "ZeroMesher"); - + m_physicalPrim = startupConfig.GetBoolean("physical_prim", true); m_see_into_region_from_neighbor = startupConfig.GetBoolean("see_into_this_sim_from_neighbor", true); - + m_storageDll = startupConfig.GetString("storage_plugin", "OpenSim.Data.SQLite.dll"); - if (m_storageDll == "OpenSim.DataStore.MonoSqlite.dll") + if (m_storageDll == "OpenSim.DataStore.MonoSqlite.dll") { m_storageDll = "OpenSim.Data.SQLite.dll"; Console.WriteLine("WARNING: OpenSim.DataStore.MonoSqlite.dll is deprecated. Set storage_plugin to OpenSim.Data.SQLite.dll."); @@ -311,10 +311,10 @@ namespace OpenSim m_dumpAssetsToFile = standaloneConfig.GetBoolean("dump_assets_to_file", false); } - + m_networkServersInfo.loadFromConfiguration(m_config); - + } private ManualResetEvent WorldHasComeToAnEnd = new ManualResetEvent(false); @@ -331,19 +331,19 @@ namespace OpenSim m_log.Info("========================= STARTING OPENSIM ========================="); m_log.Info("===================================================================="); m_log.InfoFormat("[OPENSIM MAIN]: Running in background {0} mode", m_sandbox ? "sandbox" : "grid"); - + InternalStartUp(); // We are done with startup m_log.InfoFormat("[OPENSIM MAIN]: Startup complete, serving {0} region{1}", m_clientServers.Count.ToString(), m_clientServers.Count > 1 ? "s" : ""); - + WorldHasComeToAnEnd.WaitOne(); m_log.Info("[OPENSIM MAIN]: Shutdown complete, goodbye."); - + Environment.Exit(0); } - + /// /// Print the version information available to the library. This include a subversion number if the root /// .svn/entries file is present. @@ -392,9 +392,9 @@ namespace OpenSim protected void InternalStartUp() { printAvailableVersionInformation(); - + m_stats = StatsManager.StartCollectingSimExtraStats(); - + // Do baseclass startup sequence: OpenSim.Region.ClientStack.RegionApplicationBase.StartUp // TerrainManager, StorageManager, HTTP Server // This base will call abstract Initialize @@ -425,7 +425,7 @@ namespace OpenSim // set up XMLRPC handler for client's initial login request message m_httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod); - + // provides the web form login m_httpServer.AddHTTPHandler("login", m_loginService.ProcessHTMLLogin); @@ -524,12 +524,12 @@ namespace OpenSim regionInfo.originRegionID = regionInfo.RegionID; // set initial ServerURI - regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName + regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.InternalEndPoint.Port.ToString(); - - regionInfo.HttpPort = m_httpServerPort; - if ((proxyUrl.Length > 0) && (portadd_flag)) + regionInfo.HttpPort = m_httpServerPort; + + if ((proxyUrl.Length > 0) && (portadd_flag)) { // set proxy url to RegionInfo regionInfo.proxyUrl = proxyUrl; @@ -574,9 +574,9 @@ namespace OpenSim scene.SetModuleInterfaces(); //moved these here as the terrain texture has to be created after the modules are initialized - // and has to happen before the region is registered with the grid. + // and has to happen before the region is registered with the grid. scene.CreateTerrainTexture(true); - + try { scene.RegisterRegionWithGrid(); @@ -584,18 +584,18 @@ namespace OpenSim catch (Exception e) { m_log.ErrorFormat("[STARTUP]: Registration of region with grid failed, aborting startup - {0}", e); - + // Carrying on now causes a lot of confusion down the line - we need to get the user's attention System.Environment.Exit(1); } - + // We need to do this after we've initialized the scripting engines. scene.StartScripts(); scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); scene.LandChannel.PerformParcelPrimCountUpdate(); - m_sceneManager.Add(scene); + m_sceneManager.Add(scene); m_clientServers.Add(clientServer); m_regionData.Add(regionInfo); @@ -625,7 +625,7 @@ namespace OpenSim new Scene(regionInfo, circuitManager, m_commsManager, sceneGridService, m_assetCache, storageManager, m_httpServer, m_moduleLoader, m_dumpAssetsToFile, m_physicalPrim, m_see_into_region_from_neighbor, m_config); - + } public void handleRestartRegion(RegionInfo whichRegion) @@ -650,7 +650,7 @@ namespace OpenSim m_clientServers.RemoveAt(clientServerElement); } - //Removing the region from the sim's database of regions.. + //Removing the region from the sim's database of regions.. int RegionHandleElement = -1; for (int i = 0; i < m_regionData.Count; i++) { @@ -676,7 +676,7 @@ namespace OpenSim /// /// Handler to supply the current status of this sim - /// + /// /// Currently this is always OK if the simulator is still listening for connections on its HTTP service /// protected class SimStatusHandler : IStreamedRequestHandler @@ -709,9 +709,9 @@ namespace OpenSim /// public override void Shutdown() { - if (proxyUrl.Length > 0) + if (proxyUrl.Length > 0) { - Util.XmlRpcCommand(proxyUrl, "Stop"); + Util.XmlRpcCommand(proxyUrl, "Stop"); } m_log.Info("[SHUTDOWN]: Closing all threads"); @@ -721,9 +721,9 @@ namespace OpenSim m_log.Info("[SHUTDOWN]: Closing console and terminating"); m_sceneManager.Close(); - + WorldHasComeToAnEnd.Set(); - + base.Shutdown(); } diff --git a/OpenSim/Region/Application/OpenSimMainConsole.cs b/OpenSim/Region/Application/OpenSimMainConsole.cs index 2381f57..1b2600c 100644 --- a/OpenSim/Region/Application/OpenSimMainConsole.cs +++ b/OpenSim/Region/Application/OpenSimMainConsole.cs @@ -47,7 +47,7 @@ namespace OpenSim public delegate void ConsoleCommand(string[] comParams); public class OpenSimMainConsole : OpenSimMain, conscmd_callback - { + { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); protected string m_startupCommandsFile; @@ -83,12 +83,12 @@ namespace OpenSim // // Called from app startup (OpenSim.Application) // - + m_log.Info("===================================================================="); m_log.Info("========================= STARTING OPENSIM ========================="); m_log.Info("===================================================================="); m_log.InfoFormat("[OPENSIM MAIN]: Running in {0} mode", (m_sandbox ? "sandbox" : "grid")); - + m_console = CreateConsole(); MainConsole.Instance = m_console; InternalStartUp(); @@ -111,7 +111,7 @@ namespace OpenSim m_scriptTimer.Interval = 1200 * 1000; m_scriptTimer.Elapsed += RunAutoTimerScript; } - + PrintFileToConsole("startuplogo.txt"); } @@ -131,7 +131,7 @@ namespace OpenSim #region Console Commands /// - /// + /// /// /// private void RunCommandScript(string fileName) @@ -178,7 +178,7 @@ namespace OpenSim public override void RunCmd(string command, string[] cmdparams) { base.RunCmd(command, cmdparams); - + switch (command) { case "clear-assets": @@ -252,7 +252,7 @@ namespace OpenSim m_console.Notice("set-time [x] - set the current scene time phase"); m_console.Notice("show assets - show state of asset cache."); m_console.Notice("show users - show info about connected users."); - m_console.Notice("show modules - shows info about loaded modules."); + m_console.Notice("show modules - shows info about loaded modules."); m_console.Notice("show version - show the running build version."); m_console.Notice("threads - list threads"); m_console.Notice("config set section field value - set a config value"); @@ -264,7 +264,7 @@ namespace OpenSim case "threads": // m_console.Notice("THREAD", Process.GetCurrentProcess().Threads.Count + " threads running:"); // int _tc = 0; - + // foreach (ProcessThread pt in Process.GetCurrentProcess().Threads) // { // _tc++; @@ -388,7 +388,7 @@ namespace OpenSim if (m_sceneManager.TryGetScene(regName, out killScene)) { // only need to check this if we are not at the - // root level + // root level if ((m_sceneManager.CurrentScene != null) && (m_sceneManager.CurrentScene.RegionInfo.RegionID == killScene.RegionInfo.RegionID)) { @@ -520,7 +520,7 @@ namespace OpenSim { foreach (Scene s in new ArrayList(m_sceneManager.Scenes)) { - + m_console.Notice("Loading module: " + cmdparams[1]); m_moduleLoader.LoadRegionModules(cmdparams[1], s); } @@ -529,7 +529,7 @@ namespace OpenSim } } - break; + break; default: string[] tmpPluginArgs = new string[cmdparams.Length + 1]; cmdparams.CopyTo(tmpPluginArgs, 1); @@ -570,7 +570,7 @@ namespace OpenSim public override void Show(string ShowWhat) { base.Show(ShowWhat); - + switch (ShowWhat) { case "assets": diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 1eab16b..d6329ce 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -57,14 +57,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP // ~ClientView() // { - // m_log.Info("[CLIENTVIEW]: Destructor called"); + // m_log.Info("[CLIENTVIEW]: Destructor called"); // } /* static variables */ public static TerrainManager TerrainManager; public delegate bool SynchronizeClientHandler(IScene scene, Packet packet, LLUUID agentID, ThrottleOutPacketType throttlePacketType); - public static SynchronizeClientHandler SynchronizeClient = null; + public static SynchronizeClientHandler SynchronizeClient = null; /* private variables */ private readonly LLUUID m_sessionId; private LLUUID m_secureSessionId = LLUUID.Zero; @@ -201,7 +201,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP private RemoveInventoryFolder handlerRemoveInventoryFolder = null; private RequestTaskInventory handlerRequestTaskInventory = null; //OnRequestTaskInventory; private UpdateTaskInventory handlerUpdateTaskInventory = null; //OnUpdateTaskInventory; - private MoveTaskInventory handlerMoveTaskItem = null; + private MoveTaskInventory handlerMoveTaskItem = null; private RemoveTaskInventory handlerRemoveTaskItem = null; //OnRemoveTaskItem; private RezScript handlerRezScript = null; //OnRezScript; private RequestMapBlocks handlerRequestMapBlocks = null; //OnRequestMapBlocks; @@ -324,7 +324,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP /* METHODS */ public LLClientView(EndPoint remoteEP, IScene scene, AssetCache assetCache, LLPacketServer packServer, - AgentCircuitManager authenSessions, LLUUID agentId, LLUUID sessionId, uint circuitCode, EndPoint proxyEP) + AgentCircuitManager authenSessions, LLUUID agentId, LLUUID sessionId, uint circuitCode, EndPoint proxyEP) { m_moneyBalance = 1000; @@ -348,12 +348,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_userEndPoint = remoteEP; m_proxyEndPoint = proxyEP; - + m_startpos = m_authenticateSessionsHandler.GetPosition(circuitCode); // While working on this, the BlockingQueue had me fooled for a bit. - // The Blocking queue causes the thread to stop until there's something - // in it to process. It's an on-purpose threadlock though because + // The Blocking queue causes the thread to stop until there's something + // in it to process. It's an on-purpose threadlock though because // without it, the clientloop will suck up all sim resources. m_packetQueue = new LLPacketQueue(agentId); @@ -379,9 +379,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_scene.RemoveClient(AgentId); //m_log.InfoFormat("[CLIENTVIEW] Memory pre GC {0}", System.GC.GetTotalMemory(false)); - //m_log.InfoFormat("[CLIENTVIEW] Memory post GC {0}", System.GC.GetTotalMemory(true)); + //m_log.InfoFormat("[CLIENTVIEW] Memory post GC {0}", System.GC.GetTotalMemory(true)); - // Send the STOP packet + // Send the STOP packet DisableSimulatorPacket disable = (DisableSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.DisableSimulator); OutPacket(disable, ThrottleOutPacketType.Unknown); @@ -398,12 +398,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP // flushing out all it's packets. There should probably // be a better mechanism here - // We can't reach into other scenes and close the connection + // We can't reach into other scenes and close the connection // We need to do this over grid communications //m_scene.CloseAllAgents(CircuitCode); // If we're not shutting down the circuit, then this is the last time we'll go here. - // If we are shutting down the circuit, the UDP Server will come back here with + // If we are shutting down the circuit, the UDP Server will come back here with // ShutDownCircuit = false if (!(shutdownCircuit)) { @@ -641,7 +641,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { //this.UploadAssets = new AgentAssetUpload(this, m_assetCache, m_inventoryCache); - // Establish our two timers. We could probably get this down to one + // Establish our two timers. We could probably get this down to one m_ackTimer = new Timer(750); m_ackTimer.Elapsed += new ElapsedEventHandler(AckTimer_Elapsed); m_ackTimer.Start(); @@ -791,7 +791,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP public event ParcelJoinRequest OnParcelJoinRequest; public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; public event ParcelSelectObjects OnParcelSelectObjects; - public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; + public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; public event ParcelAbandonRequest OnParcelAbandonRequest; public event RegionInfoRequest OnRegionInfoRequest; public event EstateCovenantRequest OnEstateCovenantRequest; @@ -834,7 +834,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP #region Scene/Avatar to Client /// - /// + /// /// /// public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) @@ -871,7 +871,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } /// - /// + /// /// /// public void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look) @@ -898,7 +898,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } /// - /// + /// /// /// /// @@ -934,17 +934,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP LLUUID imSessionID, string fromName, byte dialog, uint timeStamp) { SendInstantMessage( - fromAgent, fromAgentSession, message, toAgent, + fromAgent, fromAgentSession, message, toAgent, imSessionID, fromName, dialog, timeStamp, new byte[0]); } - + /// /// Send an instant message to this client /// /// /// public void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, - LLUUID imSessionID, string fromName, byte dialog, uint timeStamp, + LLUUID imSessionID, string fromName, byte dialog, uint timeStamp, byte[] binaryBucket) { if (((Scene)(this.m_scene)).ExternalChecks.ExternalChecksCanInstantMessage(fromAgent, toAgent)) @@ -1031,7 +1031,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } /// - /// + /// /// /// /// @@ -1056,7 +1056,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } /// - /// + /// /// /// public AgentCircuitData RequestClientInfo() @@ -1166,7 +1166,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } /// - /// + /// /// public void SendTeleportFailed(string reason) { @@ -1179,7 +1179,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } /// - /// + /// /// public void SendTeleportLocationStart() { @@ -1250,7 +1250,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// /// Send information about the items contained in a folder to the client. - /// + /// /// XXX This method needs some refactoring loving /// /// The owner of the folder @@ -1261,8 +1261,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP public void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List items, List folders, bool fetchFolders, bool fetchItems) - { - // An inventory descendents packet consists of a single agent section and an inventory details + { + // An inventory descendents packet consists of a single agent section and an inventory details // section for each inventory item. The size of each inventory item is approximately 550 bytes. // In theory, UDP has a maximum packet size of 64k, so it should be possible to send descendent // packets containing metadata for in excess of 100 items. But in practice, there may be other @@ -1367,7 +1367,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (i < MAX_ITEMS_PER_PACKET) { - + OutPacket(descend, ThrottleOutPacketType.Asset); } } @@ -1376,7 +1376,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (fetchFolders) { InventoryDescendentsPacket descend = CreateInventoryDescendentsPacket(ownerID, folderID); - + if (folders.Count < MAX_ITEMS_PER_PACKET) { descend.FolderData = new InventoryDescendentsPacket.FolderDataBlock[folders.Count]; @@ -1493,27 +1493,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP inventoryReply.Header.Zerocoded = true; OutPacket(inventoryReply, ThrottleOutPacketType.Asset); } - + /// IClientAPI.SendBulkUpdateInventory(InventoryItemBase) - public void SendBulkUpdateInventory(InventoryItemBase item) - { + public void SendBulkUpdateInventory(InventoryItemBase item) + { uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All; - - BulkUpdateInventoryPacket bulkUpdate + + BulkUpdateInventoryPacket bulkUpdate = (BulkUpdateInventoryPacket)PacketPool.Instance.GetPacket(PacketType.BulkUpdateInventory); - + bulkUpdate.AgentData.AgentID = AgentId; - bulkUpdate.AgentData.TransactionID = LLUUID.Random(); - + bulkUpdate.AgentData.TransactionID = LLUUID.Random(); + bulkUpdate.FolderData = new BulkUpdateInventoryPacket.FolderDataBlock[1]; bulkUpdate.FolderData[0] = new BulkUpdateInventoryPacket.FolderDataBlock(); bulkUpdate.FolderData[0].FolderID = LLUUID.Zero; bulkUpdate.FolderData[0].ParentID = LLUUID.Zero; bulkUpdate.FolderData[0].Type = -1; bulkUpdate.FolderData[0].Name = new byte[0]; - + bulkUpdate.ItemData = new BulkUpdateInventoryPacket.ItemDataBlock[1]; - bulkUpdate.ItemData[0] = new BulkUpdateInventoryPacket.ItemDataBlock(); + bulkUpdate.ItemData[0] = new BulkUpdateInventoryPacket.ItemDataBlock(); bulkUpdate.ItemData[0].ItemID = item.ID; bulkUpdate.ItemData[0].AssetID = item.AssetID; bulkUpdate.ItemData[0].CreatorID = item.Creator; @@ -1553,11 +1553,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP public void SendInventoryItemCreateUpdate(InventoryItemBase Item) { uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All; - - UpdateCreateInventoryItemPacket InventoryReply + + UpdateCreateInventoryItemPacket InventoryReply = (UpdateCreateInventoryItemPacket)PacketPool.Instance.GetPacket( PacketType.UpdateCreateInventoryItem); - + // TODO: don't create new blocks if recycling an old packet InventoryReply.AgentData.AgentID = AgentId; InventoryReply.AgentData.SimApproved = true; @@ -1719,7 +1719,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// /// /// On the linden client, if this true then it displays a one button text box placed in the - /// middle of the window. If false, the message is displayed in a brief duration blue information box (as for + /// middle of the window. If false, the message is displayed in a brief duration blue information box (as for /// the AlertMessage packet). public void SendAgentAlertMessage(string message, bool modal) { @@ -1784,7 +1784,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP sound.DataBlock.OwnerID = ownerID; sound.DataBlock.Gain = gain; sound.DataBlock.Flags = flags; - + OutPacket(sound, ThrottleOutPacketType.Task); } @@ -1907,7 +1907,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP #region Appearance/ Wearables Methods /// - /// + /// /// /// public void SendWearables(AvatarWearable[] wearables, int serial) @@ -1933,7 +1933,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } /// - /// + /// /// /// /// @@ -2016,7 +2016,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } /// - /// + /// /// /// /// @@ -2071,14 +2071,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP #region Primitive Packet/data Sending Methods /// - /// + /// /// /// /// /// public void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint) { - + ObjectAttachPacket attach = (ObjectAttachPacket)PacketPool.Instance.GetPacket(PacketType.ObjectAttach); Console.WriteLine("Attach object!"); // TODO: don't create new blocks if recycling an old packet @@ -2094,9 +2094,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP } public void SendPrimitiveToClient( - ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, + ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, LLVector3 vel, LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, - uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color, + uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, byte clickAction) { byte[] textureanim = new byte[0]; @@ -2108,7 +2108,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } public void SendPrimitiveToClient( - ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, + ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, LLVector3 velocity, LLVector3 acceleration, LLQuaternion rotation, LLVector3 rotational_velocity, uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, @@ -2125,15 +2125,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP outPacket.ObjectData[0].ID = localID; outPacket.ObjectData[0].FullID = objectID; outPacket.ObjectData[0].OwnerID = ownerID; - + // Anything more than 255 will cause libsecondlife to barf if (text.Length > 255) { text = text.Remove(255); } - + outPacket.ObjectData[0].Text = Helpers.StringToField(text); - + outPacket.ObjectData[0].TextColor[0] = color[0]; outPacket.ObjectData[0].TextColor[1] = color[1]; outPacket.ObjectData[0].TextColor[2] = color[2]; @@ -2148,7 +2148,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // Necessary??? outPacket.ObjectData[0].JointAxisOrAnchor = new LLVector3(0, 0, 2); outPacket.ObjectData[0].JointPivot = new LLVector3(0, 0, 0); - + // Item from inventory??? outPacket.ObjectData[0].NameValue = Helpers.StringToField("AttachItemID STRING RW SV " + AssetId.UUID); @@ -2179,7 +2179,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } /// - /// + /// /// /// /// @@ -2194,7 +2194,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP terse.RegionData.RegionHandle = regionHandle; terse.RegionData.TimeDilation = timeDilation; terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; - terse.ObjectData[0] = CreatePrimImprovedBlock(localID, position, rotation, velocity, rotationalvelocity, state); // AssetID should fall into here probably somehow... + terse.ObjectData[0] = CreatePrimImprovedBlock(localID, position, rotation, velocity, rotationalvelocity, state); // AssetID should fall into here probably somehow... terse.Header.Reliable = false; terse.Header.Zerocoded = true; OutPacket(terse, ThrottleOutPacketType.Task); @@ -2251,7 +2251,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (ImageSize > 0) im.ImageID.Size = ImageSize; - + im.ImageData.Data = ImageData; im.ImageID.Codec = imageCodec; im.Header.Zerocoded = true; @@ -2270,7 +2270,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP public void SendObjectPropertiesFamilyData(uint RequestFlags, LLUUID ObjectUUID, LLUUID OwnerID, LLUUID GroupID, uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask, - uint NextOwnerMask, int OwnershipCost, byte SaleType,int SalePrice, uint Category, + uint NextOwnerMask, int OwnershipCost, byte SaleType,int SalePrice, uint Category, LLUUID LastOwnerID, string ObjectName, string Description) { ObjectPropertiesFamilyPacket objPropFamilyPack = (ObjectPropertiesFamilyPacket)PacketPool.Instance.GetPacket(PacketType.ObjectPropertiesFamily); @@ -2301,9 +2301,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP } public void SendObjectPropertiesReply(LLUUID ItemID, ulong CreationDate, LLUUID CreatorUUID, LLUUID FolderUUID, LLUUID FromTaskUUID, - LLUUID GroupUUID, short InventorySerial, LLUUID LastOwnerUUID, LLUUID ObjectUUID, - LLUUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName, - string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask, + LLUUID GroupUUID, short InventorySerial, LLUUID LastOwnerUUID, LLUUID ObjectUUID, + LLUUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName, + string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask, uint BaseMask) { ObjectPropertiesPacket proper = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties); @@ -2409,7 +2409,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP rinfoblk.WaterHeight = args.waterHeight; rinfoblk.SimName = Helpers.StringToField(args.simName); - + rinfopack.RegionInfo = rinfoblk; this.OutPacket(rinfopack, ThrottleOutPacketType.Task); @@ -2638,7 +2638,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP notifyCount = 32; } - + ParcelObjectOwnersReplyPacket.DataBlock[] dataBlock = new ParcelObjectOwnersReplyPacket.DataBlock[notifyCount]; @@ -2758,7 +2758,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } /// - /// + /// /// /// /// @@ -2852,8 +2852,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP bytes[i++] = (byte)(rvelz % 256); bytes[i++] = (byte)((rvelz >> 8) % 256); dat.Data = bytes; - - + + return dat; } @@ -2931,7 +2931,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// - /// + /// /// /// public ObjectUpdatePacket.ObjectDataBlock CreateDefaultAvatarPacket(byte[] textureEntry) @@ -2966,7 +2966,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } /// - /// + /// /// /// protected void SetDefaultAvatarPacketValues(ref ObjectUpdatePacket.ObjectDataBlock objdata) @@ -3093,7 +3093,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP return true; } - + public void SendScriptQuestion(LLUUID taskID, string taskName, string ownerName, LLUUID itemID, int question) { ScriptQuestionPacket scriptQuestion = (ScriptQuestionPacket)PacketPool.Instance.GetPacket(PacketType.ScriptQuestion); @@ -3136,7 +3136,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// /// Send a response back to a client when it asks the asset server (via the region server) if it has /// its appearance texture cached. - /// + /// /// At the moment, we always reply that there is no cached texture. /// /// @@ -3154,7 +3154,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_cachedTextureSerial++; cachedresp.WearableData = new AgentCachedTextureResponsePacket.WearableDataBlock[cachedtex.WearableData.Length]; - + for (int i = 0; i < cachedtex.WearableData.Length; i++) { cachedresp.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock(); @@ -3162,8 +3162,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP cachedresp.WearableData[i].TextureID = LLUUID.Zero; cachedresp.WearableData[i].HostName = new byte[0]; } - - // Temporarily throw these packets on to the wind queue, so we can identify whether these + + // Temporarily throw these packets on to the wind queue, so we can identify whether these // are somehow the source of the packet bloat. cachedresp.Header.Zerocoded = true; OutPacket(cachedresp, ThrottleOutPacketType.Wind); @@ -3245,7 +3245,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); handlerUpdatePrimScale(localId, scale1, this); - + handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition; if (handlerUpdatePrimSinglePosition != null) { @@ -3414,7 +3414,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // Previously ClientView.m_packetQueue - // A thread safe sequence number allocator. + // A thread safe sequence number allocator. protected uint NextSeqNum() { // Set the sequence number @@ -3490,7 +3490,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { // Keep track of when this packet was sent out Pack.TickCount = System.Environment.TickCount; - + if (!Pack.Header.Resent) { Pack.Header.Sequence = NextSeqNum(); @@ -3510,7 +3510,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP try { byte[] sendbuffer = Pack.ToBytes(); - PacketPool.Instance.ReturnPacket(Pack); + PacketPool.Instance.ReturnPacket(Pack); if (Pack.Header.Zerocoded) { @@ -3737,7 +3737,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } - private bool m_packetProcessingEnabled = true; + private bool m_packetProcessingEnabled = true; public bool IsActive { get { return m_packetProcessingEnabled; } @@ -3750,7 +3750,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (ProcessPacketMethod(Pack)) { - //there is a handler registered that handled this packet type + //there is a handler registered that handled this packet type return; } else @@ -3972,7 +3972,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { // Temporarily protect ourselves from the mantis #951 failure. // However, we could do this for several other handlers where a failure isn't terminal - // for the client session anyway, in order to protect ourselves against bad code in plugins + // for the client session anyway, in order to protect ourselves against bad code in plugins try { List visualparams = new List(); @@ -3986,7 +3986,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP catch (Exception e) { m_log.ErrorFormat( - "[CLIENT VIEW]: AgentSetApperance packet handler threw an exception, {0}", + "[CLIENT VIEW]: AgentSetApperance packet handler threw an exception, {0}", e); } } @@ -4027,7 +4027,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (handlerDetachAttachmentIntoInv != null) { DetachAttachmentIntoInvPacket detachtoInv = (DetachAttachmentIntoInvPacket)Pack; - + LLUUID itemID = detachtoInv.ObjectData.ItemID; LLUUID ATTACH_agentID = detachtoInv.ObjectData.AgentID; @@ -4223,7 +4223,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_probesWithNoIngressPackets = 0; m_clientBlocked = false; SendStartPingCheck(0); - + break; case PacketType.ForceScriptControlRelease: @@ -4284,12 +4284,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP // m_log.Info("[REZData]: " + addPacket.ToString()); //BypassRaycast: 1 //RayStart: <69.79469, 158.2652, 98.40343> - //RayEnd: <61.97724, 141.995, 92.58341> + //RayEnd: <61.97724, 141.995, 92.58341> //RayTargetID: 00000000-0000-0000-0000-000000000000 //Check to see if adding the prim is allowed; useful for any module wanting to restrict the //object from rezing initially - + handlerAddPrim = OnAddPrim; if (handlerAddPrim != null) handlerAddPrim(AgentId, addPacket.ObjectData.RayEnd, addPacket.ObjectData.Rotation, shape, addPacket.ObjectData.BypassRaycast, addPacket.ObjectData.RayStart, addPacket.ObjectData.RayTargetID, addPacket.ObjectData.RayEndIsIntersection); @@ -4532,10 +4532,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } - // Here's our data, + // Here's our data, // PermField contains the field the info goes into // PermField determines which mask we're changing - // + // // chmask is the mask of the change // setTF is whether we're adding it or taking it away // @@ -4969,11 +4969,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } } - + break; - + case PacketType.RemoveTaskInventory: - + RemoveTaskInventoryPacket removeTask = (RemoveTaskInventoryPacket)Pack; handlerRemoveTaskItem = OnRemoveTaskItem; @@ -4982,27 +4982,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP { handlerRemoveTaskItem(this, removeTask.InventoryData.ItemID, removeTask.InventoryData.LocalID); } - + break; - + case PacketType.MoveTaskInventory: - + MoveTaskInventoryPacket moveTaskInventoryPacket = (MoveTaskInventoryPacket)Pack; - + handlerMoveTaskItem = OnMoveTaskItem; - + if (handlerMoveTaskItem != null) { handlerMoveTaskItem( - this, moveTaskInventoryPacket.AgentData.FolderID, - moveTaskInventoryPacket.InventoryData.LocalID, + this, moveTaskInventoryPacket.AgentData.FolderID, + moveTaskInventoryPacket.InventoryData.LocalID, moveTaskInventoryPacket.InventoryData.ItemID); } - + break; - + case PacketType.RezScript: - + //Console.WriteLine(Pack.ToString()); RezScriptPacket rezScriptx = (RezScriptPacket)Pack; @@ -5013,7 +5013,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP handlerRezScript(this, rezScriptx.InventoryBlock.ItemID, rezScriptx.UpdateBlock.ObjectLocalID); } break; - + case PacketType.MapLayerRequest: RequestMapLayer(); break; @@ -5054,7 +5054,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP tpCancel.Info.AgentID = tpReq.Info.AgentID; OutPacket(tpCancel, ThrottleOutPacketType.Task); } - + try { @@ -5072,7 +5072,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } else { - + // Teleport home request handlerTeleportHomeRequest = OnTeleportHomeRequest; if (handlerTeleportHomeRequest != null) @@ -5121,7 +5121,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP #endregion - + case PacketType.UUIDNameRequest: UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack; foreach (UUIDNameRequestPacket.UUIDNameBlockBlock UUIDBlock in incoming.UUIDNameBlock) @@ -5262,7 +5262,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP break; case PacketType.ParcelRelease: ParcelReleasePacket releasePacket = (ParcelReleasePacket)Pack; - + handlerParcelAbandonRequest = OnParcelAbandonRequest; if (handlerParcelAbandonRequest != null) { @@ -5378,7 +5378,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP float SunHour = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(messagePacket.ParamList[5].Parameter)); OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseFixedSun, SunHour); - + } catch (Exception ex) { @@ -5462,7 +5462,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP LLUUID Prey = LLUUID.Zero; Helpers.TryParse(Helpers.FieldToUTF8String(messagePacket.ParamList[1].Parameter), out Prey); - + OnEstateTeleportOneUserHomeRequest(this,invoice,SenderID,Prey); } break; @@ -5500,7 +5500,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack; RequestGodlikePowersPacket.RequestBlockBlock rblock = rglpPack.RequestBlock; LLUUID token = rblock.Token; - + RequestGodlikePowersPacket.AgentDataBlock ablock = rglpPack.AgentData; handlerReqGodlikePowers = OnRequestGodlikePowers; @@ -5623,7 +5623,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // TODO: Don't display this one, we handle it at a lower level //m_log.Warn("[CLIENT]: unhandled UseCircuitCode packet"); break; - + case PacketType.AgentHeightWidth: // TODO: handle this packet m_log.Warn("[CLIENT]: unhandled AgentHeightWidth packet"); @@ -5741,7 +5741,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP OutPacket(offp, ThrottleOutPacketType.Task); } - public void SendSitResponse(LLUUID TargetID, LLVector3 OffsetPos, LLQuaternion SitOrientation, bool autopilot, + public void SendSitResponse(LLUUID TargetID, LLVector3 OffsetPos, LLQuaternion SitOrientation, bool autopilot, LLVector3 CameraAtOffset, LLVector3 CameraEyeOffset, bool ForceMouseLook) { AvatarSitResponsePacket avatarSitResponse = new AvatarSitResponsePacket(); @@ -5766,7 +5766,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP GrantGodlikePowersPacket.AgentDataBlock adb = new GrantGodlikePowersPacket.AgentDataBlock(); adb.AgentID = AgentId; - adb.SessionID = SessionId; // More security + adb.SessionID = SessionId; // More security gdb.GodLevel = (byte)AdminLevel; gdb.Token = Token; //respondPacket.AgentData = (GrantGodlikePowersPacket.AgentDataBlock)ablock; @@ -5790,7 +5790,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP Group.GroupPowers = GroupMembership[i].groupPowers; Groups[i] = Group; Groupupdate.GroupData = Groups; - + } Groupupdate.AgentData.AgentID = AgentId; OutPacket(Groupupdate, ThrottleOutPacketType.Task); @@ -5800,7 +5800,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP public ClientInfo GetClientInfo() { //MainLog.Instance.Verbose("CLIENT", "GetClientInfo BGN"); - + ClientInfo info = new ClientInfo(); info.userEP = this.m_userEndPoint; info.proxyEP = this.m_proxyEndPoint; @@ -5822,7 +5822,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP QueItem[] queitems = m_packetQueue.GetQueueArray(); MainLog.Instance.Verbose("CLIENT", "Queue Count : [{0}]", queitems.Length); - + for (int i = 0; i < queitems.Length; i++) { if (queitems[i].Incoming == false) @@ -5862,7 +5862,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } catch (Exception) { - + } m_needAck.Add(key, packet); diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs index 8f90f34..8655d80 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs @@ -79,14 +79,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP // private long LastThrottle; // private long ThrottleInterval; private Timer throttleTimer; - + private LLUUID m_agentId; public LLPacketQueue(LLUUID agentId) { // While working on this, the BlockingQueue had me fooled for a bit. - // The Blocking queue causes the thread to stop until there's something - // in it to process. it's an on-purpose threadlock though because + // The Blocking queue causes the thread to stop until there's something + // in it to process. it's an on-purpose threadlock though because // without it, the clientloop will suck up all sim resources. SendQueue = new BlockingQueue(); @@ -111,7 +111,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP AssetThrottle = new LLPacketThrottle(1000, 800000, 1000); TextureThrottle = new LLPacketThrottle(1000, 800000, 4000); // Total Throttle trumps all - // Number of bytes allowed to go out per second. (256kbps per client) + // Number of bytes allowed to go out per second. (256kbps per client) TotalThrottle = new LLPacketThrottle(0, 1500000, 28000); throttleTimer = new Timer((int) (throttletimems/throttleTimeDivisor)); @@ -121,10 +121,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP // TIMERS needed for this // LastThrottle = DateTime.Now.Ticks; // ThrottleInterval = (long)(throttletimems/throttleTimeDivisor); - + m_agentId = agentId; - - if (StatsManager.SimExtraStats != null) + + if (StatsManager.SimExtraStats != null) { StatsManager.SimExtraStats.RegisterPacketQueueStatsProvider(m_agentId, this); } @@ -234,11 +234,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_enabled = false; throttleTimer.Stop(); - - if (StatsManager.SimExtraStats != null) + + if (StatsManager.SimExtraStats != null) { StatsManager.SimExtraStats.DeregisterPacketQueueStatsProvider(m_agentId); - } + } } private void ResetCounters() @@ -275,7 +275,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP int MaxThrottleLoops = 4550; // 50*7 packets can be dequeued at once. int throttleLoops = 0; - // We're going to dequeue all of the saved up packets until + // We're going to dequeue all of the saved up packets until // we've hit the throttle limit or there's no more packets to send lock (this) { @@ -428,8 +428,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP //Agent Throttle Block contains 7 single floatingpoint values. int j = 0; - // Some Systems may be big endian... - // it might be smart to do this check more often... + // Some Systems may be big endian... + // it might be smart to do this check more often... if (!BitConverter.IsLittleEndian) for (int i = 0; i < 7; i++) Array.Reverse(throttle, j + i*singlefloat, singlefloat); @@ -508,7 +508,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // effectively wiggling the slider causes things reset ResetCounters(); } - + // See IPullStatsProvider public string GetStats() { @@ -522,7 +522,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP CloudOutgoingPacketQueue.Count, TaskOutgoingPacketQueue.Count, TextureOutgoingPacketQueue.Count, - AssetOutgoingPacketQueue.Count); + AssetOutgoingPacketQueue.Count); } public LLQueItem[] GetQueueArray() diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs index 6a033c8..5983454 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs @@ -37,7 +37,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { public class LLPacketServer { - //private static readonly log4net.ILog m_log + //private static readonly log4net.ILog m_log // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private LLClientStackNetworkHandler m_networkHandler; @@ -61,7 +61,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } /// - /// + /// /// /// /// @@ -112,7 +112,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } /// - /// + /// /// /// /// @@ -124,7 +124,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } /// - /// + /// /// /// public virtual void CloseCircuit(uint circuitcode) @@ -141,9 +141,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP public virtual void CloseClient(IClientAPI client) { //m_log.Info("PacketServer:CloseClient()"); - + CloseCircuit(client.CircuitCode); - m_scene.ClientManager.Remove(client.CircuitCode); + m_scene.ClientManager.Remove(client.CircuitCode); client.Close(false); } } diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 5f83b50..c413416 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs @@ -171,11 +171,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_socket.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); - // Ter: For some stupid reason ConnectionReset basically kills our async event structure.. + // Ter: For some stupid reason ConnectionReset basically kills our async event structure.. // so therefore.. we've got to tell the server to BeginReceiveFrom again. - // This will happen over and over until we've gone through all packets + // This will happen over and over until we've gone through all packets // sent to and from this particular user. - // Stupid I know.. + // Stupid I know.. // but Flusing the buffer would be even more stupid... so, we're stuck with this ugly method. } catch (SocketException) @@ -195,12 +195,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP { m_socket.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); - - // Ter: For some stupid reason ConnectionReset basically kills our async event structure.. + + // Ter: For some stupid reason ConnectionReset basically kills our async event structure.. // so therefore.. we've got to tell the server to BeginReceiveFrom again. - // This will happen over and over until we've gone through all packets + // This will happen over and over until we've gone through all packets // sent to and from this particular user. - // Stupid I know.. + // Stupid I know.. // but Flusing the buffer would be even more stupid... so, we're stuck with this ugly method. } catch (SocketException e2) @@ -208,7 +208,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_log.Error("[UDPSERVER]: " + e2.ToString()); } - // Here's some reference code! :D + // Here's some reference code! :D // Shutdown and restart the UDP listener! hehe // Shiny @@ -228,11 +228,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_socket.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); - // Ter: For some stupid reason ConnectionReset basically kills our async event structure.. + // Ter: For some stupid reason ConnectionReset basically kills our async event structure.. // so therefore.. we've got to tell the server to BeginReceiveFrom again. - // This will happen over and over until we've gone through all packets + // This will happen over and over until we've gone through all packets // sent to and from this particular user. - // Stupid I know.. + // Stupid I know.. // but Flusing the buffer would be even more stupid... so, we're stuck with this ugly method. } @@ -283,11 +283,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_socket.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); - // Ter: For some stupid reason ConnectionReset basically kills our async event structure.. + // Ter: For some stupid reason ConnectionReset basically kills our async event structure.. // so therefore.. we've got to tell the server to BeginReceiveFrom again. - // This will happen over and over until we've gone through all packets + // This will happen over and over until we've gone through all packets // sent to and from this particular user. - // Stupid I know.. + // Stupid I know.. // but Flusing the buffer would be even more stupid... so, we're stuck with this ugly method. } catch (SocketException e5) @@ -351,7 +351,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } } - + } private void CloseEndPoint(EndPoint sender) @@ -468,7 +468,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP public void RestoreClient(AgentCircuitData circuit, EndPoint userEP, EndPoint proxyEP) { //MainLog.Instance.Verbose("UDPSERVER", "RestoreClient"); - + UseCircuitCodePacket useCircuit = new UseCircuitCodePacket(); useCircuit.CircuitCode.Code = circuit.circuitcode; useCircuit.CircuitCode.ID = circuit.AgentID; diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index b16f74b..586384f 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs @@ -44,7 +44,7 @@ namespace OpenSim.Region.ClientStack { public abstract class RegionApplicationBase : BaseOpenSimServer { - private static readonly ILog m_log + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); protected AssetCache m_assetCache; @@ -63,7 +63,7 @@ namespace OpenSim.Region.ClientStack protected StorageManager m_storageManager; protected string m_storageConnectionString; - + // An attribute to indicate whether prim inventories should be persisted. // Probably will be temporary until this stops being experimental. protected bool m_storagePersistPrimInventories; @@ -159,9 +159,9 @@ namespace OpenSim.Region.ClientStack scene.RegionInfo.MasterAvatarAssignedUUID = LLUUID.Zero; } - scene.LoadPrimsFromStorage(regionInfo.originRegionID); + scene.LoadPrimsFromStorage(regionInfo.originRegionID); scene.StartTimer(); - + return scene; } diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs index 39cf911..0203821 100644 --- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs +++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs @@ -165,7 +165,7 @@ namespace OpenSim.Region.Communications.Local } /// - /// + /// /// /// /// @@ -188,7 +188,7 @@ namespace OpenSim.Region.Communications.Local } /// - /// + /// /// /// /// @@ -305,7 +305,7 @@ namespace OpenSim.Region.Communications.Local } /// - /// + /// /// /// /// @@ -338,7 +338,7 @@ namespace OpenSim.Region.Communications.Local } /// - /// + /// /// /// /// diff --git a/OpenSim/Region/Communications/Local/LocalInventoryService.cs b/OpenSim/Region/Communications/Local/LocalInventoryService.cs index 3d87007..4f60462 100644 --- a/OpenSim/Region/Communications/Local/LocalInventoryService.cs +++ b/OpenSim/Region/Communications/Local/LocalInventoryService.cs @@ -37,20 +37,20 @@ namespace OpenSim.Region.Communications.Local { /// /// An implementation of user inventory where the inventory is held locally (e.g. when OpenSim is - /// operating in standalone mode. + /// operating in standalone mode. /// public class LocalInventoryService : InventoryServiceBase { - private static readonly ILog m_log + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - + public override void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback) { m_log.InfoFormat("[LOCAL INVENTORY SERVICE]: Requesting inventory for user {0}", userID); - - List skeletonFolders = GetInventorySkeleton(userID); + + List skeletonFolders = GetInventorySkeleton(userID); InventoryFolderImpl rootFolder = null; - + List folders = new List(); List items = new List(); @@ -76,11 +76,11 @@ namespace OpenSim.Region.Communications.Local } } } - + m_log.InfoFormat( - "[LOCAL INVENTORY SERVICE]: Received inventory response for user {0} containing {1} folders and {2} items", + "[LOCAL INVENTORY SERVICE]: Received inventory response for user {0} containing {1} folders and {2} items", userID, folders.Count, items.Count); - + callback(folders, items); } diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index 1781ef8..966fdd4 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs @@ -41,7 +41,7 @@ namespace OpenSim.Region.Communications.Local public class LocalLoginService : LoginService { - private static readonly ILog m_log + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private CommunicationsLocal m_Parent; @@ -55,8 +55,8 @@ namespace OpenSim.Region.Communications.Local private LoginToRegionEvent handlerLoginToRegion = null; // OnLoginToRegion; - public LocalLoginService(UserManagerBase userManager, string welcomeMess, - CommunicationsLocal parent, NetworkServersInfo serversInfo, + public LocalLoginService(UserManagerBase userManager, string welcomeMess, + CommunicationsLocal parent, NetworkServersInfo serversInfo, bool authenticate) : base(userManager, parent.UserProfileCacheService.libraryRoot, welcomeMess) { @@ -106,7 +106,7 @@ namespace OpenSim.Region.Communications.Local { m_log.Info( "[LOGIN]: Authenticating " + profile.FirstName + " " + profile.SurName); - + if (!password.StartsWith("$1$")) password = "$1$" + Util.Md5Hash(password); @@ -157,7 +157,7 @@ namespace OpenSim.Region.Communications.Local RegionInfo r = m_Parent.GridService.RequestClosestRegion(region); if (null == r) { - m_log.InfoFormat("[LOGIN]: Got Custom Login URL {0}, can't locate region {1}", + m_log.InfoFormat("[LOGIN]: Got Custom Login URL {0}, can't locate region {1}", startLocationRequest, region); } else @@ -176,16 +176,16 @@ namespace OpenSim.Region.Communications.Local if ((homeReg != null) && (reg != null)) { - response.Home = "{'region_handle':[r" + + response.Home = "{'region_handle':[r" + (homeReg.RegionLocX * Constants.RegionSize).ToString() + ",r" + (homeReg.RegionLocY * Constants.RegionSize).ToString() + "], " + - "'position':[r" + - theUser.HomeLocation.X.ToString() + ",r" + - theUser.HomeLocation.Y.ToString() + ",r" + + "'position':[r" + + theUser.HomeLocation.X.ToString() + ",r" + + theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "], " + - "'look_at':[r" + - theUser.HomeLocation.X.ToString() + ",r" + - theUser.HomeLocation.Y.ToString() + ",r" + + "'look_at':[r" + + theUser.HomeLocation.X.ToString() + ",r" + + theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "]}"; string capsPath = Util.GetRandomCapsPath(); response.SimAddress = reg.ExternalEndPoint.Address.ToString(); @@ -201,17 +201,17 @@ namespace OpenSim.Region.Communications.Local response.SeedCapability = "http://" + reg.ExternalHostName + ":" + serversInfo.HttpListenerPort.ToString() + "/CAPS/" + capsPath + "0000/"; - + m_log.DebugFormat( - "[CAPS]: Sending new CAPS seed url {0} to client {1}", - response.SeedCapability, response.AgentID); + "[CAPS]: Sending new CAPS seed url {0} to client {1}", + response.SeedCapability, response.AgentID); theUser.CurrentAgent.Region = reg.RegionID; theUser.CurrentAgent.Handle = reg.RegionHandle; LoginResponse.BuddyList buddyList = new LoginResponse.BuddyList(); - response.BuddList = ConvertFriendListItem(m_userManager.GetUserFriendList(theUser.ID)); + response.BuddList = ConvertFriendListItem(m_userManager.GetUserFriendList(theUser.ID)); Login _login = new Login(); //copy data to login object @@ -228,9 +228,9 @@ namespace OpenSim.Region.Communications.Local _login.CapsPath = capsPath; m_log.InfoFormat( - "[LOGIN]: Telling region {0} @ {1},{2} ({3}:{4}) to expect user connection", - reg.RegionName, response.RegionX, response.RegionY, response.SimAddress, response.SimPort); - + "[LOGIN]: Telling region {0} @ {1},{2} ({3}:{4}) to expect user connection", + reg.RegionName, response.RegionX, response.RegionY, response.SimAddress, response.SimPort); + handlerLoginToRegion = OnLoginToRegion; if (handlerLoginToRegion != null) { @@ -257,7 +257,7 @@ namespace OpenSim.Region.Communications.Local return buddylistreturn; } - // See LoginService + // See LoginService protected override InventoryData GetInventorySkeleton(LLUUID userID) { List folders = m_Parent.InventoryService.GetInventorySkeleton(userID); @@ -265,10 +265,10 @@ namespace OpenSim.Region.Communications.Local // If we have user auth but no inventory folders for some reason, create a new set of folders. if (null == folders || 0 == folders.Count) { - m_Parent.InventoryService.CreateNewUserInventory(userID); + m_Parent.InventoryService.CreateNewUserInventory(userID); folders = m_Parent.InventoryService.GetInventorySkeleton(userID); } - + LLUUID rootID = LLUUID.Zero; ArrayList AgentInventoryArray = new ArrayList(); Hashtable TempHash; @@ -286,7 +286,7 @@ namespace OpenSim.Region.Communications.Local TempHash["folder_id"] = InvFolder.ID.ToString(); AgentInventoryArray.Add(TempHash); } - + return new InventoryData(AgentInventoryArray, rootID); } } diff --git a/OpenSim/Region/Communications/Local/LocalUserServices.cs b/OpenSim/Region/Communications/Local/LocalUserServices.cs index 2a66edc..47f596d 100644 --- a/OpenSim/Region/Communications/Local/LocalUserServices.cs +++ b/OpenSim/Region/Communications/Local/LocalUserServices.cs @@ -40,7 +40,7 @@ namespace OpenSim.Region.Communications.Local private IInventoryServices m_inventoryService; /// - /// + /// /// /// /// diff --git a/OpenSim/Region/Communications/Local/Properties/AssemblyInfo.cs b/OpenSim/Region/Communications/Local/Properties/AssemblyInfo.cs index 2c88586..8712c00 100644 --- a/OpenSim/Region/Communications/Local/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Communications/Local/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/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index fb8dcf6..5e7e238 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs @@ -95,9 +95,9 @@ namespace OpenSim.Region.Communications.OGS1 public RegionCommsListener RegisterRegion(RegionInfo regionInfo) { m_log.InfoFormat( - "[OGS1 GRID SERVICES]: Attempting to register region {0} with grid at {1}", + "[OGS1 GRID SERVICES]: Attempting to register region {0} with grid at {1}", regionInfo.RegionName, serversInfo.GridURL); - + Hashtable GridParams = new Hashtable(); // Login / Authentication @@ -122,7 +122,7 @@ namespace OpenSim.Region.Communications.OGS1 // not at all. Current strategy is to put the code in place to support the validity of this information // and to roll forward debugging any issues from that point // - // this particular section of the mod attempts to supply a value from the region's xml file to the grid + // this particular section of the mod attempts to supply a value from the region's xml file to the grid // server for the UUID of the region's owner (master avatar) GridParams["master_avatar_uuid"] = regionInfo.MasterAvatarAssignedUUID.ToString(); @@ -139,14 +139,14 @@ namespace OpenSim.Region.Communications.OGS1 } catch (Exception e) { - Exception e2 + Exception e2 = new Exception( String.Format("Unable to connect to grid at {0}. Grid service not running?", serversInfo.GridURL), e); - + throw(e2); } - + Hashtable GridRespData = (Hashtable)GridResp.Value; Hashtable griddatahash = GridRespData; @@ -154,9 +154,9 @@ namespace OpenSim.Region.Communications.OGS1 if (GridRespData.ContainsKey("error")) { string errorstring = (string) GridRespData["error"]; - + Exception e = new Exception(String.Format("Unable to connect to grid at {0}: {1}", serversInfo.GridURL, errorstring)); - + throw e; } else @@ -170,9 +170,9 @@ namespace OpenSim.Region.Communications.OGS1 m_queuedGridSettings.Add("allow_forceful_banlines", "FALSE"); } } - + m_log.InfoFormat( - "[OGS1 GRID SERVICES]: Region {0} successfully registered with grid at {1}", + "[OGS1 GRID SERVICES]: Region {0} successfully registered with grid at {1}", regionInfo.RegionName, serversInfo.GridURL); } return m_localBackend.RegisterRegion(regionInfo); @@ -245,7 +245,7 @@ namespace OpenSim.Region.Communications.OGS1 string externalIpStr = String.Empty; try - { + { externalIpStr = Util.GetHostFromDNS(simIp).ToString(); } catch (SocketException e) @@ -253,16 +253,16 @@ namespace OpenSim.Region.Communications.OGS1 m_log.WarnFormat("RequestNeighbours(): Lookup of neighbour {0} failed! Not including in neighbours list. {1}", simIp, e); continue; } - + SimpleRegionInfo sri = new SimpleRegionInfo(regX, regY, simIp, port); - + sri.RemotingPort = Convert.ToUInt32(neighbourData["remoting_port"]); - + if (neighbourData.ContainsKey("http_port")) { sri.HttpPort = Convert.ToUInt32(neighbourData["http_port"]); } - + sri.RegionID = new LLUUID((string) neighbourData["uuid"]); neighbours.Add(sri); @@ -274,7 +274,7 @@ namespace OpenSim.Region.Communications.OGS1 } /// - /// + /// /// /// /// @@ -309,7 +309,7 @@ namespace OpenSim.Region.Communications.OGS1 regionInfo.RemotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); regionInfo.RemotingAddress = internalIpStr; - + if (responseData.ContainsKey("http_port")) { regionInfo.HttpPort = Convert.ToUInt32((string) responseData["http_port"]); @@ -327,7 +327,7 @@ namespace OpenSim.Region.Communications.OGS1 } /// - /// + /// /// /// /// @@ -372,7 +372,7 @@ namespace OpenSim.Region.Communications.OGS1 regionInfo.RemotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); regionInfo.RemotingAddress = internalIpStr; - + if (responseData.ContainsKey("http_port")) { regionInfo.HttpPort = Convert.ToUInt32((string) responseData["http_port"]); @@ -429,7 +429,7 @@ namespace OpenSim.Region.Communications.OGS1 regionInfo.RemotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); regionInfo.RemotingAddress = internalIpStr; - + if (responseData.ContainsKey("http_port")) { regionInfo.HttpPort = Convert.ToUInt32((string) responseData["http_port"]); @@ -451,7 +451,7 @@ namespace OpenSim.Region.Communications.OGS1 } /// - /// + /// /// /// /// @@ -601,7 +601,7 @@ namespace OpenSim.Region.Communications.OGS1 #region m_interRegion Comms /// - /// + /// /// private void StartRemoting() { @@ -688,55 +688,55 @@ namespace OpenSim.Region.Communications.OGS1 catch (RemotingException e) { NoteDeadRegion(regionHandle); - + m_log.WarnFormat( "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); - + return false; } catch (SocketException e) { NoteDeadRegion(regionHandle); - + m_log.WarnFormat( "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); - + return false; } catch (InvalidCredentialException e) { NoteDeadRegion(regionHandle); - + m_log.WarnFormat( "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); - + return false; } catch (AuthenticationException e) { NoteDeadRegion(regionHandle); - + m_log.WarnFormat( "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); - + return false; } catch (Exception e) { NoteDeadRegion(regionHandle); - + m_log.WarnFormat("[OGS1 GRID SERVICES]: Unable to connect to adjacent region: {0} {1},{2}", regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); - + return false; } } @@ -748,7 +748,7 @@ namespace OpenSim.Region.Communications.OGS1 } /// - /// + /// /// /// /// @@ -797,56 +797,56 @@ namespace OpenSim.Region.Communications.OGS1 catch (RemotingException e) { NoteDeadRegion(regionHandle); - + m_log.WarnFormat( "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); - + return false; } catch (SocketException e) { NoteDeadRegion(regionHandle); - + m_log.WarnFormat( "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); - + return false; } catch (InvalidCredentialException e) { NoteDeadRegion(regionHandle); - + m_log.WarnFormat( "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); - + return false; } catch (AuthenticationException e) { NoteDeadRegion(regionHandle); - + m_log.WarnFormat( "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); - + return false; } catch (Exception e) { NoteDeadRegion(regionHandle); - + m_log.WarnFormat( "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); - + return false; } } @@ -857,17 +857,17 @@ namespace OpenSim.Region.Communications.OGS1 SerializableRegionInfo regInfo = null; try { - // You may ask why this is in here... - // The region asking the grid services about itself.. - // And, surprisingly, the reason is.. it doesn't know + // You may ask why this is in here... + // The region asking the grid services about itself.. + // And, surprisingly, the reason is.. it doesn't know // it's own remoting port! How special. RegionUpData regiondata = new RegionUpData(region.RegionLocX, region.RegionLocY, region.ExternalHostName, region.InternalEndPoint.Port); region = new SerializableRegionInfo(RequestNeighbourInfo(region.RegionHandle)); - region.RemotingAddress = region.ExternalHostName; - region.RemotingPort = NetworkServersInfo.RemotingListenerPort; + region.RemotingAddress = region.ExternalHostName; + region.RemotingPort = NetworkServersInfo.RemotingListenerPort; region.HttpPort = serversInfo.HttpListenerPort; - + if (m_localBackend.RegionUp(region, regionhandle)) { return true; @@ -904,7 +904,7 @@ namespace OpenSim.Region.Communications.OGS1 } else { - // We're trying to inform ourselves via remoting. + // We're trying to inform ourselves via remoting. // This is here because we're looping over the listeners before we get here. // Odd but it should work. return true; @@ -963,7 +963,7 @@ namespace OpenSim.Region.Communications.OGS1 } /// - /// + /// /// /// /// @@ -1058,7 +1058,7 @@ namespace OpenSim.Region.Communications.OGS1 } /// - /// + /// /// /// /// @@ -1098,20 +1098,20 @@ namespace OpenSim.Region.Communications.OGS1 return retValue; } - //TODO need to see if we know about where this region is and use .net remoting - // to inform it. + //TODO need to see if we know about where this region is and use .net remoting + // to inform it. NoteDeadRegion(regionHandle); return false; } catch (RemotingException e) { NoteDeadRegion(regionHandle); - + m_log.WarnFormat( "[OGS1 GRID SERVICES]: Remoting Error: Unable to connect to adjacent region: {0} {1},{2}", regInfo.RegionName, regInfo.RegionLocX, regInfo.RegionLocY); m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); - + return false; } catch @@ -1155,8 +1155,8 @@ namespace OpenSim.Region.Communications.OGS1 return retValue; } - //TODO need to see if we know about where this region is and use .net remoting - // to inform it. + //TODO need to see if we know about where this region is and use .net remoting + // to inform it. NoteDeadRegion(regionHandle); return false; } @@ -1184,7 +1184,7 @@ namespace OpenSim.Region.Communications.OGS1 catch (AuthenticationException e) { NoteDeadRegion(regionHandle); - m_log.Warn("[OGS1 GRID SERVICES]: Authentication exception: Unable to connect to adjacent region: " + regionHandle); + m_log.Warn("[OGS1 GRID SERVICES]: Authentication exception: Unable to connect to adjacent region: " + regionHandle); m_log.DebugFormat("[OGS1 GRID SERVICES]: {0} {1}", e.Source, e.Message); return false; } @@ -1230,8 +1230,8 @@ namespace OpenSim.Region.Communications.OGS1 return true; } - //TODO need to see if we know about where this region is and use .net remoting - // to inform it. + //TODO need to see if we know about where this region is and use .net remoting + // to inform it. NoteDeadRegion(regionHandle); return false; } @@ -1311,7 +1311,7 @@ namespace OpenSim.Region.Communications.OGS1 #region Methods triggered by calls from external instances /// - /// + /// /// /// /// @@ -1342,7 +1342,7 @@ namespace OpenSim.Region.Communications.OGS1 nRegionInfo.RegionLocX = regionData.X; nRegionInfo.RegionLocY = regionData.Y; - + try { lock (m_deadRegionCache) @@ -1379,14 +1379,14 @@ namespace OpenSim.Region.Communications.OGS1 } /// - /// + /// /// /// /// /// public bool IncomingPrim(ulong regionHandle, LLUUID primID, string objData, int XMLMethod) { - // Is this necessary? + // Is this necessary? try { m_localBackend.TriggerExpectPrim(regionHandle, primID, objData, XMLMethod); @@ -1401,7 +1401,7 @@ namespace OpenSim.Region.Communications.OGS1 } /// - /// + /// /// /// /// diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs index 0f75a09..9b3d878 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs @@ -41,11 +41,11 @@ namespace OpenSim.Region.Communications.OGS1 { public class OGS1InventoryService : IInventoryServices { - private static readonly ILog m_log + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private string _inventoryServerUrl; - private Dictionary m_RequestingInventory + private Dictionary m_RequestingInventory = new Dictionary(); public OGS1InventoryService(string inventoryServerUrl) @@ -65,26 +65,26 @@ namespace OpenSim.Region.Communications.OGS1 if (!m_RequestingInventory.ContainsKey(userID)) { m_RequestingInventory.Add(userID, callback); - + try { m_log.InfoFormat( "[OGS1 INVENTORY SERVICE]: Requesting inventory from {0}/GetInventory/ for user {1}", _inventoryServerUrl, userID); - + RestObjectPosterResponse requester = new RestObjectPosterResponse(); requester.ResponseCallback = InventoryResponse; - + requester.BeginPostObject(_inventoryServerUrl + "/GetInventory/", userID.UUID); } catch (WebException e) { if (StatsManager.SimExtraStats != null) StatsManager.SimExtraStats.AddInventoryServiceRetrievalFailure(); - - m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Request inventory operation failed, {0} {1}", - e.Source, e.Message); + + m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Request inventory operation failed, {0} {1}", + e.Source, e.Message); } } else @@ -92,11 +92,11 @@ namespace OpenSim.Region.Communications.OGS1 m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: RequestInventoryForUser() - could you not find user profile for {0}", userID); } } - + /// /// Callback used by the inventory server GetInventory request /// - /// + /// private void InventoryResponse(InventoryCollection response) { LLUUID userID = response.UserID; @@ -108,17 +108,17 @@ namespace OpenSim.Region.Communications.OGS1 InventoryFolderImpl rootFolder = null; InventoryReceiptCallback callback = m_RequestingInventory[userID]; - + ICollection folders = new List(); ICollection items = new List(); - + foreach (InventoryFolderBase folder in response.Folders) { if (folder.ParentID == LLUUID.Zero) { rootFolder = new InventoryFolderImpl(folder); folders.Add(rootFolder); - + break; } } @@ -142,9 +142,9 @@ namespace OpenSim.Region.Communications.OGS1 { m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Did not get back an inventory containing a root folder for user {0}", userID); } - + callback(folders, items); - + m_RequestingInventory.Remove(userID); } else @@ -158,7 +158,7 @@ namespace OpenSim.Region.Communications.OGS1 /// /// - /// + /// public bool AddFolder(InventoryFolderBase folder) { try @@ -168,68 +168,68 @@ namespace OpenSim.Region.Communications.OGS1 } catch (WebException e) { - m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Add new inventory folder operation failed, {0} {1}", + m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Add new inventory folder operation failed, {0} {1}", e.Source, e.Message); } - + return false; } /// /// /// - /// + /// public bool MoveFolder(InventoryFolderBase folder) { try - { + { return SynchronousRestObjectPoster.BeginPostObject( "POST", _inventoryServerUrl + "/MoveFolder/", folder); } catch (WebException e) { - m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Move inventory folder operation failed, {0} {1}", + m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Move inventory folder operation failed, {0} {1}", e.Source, e.Message); - } - + } + return false; } - + /// /// /// public bool PurgeFolder(InventoryFolderBase folder) { try - { + { return SynchronousRestObjectPoster.BeginPostObject( "POST", _inventoryServerUrl + "/PurgeFolder/", folder); } catch (WebException e) { - m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Move inventory folder operation failed, {0} {1}", + m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Move inventory folder operation failed, {0} {1}", e.Source, e.Message); - } - + } + return false; - } + } /// /// - /// + /// public bool AddItem(InventoryItemBase item) { try - { + { return SynchronousRestObjectPoster.BeginPostObject( "POST", _inventoryServerUrl + "/NewItem/", item); } catch (WebException e) { - m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Add new inventory item operation failed, {0} {1}", + m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Add new inventory item operation failed, {0} {1}", e.Source, e.Message); - } - + } + return false; } @@ -246,26 +246,26 @@ namespace OpenSim.Region.Communications.OGS1 m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Update new inventory item operation failed, {0} {1}", e.Source, e.Message); } - + return false; } /// /// - /// + /// public bool DeleteItem(InventoryItemBase item) { try - { + { return SynchronousRestObjectPoster.BeginPostObject( "POST", _inventoryServerUrl + "/DeleteItem/", item); } catch (WebException e) { - m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Delete inventory item operation failed, {0} {1}", + m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Delete inventory item operation failed, {0} {1}", e.Source, e.Message); - } - + } + return false; } @@ -283,12 +283,12 @@ namespace OpenSim.Region.Communications.OGS1 { return false; } - + // See IInventoryServices public List GetInventorySkeleton(LLUUID userId) { m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: The GetInventorySkeleton() method here should never be called!"); - + return new List(); } diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs index e3ee2c1..63fad4a 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs @@ -117,8 +117,8 @@ namespace OpenSim.Region.Communications.OGS1 { List buddylist = new List(); int buddycount = Convert.ToInt32((string)data["avcount"]); - - + + for (int i = 0; i < buddycount; i++) { FriendListItem buddylistitem = new FriendListItem(); @@ -130,8 +130,8 @@ namespace OpenSim.Region.Communications.OGS1 buddylist.Add(buddylistitem); } - - + + return buddylist; } @@ -201,7 +201,7 @@ namespace OpenSim.Region.Communications.OGS1 /// Get a user profile from the user server /// /// - /// null if the request fails + /// null if the request fails public UserProfileData GetUserProfile(string name) { try @@ -222,7 +222,7 @@ namespace OpenSim.Region.Communications.OGS1 "[OGS1 USER SERVICES]: Error when trying to fetch profile data by name from remote user server: {0}", e); } - + return null; } @@ -251,7 +251,7 @@ namespace OpenSim.Region.Communications.OGS1 "[OGS1 USER SERVICES]: Error when trying to fetch profile data by uuid from remote user server: {0}", e); } - + return null; } @@ -264,7 +264,7 @@ namespace OpenSim.Region.Communications.OGS1 /// Retrieve the user information for the given master uuid. /// /// - /// + /// public UserProfileData SetupMasterUser(string firstName, string lastName) { return SetupMasterUser(firstName, lastName, String.Empty); @@ -274,7 +274,7 @@ namespace OpenSim.Region.Communications.OGS1 /// Retrieve the user information for the given master uuid. /// /// - /// + /// public UserProfileData SetupMasterUser(string firstName, string lastName, string password) { UserProfileData profile = GetUserProfile(firstName, lastName); @@ -289,13 +289,13 @@ namespace OpenSim.Region.Communications.OGS1 public UserProfileData SetupMasterUser(LLUUID uuid) { UserProfileData data = GetUserProfile(uuid); - + if (data == null) { throw new Exception( "Could not retrieve profile for master user " + uuid + ". User server did not respond to the request."); } - + return data; } @@ -405,9 +405,9 @@ namespace OpenSim.Region.Communications.OGS1 { m_log.Warn("[GRID]: Error when trying to AddNewUserFriend: " + e.Message); - + } - + } /// @@ -422,7 +422,7 @@ namespace OpenSim.Region.Communications.OGS1 Hashtable param = new Hashtable(); param["ownerID"] = friendlistowner.UUID.ToString(); param["friendID"] = friend.UUID.ToString(); - + IList parameters = new ArrayList(); parameters.Add(param); @@ -458,7 +458,7 @@ namespace OpenSim.Region.Communications.OGS1 { m_log.Warn("[GRID]: Error when trying to RemoveUserFriend: " + e.Message); - + } } @@ -519,7 +519,7 @@ namespace OpenSim.Region.Communications.OGS1 public List GetUserFriendList(LLUUID friendlistowner) { List buddylist = new List(); - + try { Hashtable param = new Hashtable(); @@ -531,11 +531,11 @@ namespace OpenSim.Region.Communications.OGS1 XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 8000); Hashtable respData = (Hashtable) resp.Value; - if (respData.Contains("avcount")) + if (respData.Contains("avcount")) { buddylist = ConvertXMLRPCDataToFriendListItemList(respData); } - + } catch (WebException e) { @@ -550,7 +550,7 @@ namespace OpenSim.Region.Communications.OGS1 /// Appearance /// TODO: stubs for now to get us to a compiling state gently - public AvatarAppearance GetUserAppearance(LLUUID user) + public AvatarAppearance GetUserAppearance(LLUUID user) { return new AvatarAppearance(); } @@ -564,12 +564,12 @@ namespace OpenSim.Region.Communications.OGS1 { return; } - + public void RemoveAttachment(LLUUID user, LLUUID item) { return; } - + public List GetAttachments(LLUUID user) { return new List(); diff --git a/OpenSim/Region/Communications/OGS1/Properties/AssemblyInfo.cs b/OpenSim/Region/Communications/OGS1/Properties/AssemblyInfo.cs index 964180a..c15c604 100644 --- a/OpenSim/Region/Communications/OGS1/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Communications/OGS1/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/Region/DataSnapshot/DataRequestHandler.cs b/OpenSim/Region/DataSnapshot/DataRequestHandler.cs index 2b18871..e08934b 100644 --- a/OpenSim/Region/DataSnapshot/DataRequestHandler.cs +++ b/OpenSim/Region/DataSnapshot/DataRequestHandler.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; @@ -65,7 +65,7 @@ namespace OpenSim.Region.DataSnapshot reply["str_response_string"] = response.OuterXml; reply["int_response_code"] = statuscode; reply["content_type"] = "text/xml"; - + return reply; } } diff --git a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs index 5831ddc..af3e547 100644 --- a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs +++ b/OpenSim/Region/DataSnapshot/DataSnapshotManager.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; @@ -70,14 +70,14 @@ namespace OpenSim.Region.DataSnapshot #region IRegionModule public void Close() { - + } - + public void Initialise(Scene scene, IConfigSource config) { if (!m_scenes.Contains(scene)) m_scenes.Add(scene); - + if (!m_configLoaded) { m_configLoaded = true; @@ -317,7 +317,7 @@ namespace OpenSim.Region.DataSnapshot private String GetRegionCategory(Scene scene) { - + //Boolean choice between: // "PG" - Mormontown // "Mature" - Sodom and Gomorrah @@ -396,7 +396,7 @@ namespace OpenSim.Region.DataSnapshot } /** - * Reply to the http request + * Reply to the http request */ public XmlDocument GetSnapshot(string regionName) { diff --git a/OpenSim/Region/DataSnapshot/Interfaces/IDataSnapshotProvider.cs b/OpenSim/Region/DataSnapshot/Interfaces/IDataSnapshotProvider.cs index 9f19b43..fb9c51a 100644 --- a/OpenSim/Region/DataSnapshot/Interfaces/IDataSnapshotProvider.cs +++ b/OpenSim/Region/DataSnapshot/Interfaces/IDataSnapshotProvider.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.Xml; diff --git a/OpenSim/Region/DataSnapshot/LandSnapshot.cs b/OpenSim/Region/DataSnapshot/LandSnapshot.cs index b60232b..183c2a3 100644 --- a/OpenSim/Region/DataSnapshot/LandSnapshot.cs +++ b/OpenSim/Region/DataSnapshot/LandSnapshot.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; @@ -51,9 +51,9 @@ namespace OpenSim.Region.DataSnapshot /* * David, I don't think we need this at all. When we do the snapshot, we can - * simply look into the parcels that are marked for ShowDirectory -- see + * simply look into the parcels that are marked for ShowDirectory -- see * conditional in RequestSnapshotData - * + * //Revise this, look for more direct way of checking for change in land #region Client hooks @@ -115,7 +115,7 @@ namespace OpenSim.Region.DataSnapshot } public XmlNode RequestSnapshotData(XmlDocument nodeFactory) - { + { ILandChannel landChannel = (LandChannel)m_scene.LandChannel; Dictionary landList = null; try diff --git a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs index b2ef6d3..3270c3a 100644 --- a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs +++ b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs @@ -58,7 +58,7 @@ namespace OpenSim.Region.DataSnapshot foreach (EntityBase entity in m_scene.Entities.Values) { // only objects, not avatars - if (entity is SceneObjectGroup) + if (entity is SceneObjectGroup) { SceneObjectGroup obj = (SceneObjectGroup)entity; diff --git a/OpenSim/Region/Environment/InstantMessageReceiver.cs b/OpenSim/Region/Environment/InstantMessageReceiver.cs index b82b4aa..d82bffc 100644 --- a/OpenSim/Region/Environment/InstantMessageReceiver.cs +++ b/OpenSim/Region/Environment/InstantMessageReceiver.cs @@ -32,11 +32,11 @@ namespace OpenSim.Region.Environment /// /// Bit Vector for Which Modules to send an instant message to from the Scene or an Associated Module /// - + // This prevents the Modules from sending Instant messages to other modules through the scene // and then receiving the same messages - // This is mostly here because on LLSL and the SecondLife Client, IMs,Groups and friends are linked + // This is mostly here because on LLSL and the SecondLife Client, IMs,Groups and friends are linked // inseparably [Flags] diff --git a/OpenSim/Region/Environment/Interfaces/IAvatarFactory.cs b/OpenSim/Region/Environment/Interfaces/IAvatarFactory.cs index 86958d1..d03e167 100644 --- a/OpenSim/Region/Environment/Interfaces/IAvatarFactory.cs +++ b/OpenSim/Region/Environment/Interfaces/IAvatarFactory.cs @@ -31,7 +31,7 @@ using OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.Environment.Interfaces { - public interface IAvatarFactory + public interface IAvatarFactory { bool TryGetAvatarAppearance(LLUUID avatarId, out AvatarAppearance appearance); void UpdateDatabase(LLUUID userID, AvatarAppearance avatAppearance); diff --git a/OpenSim/Region/Environment/Interfaces/IScenePermissions.cs b/OpenSim/Region/Environment/Interfaces/IScenePermissions.cs index f28b46c..eba4a04 100644 --- a/OpenSim/Region/Environment/Interfaces/IScenePermissions.cs +++ b/OpenSim/Region/Environment/Interfaces/IScenePermissions.cs @@ -28,7 +28,7 @@ using libsecondlife; namespace OpenSim.Region.Environment.Interfaces -{ +{ public interface IScenePermissions { } diff --git a/OpenSim/Region/Environment/Interfaces/ITextureSender.cs b/OpenSim/Region/Environment/Interfaces/ITextureSender.cs index 1b9e4eb..ece1953 100644 --- a/OpenSim/Region/Environment/Interfaces/ITextureSender.cs +++ b/OpenSim/Region/Environment/Interfaces/ITextureSender.cs @@ -31,17 +31,17 @@ namespace OpenSim.Region.Environment.Interfaces /// Interface for an object which can send texture information to a client /// public interface ITextureSender - { + { /// /// Are we in the process of sending the texture? /// bool Sending { get; set; } - + /// /// Has the texture send been cancelled? /// bool Cancel { get; set; } - + /// /// Update the non data properties of a texture request /// @@ -53,6 +53,6 @@ namespace OpenSim.Region.Environment.Interfaces /// Send a texture packet to the client. /// /// True if the last packet has been sent, false otherwise. - bool SendTexturePacket(); + bool SendTexturePacket(); } } diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs b/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs index 48db51b..d3cf41e 100644 --- a/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs +++ b/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs @@ -216,7 +216,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload public IClientAPI RequestUser; public LLUUID TransferRequestID; //public bool AssetInCache; - //public int TimeRequested; + //public int TimeRequested; public AssetRequest() { diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs index bae23fa..65785af 100644 --- a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs +++ b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs @@ -40,7 +40,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction /// public class AgentAssetTransactions { - //private static readonly log4net.ILog m_log + //private static readonly log4net.ILog m_log // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); // Fields @@ -192,7 +192,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction } ourClient.SendConfirmXfer(xferID, packetID); - + if ((packetID & 0x80000000) != 0) { SendCompleteMessage(); @@ -209,7 +209,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction /// /// /// - /// True if the transfer is complete, false otherwise + /// True if the transfer is complete, false otherwise public bool Initialise(IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data, bool storeLocal, bool tempFile) { @@ -363,7 +363,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction private void DoCreateItem() { - //really need to fix this call, if lbsa71 saw this he would die. + //really need to fix this call, if lbsa71 saw this he would die. m_userTransactions.Manager.MyScene.CommsManager.AssetCache.AddAsset(Asset); CachedUserInfo userInfo = m_userTransactions.Manager.MyScene.CommsManager.UserProfileCacheService.GetUserDetails(ourClient.AgentId); diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs index fcd0e0c..fd407d9 100644 --- a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs +++ b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs @@ -199,7 +199,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction /// /// Create an inventory item from data that has been received through a transaction. - /// + /// /// This is called when new clothing or body parts are created. It may also be called in other /// situations. /// @@ -229,8 +229,8 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction /// /// Update an inventory item with data that has been received through a transaction. - /// - /// This is called when clothing or body parts are updated (for instance, with new textures or + /// + /// This is called when clothing or body parts are updated (for instance, with new textures or /// colours). It may also be called in other situations. /// /// diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs index 474ac75..8f81f3d 100644 --- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs +++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs @@ -38,7 +38,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload { public class TextureDownloadModule : IRegionModule { - //private static readonly log4net.ILog m_log + //private static readonly log4net.ILog m_log // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); /// @@ -212,7 +212,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload private void TextureSent(ITextureSender sender) { sender.Sending = false; - //m_log.DebugFormat("[TEXTURE DOWNLOAD]: Removing download stat for {0}", sender.assetID); + //m_log.DebugFormat("[TEXTURE DOWNLOAD]: Removing download stat for {0}", sender.assetID); m_scene.AddPendingDownloads(-1); } } diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs index 70e44d4..7c187c0 100644 --- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs +++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs @@ -37,7 +37,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload /// public class TextureNotFoundSender : ITextureSender { - //private static readonly log4net.ILog m_log + //private static readonly log4net.ILog m_log // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private bool m_cancel = false; @@ -80,7 +80,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload public bool SendTexturePacket() { //m_log.InfoFormat( - // "[TEXTURE NOT FOUND SENDER]: Informing the client that texture {0} cannot be found", + // "[TEXTURE NOT FOUND SENDER]: Informing the client that texture {0} cannot be found", // m_textureId); ImageNotInDatabasePacket notFound = new ImageNotInDatabasePacket(); diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs index d4fa39f..42624ad 100644 --- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs +++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs @@ -39,7 +39,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload { /// /// This module sets up texture senders in response to client texture requests, and places them on a - /// processing queue once those senders have the appropriate data (i.e. a texture retrieved from the + /// processing queue once those senders have the appropriate data (i.e. a texture retrieved from the /// asset cache). /// public class UserTextureDownloadService @@ -49,7 +49,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload /// /// We will allow the client to request the same texture n times before dropping further requests - /// + /// /// This number includes repeated requests for the same texture at different resolutions (which we don't /// currently handle properly as far as I know). However, this situation should be handled in a more /// sophisticated way. @@ -80,7 +80,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload /// We're going to limit requests for the same missing texture. /// XXX This is really a temporary solution to deal with the situation where a client continually requests /// the same missing textures - /// + /// private readonly IRequestLimitStrategy missingTextureLimitStrategy = new RepeatLimitStrategy(MAX_ALLOWED_TEXTURE_REQUESTS); @@ -93,7 +93,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload } /// - /// Handle a texture request. This involves creating a texture sender and placing it on the + /// Handle a texture request. This involves creating a texture sender and placing it on the /// previously passed in shared queue. /// /// @@ -108,7 +108,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload { if (m_textureSenders.TryGetValue(e.RequestedAssetID, out textureSender)) { - // If we've received new non UUID information for this request and it hasn't dispatched + // If we've received new non UUID information for this request and it hasn't dispatched // yet, then update the request accordingly. textureSender.UpdateRequest(e.DiscardLevel, e.PacketNumber); } @@ -117,7 +117,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload if (!foundTextureLimitStrategy.AllowRequest(e.RequestedAssetID)) { // m_log.DebugFormat( -// "[USER TEXTURE DOWNLOAD SERVICE]: Refusing request for {0} from client {1}", +// "[USER TEXTURE DOWNLOAD SERVICE]: Refusing request for {0} from client {1}", // e.RequestedAssetID, m_client.AgentId); return; @@ -128,9 +128,9 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload { if (StatsManager.SimExtraStats != null) StatsManager.SimExtraStats.AddBlockedMissingTextureRequest(); - - // Commenting out this message for now as it causes too much noise with other - // debug messages. + + // Commenting out this message for now as it causes too much noise with other + // debug messages. // m_log.DebugFormat( // "[USER TEXTURE DOWNLOAD SERVICE]: Dropping requests for notified missing texture {0} for client {1} since we have received more than {2} requests", // e.RequestedAssetID, m_client.AgentId, MAX_ALLOWED_TEXTURE_REQUESTS); diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs b/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs index ea84436..be73156 100644 --- a/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs +++ b/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs @@ -35,7 +35,7 @@ using OpenSim.Region.Environment.Interfaces; namespace OpenSim.Region.Environment.Modules.Agent.TextureSender { /// - /// A TextureSender handles the process of receiving a texture requested by the client from the + /// A TextureSender handles the process of receiving a texture requested by the client from the /// AssetCache, and then sending that texture back to the client. /// public class TextureSender : ITextureSender @@ -150,14 +150,14 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender { if (NumPackets == 0) { - + RequestUser.SendImagePart(1, m_asset.FullID, (uint)m_asset.Data.Length, m_asset.Data, 2); - + PacketCounter++; } else { - + byte[] ImageData1 = new byte[600]; Array.Copy(m_asset.Data, 0, ImageData1, 0, 600); @@ -167,7 +167,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender } else { - // Doesn't like to be refactored... + // Doesn't like to be refactored... ImagePacketPacket im = new ImagePacketPacket(); im.Header.Reliable = false; im.ImageID.Packet = (ushort)(PacketCounter); diff --git a/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs b/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs index 1b50bbd..16874d7 100644 --- a/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs +++ b/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs @@ -98,7 +98,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.Xfer } /// - /// + /// /// /// /// diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs index 9e5f376..a72010c 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs @@ -235,7 +235,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat { TrySendChatMessage(presence, fromPos, regionPos, fromAgentID, fromName, e.Type, message, ChatSourceType.Agent); - + } }); } @@ -572,7 +572,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat string regex = @":(?\w*)!(?\S*) PRIVMSG (?\S+) :(?.*)"; Regex RE = new Regex(regex, RegexOptions.Multiline); MatchCollection matches = RE.Matches(input); - // Get some direct matches $1 $4 is a + // Get some direct matches $1 $4 is a if ((matches.Count == 1) && (matches[0].Groups.Count == 5)) { result = new Dictionary(); @@ -703,7 +703,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat public void ProcessIRCCommand(string command) { - //m_log.Info("[IRC]: ProcessIRCCommand:" + command); + //m_log.Info("[IRC]: ProcessIRCCommand:" + command); string[] commArgs = new string[command.Split(' ').Length]; string c_server = m_server; diff --git a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs index c63fc93..fab546b 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs @@ -46,10 +46,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney /// Demo Economy/Money Module. This is not a production quality money/economy module! /// This is a demo for you to use when making one that works for you. /// // To use the following you need to add: - /// -helperuri
+ /// -helperuri
/// to the command line parameters you use to start up your client /// This commonly looks like -helperuri http://127.0.0.1:9000/ - /// + /// /// Centralized grid structure example using OpenSimWi Redux revision 9+ /// svn co https://opensimwiredux.svn.sourceforge.net/svnroot/opensimwiredux /// @@ -147,7 +147,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney XMLRPCHandler = scene; // To use the following you need to add: - // -helperuri
+ // -helperuri
// to the command line parameters you use to start up your client // This commonly looks like -helperuri http://127.0.0.1:9000/ @@ -276,7 +276,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney private void OnNewClient(IClientAPI client) { // Here we check if we're in grid mode - // I imagine that the 'check balance' + // I imagine that the 'check balance' // function for the client should be here or shortly after if (gridmode) @@ -367,7 +367,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney { lock (m_KnownClientFunds) { - // If we don't know about the sender, then the sender can't + // If we don't know about the sender, then the sender can't // actually be here and therefore this is likely fraud or outdated. if (m_MoneyAddress.Length == 0) { @@ -1394,7 +1394,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney m_rootAgents[avatar.UUID] = avatar.Scene.RegionInfo.originRegionID; - + //m_log.Info("[MONEY]: Claiming " + avatar.Firstname + " " + avatar.Lastname + " in region:" + avatar.RegionHandle + "."); // Claim User! my user! Mine mine mine! diff --git a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs index 8c96392..c82f88d 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs @@ -97,9 +97,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends private void OnNewClient(IClientAPI client) { // All friends establishment protocol goes over instant message - // There's no way to send a message from the sim + // There's no way to send a message from the sim // to a user to 'add a friend' without causing dialog box spam - // + // // The base set of friends are added when the user signs on in their XMLRPC response // Generated by LoginService. The friends are retreived from the database by the UserManager @@ -167,7 +167,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends LLUUID[] Agents = new LLUUID[1]; Agents[0] = client.AgentId; av.ControllingClient.SendAgentOnline(Agents); - + } } } @@ -223,14 +223,14 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends } catch (IndexOutOfRangeException) { - // Ignore the index out of range exception. + // Ignore the index out of range exception. // This causes friend lists to get out of sync slightly.. however // prevents a sim crash. m_log.Info("[FRIEND]: Unable to enumerate last friendlist user. User logged off"); } catch (ArgumentOutOfRangeException) { - // Ignore the index out of range exception. + // Ignore the index out of range exception. // This causes friend lists to get out of sync slightly.. however // prevents a sim crash. m_log.Info("[FRIEND]: Unable to enumerate last friendlist user. User logged off"); @@ -248,14 +248,14 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends catch (IndexOutOfRangeException) { - // Ignore the index out of range exception. + // Ignore the index out of range exception. // This causes friend lists to get out of sync slightly.. however // prevents a sim crash. m_log.Info("[FRIEND]: Unable to enumerate last friendlist user. User logged off"); } catch (ArgumentOutOfRangeException) { - // Ignore the index out of range exception. + // Ignore the index out of range exception. // This causes friend lists to get out of sync slightly.. however // prevents a sim crash. m_log.Info("[FRIEND]: Unable to enumerate last friendlist user. User logged off"); @@ -411,10 +411,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends { if (m_pendingFriendRequests.ContainsKey(transactionID)) { - // Found Pending Friend Request with that Transaction.. + // Found Pending Friend Request with that Transaction.. Scene SceneAgentIn = m_scene[0]; - // Found Pending Friend Request with that Transaction.. + // Found Pending Friend Request with that Transaction.. ScenePresence agentpresence = GetPresenceFromAgentID(agentID); if (agentpresence != null) { @@ -453,7 +453,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends { Scene SceneAgentIn = m_scene[0]; - // Found Pending Friend Request with that Transaction.. + // Found Pending Friend Request with that Transaction.. ScenePresence agentpresence = GetPresenceFromAgentID(agentID); if (agentpresence != null) { diff --git a/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs index 624f307..e1cc688 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs @@ -107,7 +107,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory // First byte of the array is probably the item type // Next 16 bytes are the UUID - //Array.Copy(binaryBucket, 1, rawId, 0, 16); + //Array.Copy(binaryBucket, 1, rawId, 0, 16); //LLUUID itemId = new LLUUID(new Guid(rawId)); LLUUID itemId = new LLUUID(binaryBucket, 1); diff --git a/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs index 15825b6..2e2be7a 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs @@ -86,7 +86,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Profiles } /// - /// + /// /// /// /// diff --git a/OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs index 2112f91..f8651a3 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs @@ -226,7 +226,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.AsterixVoice public string ProvisionVoiceAccountRequest(string request, string path, string param, LLUUID agentID, Caps caps) { - // we need to + // we need to // - get user data from UserProfileCacheService // - generate nonce for user voice account password // - issue XmlRpc request to asterisk opensim front end: diff --git a/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs index e1339a3..87ecfee 100644 --- a/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs +++ b/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs @@ -40,25 +40,25 @@ using OpenSim.Region.Environment.Scenes; /***************************************************** * * ScriptsHttpRequests - * + * * Implements the llHttpRequest and http_response * callback. - * + * * Some stuff was already in LSLLongCmdHandler, and then * there was this file with a stub class in it. So, * I am moving some of the objects and functions out of * LSLLongCmdHandler, such as the HttpRequestClass, the - * start and stop methods, and setting up pending and - * completed queues. These are processed in the - * LSLLongCmdHandler polling loop. Similiar to the + * start and stop methods, and setting up pending and + * completed queues. These are processed in the + * LSLLongCmdHandler polling loop. Similiar to the * XMLRPCModule, since that seems to work. - * + * * //TODO - * + * * This probably needs some throttling mechanism but * its wide open right now. This applies to both * number of requests and data volume. - * + * * Linden puts all kinds of header fields in the requests. * Not doing any of that: * User-Agent @@ -71,13 +71,13 @@ using OpenSim.Region.Environment.Scenes; * X-SecondLife-Local-Rotation * X-SecondLife-Owner-Name * X-SecondLife-Owner-Key - * + * * HTTPS support - * + * * Configurable timeout? * Configurable max repsonse size? * Configurable - * + * * **************************************************/ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest diff --git a/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs index 626c60f..bbd4fa3 100644 --- a/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs +++ b/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs @@ -226,7 +226,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.VectorRender foreach (string line in lines) { string nextLine = line.Trim(); - //replace with switch, or even better, do some proper parsing + //replace with switch, or even better, do some proper parsing if (nextLine.StartsWith("MoveTo")) { float x = 0; diff --git a/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs index 7a15708..4ed0fb5 100644 --- a/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs +++ b/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs @@ -37,25 +37,25 @@ using OpenSim.Region.Environment.Scenes; /***************************************************** * * WorldCommModule - * - * + * + * * Holding place for world comms - basically llListen * function implementation. - * + * * lLListen(integer channel, string name, key id, string msg) - * The name, id, and msg arguments specify the filtering - * criteria. You can pass the empty string - * (or NULL_KEY for id) for these to set a completely - * open filter; this causes the listen() event handler to be - * invoked for all chat on the channel. To listen only - * for chat spoken by a specific object or avatar, - * specify the name and/or id arguments. To listen - * only for a specific command, specify the - * (case-sensitive) msg argument. If msg is not empty, - * listener will only hear strings which are exactly equal + * The name, id, and msg arguments specify the filtering + * criteria. You can pass the empty string + * (or NULL_KEY for id) for these to set a completely + * open filter; this causes the listen() event handler to be + * invoked for all chat on the channel. To listen only + * for chat spoken by a specific object or avatar, + * specify the name and/or id arguments. To listen + * only for a specific command, specify the + * (case-sensitive) msg argument. If msg is not empty, + * listener will only hear strings which are exactly equal * to msg. You can also use all the arguments to establish * the most restrictive filtering criteria. - * + * * It might be useful for each listener to maintain a message * digest, with a list of recent messages by UUID. This can * be used to prevent in-world repeater loops. However, the @@ -76,7 +76,7 @@ using OpenSim.Region.Environment.Scenes; * Might be actually easier to map the global handle into * script-local handle in the ScriptEngine. Not sure if its * worth the effort tho. - * + * * **************************************************/ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm @@ -317,9 +317,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm } /******************************************************************** - * + * * Listener Stuff - * + * * *****************************************************************/ private void DeliverClientMessage(Object sender, ChatFromViewerArgs e) diff --git a/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs b/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs index a039d42..9d4e0fa 100644 --- a/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs +++ b/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs @@ -43,12 +43,12 @@ using OpenSim.Region.Environment.Scenes; /***************************************************** * * XMLRPCModule - * + * * Module for accepting incoming communications from * external XMLRPC client and calling a remote data * procedure for a registered data channel/prim. - * - * + * + * * 1. On module load, open a listener port * 2. Attach an XMLRPC handler * 3. When a request is received: @@ -59,18 +59,18 @@ using OpenSim.Region.Environment.Scenes; * 3.5 Return response to client caller * 3.6 If no response from llRemoteDataReply within * RemoteReplyScriptTimeout, generate script timeout fault - * + * * Prims in script must: * 1. Open a remote data channel * 1.1 Generate a channel ID * 1.2 Register primid,channelid pair with module * 2. Implement the remote data procedure handler - * + * * llOpenRemoteDataChannel * llRemoteDataReply * remote_data(integer type, key channel, key messageid, string sender, integer ival, string sval) * llCloseRemoteDataChannel - * + * * **************************************************/ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC @@ -157,16 +157,16 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC /********************************************** * OpenXMLRPCChannel - * + * * Generate a LLUUID channel key and add it and * the prim id to dictionary - * + * * First check if there is a channel assigned for * this itemID. If there is, then someone called * llOpenRemoteDataChannel twice. Just return the * original channel. Other option is to delete the * current channel and assign a new one. - * + * * ********************************************/ public LLUUID OpenXMLRPCChannel(uint localID, LLUUID itemID) @@ -224,9 +224,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC /********************************************** * Remote Data Reply - * + * * Response to RPC message - * + * *********************************************/ public void RemoteDataReply(string channel, string message_id, string sdata, int idata) @@ -245,9 +245,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC /********************************************** * CloseXMLRPCChannel - * + * * Remove channel from dictionary - * + * *********************************************/ public void CloseXMLRPCChannel(LLUUID channelKey) diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs index b5d5e6e..82341a9 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs @@ -41,7 +41,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land #region Constants //Land types set with flags in ParcelOverlay. - //Only one of these can be used. + //Only one of these can be used. public const float BAN_LINE_SAFETY_HIEGHT = 100; public const byte LAND_FLAG_PROPERTY_BORDER_SOUTH = 128; //Equals 10000000 public const byte LAND_FLAG_PROPERTY_BORDER_WEST = 64; //Equals 01000000 @@ -584,7 +584,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land if (byteArrayCount >= LAND_BLOCKS_PER_PACKET) { remote_client.sendLandParcelOverlay(byteArray, sequenceID); - byteArrayCount = 0; + byteArrayCount = 0; sequenceID++; byteArray = new byte[LAND_BLOCKS_PER_PACKET]; } @@ -655,7 +655,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land public void handleParcelSelectObjectsRequest(int local_id, int request_type, IClientAPI remote_client) { - + landList[local_id].sendForceObjectSelect(local_id, request_type, remote_client); } @@ -870,7 +870,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land } public void handleAnyClientMovement(ScenePresence avatar) - //Like handleSignificantClientMovement, but called with an AgentUpdate regardless of distance. + //Like handleSignificantClientMovement, but called with an AgentUpdate regardless of distance. { ILandObject over = GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); if (over != null) diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs index b319370..54870d8 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs @@ -622,7 +622,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land /// /// Notify the parcel owner each avatar that owns prims situated on their land. This notification includes /// aggreagete details such as the number of prims. - /// + /// /// /// /// A diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs index d31a250..43e8f36 100644 --- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs @@ -47,7 +47,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions #region Constants // These are here for testing. They will be taken out - + //private uint PERM_ALL = (uint)2147483647; private uint PERM_COPY = (uint)32768; //private uint PERM_MODIFY = (uint)16384; @@ -59,7 +59,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions #region Bypass Permissions / Debug Permissions Stuff - // Bypasses the permissions engine + // Bypasses the permissions engine private bool m_bypassPermissions = false; private bool m_bypassPermissionsValue = true; private bool m_debugPermissions = false; @@ -126,18 +126,18 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions public void Initialise(Scene scene, IConfigSource config) { m_scene = scene; - + IConfig myConfig = config.Configs["Startup"]; - - string permissionModules = myConfig.GetString("permissionmodules", "DefaultPermissionsModule"); - List modules=new List(permissionModules.Split(',')); + string permissionModules = myConfig.GetString("permissionmodules", "DefaultPermissionsModule"); + + List modules=new List(permissionModules.Split(',')); - if(!modules.Contains("DefaultPermissionsModule")) - return; + if (!modules.Contains("DefaultPermissionsModule")) + return; + + m_bypassPermissions = !myConfig.GetBoolean("serverside_object_permissions", true); - m_bypassPermissions = !myConfig.GetBoolean("serverside_object_permissions", true); - m_scene.RegisterModuleInterface(this); //Register functions with Scene External Checks! @@ -212,7 +212,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions get { return false; } } - #endregion + #endregion #region Helper Functions protected void SendPermissionError(LLUUID user, string reason) @@ -252,38 +252,38 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions } #endregion - public bool PropagatePermissions() - { - return false; - } + public bool PropagatePermissions() + { + return false; + } - public bool BypassPermissions() - { - return m_bypassPermissions; - } + public bool BypassPermissions() + { + return m_bypassPermissions; + } - public void SetBypassPermissions(bool value) - { - m_bypassPermissions=value; - } + public void SetBypassPermissions(bool value) + { + m_bypassPermissions=value; + } #region Object Permissions public uint GenerateClientFlags(LLUUID user, LLUUID objID) { - // Here's the way this works, + // Here's the way this works, // ObjectFlags and Permission flags are two different enumerations // ObjectFlags, however, tells the client to change what it will allow the user to do. - // So, that means that all of the permissions type ObjectFlags are /temporary/ and only - // supposed to be set when customizing the objectflags for the client. + // So, that means that all of the permissions type ObjectFlags are /temporary/ and only + // supposed to be set when customizing the objectflags for the client. - // These temporary objectflags get computed and added in this function based on the + // These temporary objectflags get computed and added in this function based on the // Permission mask that's appropriate! // Outside of this method, they should never be added to objectflags! // -teravus SceneObjectPart task=m_scene.GetSceneObjectPart(objID); - + // this shouldn't ever happen.. return no permissions/objectflags. if (task == null) return (uint)0; @@ -292,7 +292,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions LLUUID objectOwner = task.OwnerID; - // Remove any of the objectFlags that are temporary. These will get added back if appropriate + // Remove any of the objectFlags that are temporary. These will get added back if appropriate // in the next bit of code objflags &= (uint) @@ -354,7 +354,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions private uint ApplyObjectModifyMasks(uint setPermissionMask, uint objectFlagsMask) { - // We are adding the temporary objectflags to the object's objectflags based on the + // We are adding the temporary objectflags to the object's objectflags based on the // permission flag given. These change the F flags on the client. if ((setPermissionMask & (uint)PermissionMask.Copy) != 0) @@ -404,7 +404,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions locked = ((group.RootPart.OwnerMask & PERM_LOCKED) == 0); // People shouldn't be able to do anything with locked objects, except the Administrator - // The 'set permissions' runs through a different permission check, so when an object owner + // The 'set permissions' runs through a different permission check, so when an object owner // sets an object locked, the only thing that they can do is unlock it. // // Nobody but the object owner can set permissions on an object @@ -458,7 +458,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions bool permission = false; string reason = "Only registered users may communicate with another account."; - + if (IsAdministrator(user)) permission = true; @@ -521,7 +521,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return GenericParcelPermission(user, parcel); } #endregion - + #region Permission Checks private bool CanAbandonParcel(LLUUID user, ILandObject parcel, Scene scene) { @@ -607,7 +607,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; - + return GenericCommunicationPermission(user, target); } @@ -632,8 +632,8 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return false; } - // The client - // may request to edit linked parts, and therefore, it needs + // The client + // may request to edit linked parts, and therefore, it needs // to also check for SceneObjectPart // If it's not an object, we cant edit it. @@ -647,7 +647,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions LLUUID taskOwner = null; - // Added this because at this point in time it wouldn't be wise for + // Added this because at this point in time it wouldn't be wise for // the administrator object permissions to take effect. LLUUID objectOwner = task.OwnerID; @@ -682,12 +682,12 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions // This is an exception to the generic object permission. - // Administrators who lock their objects should not be able to move them, + // Administrators who lock their objects should not be able to move them, // however generic object permission should return true. // This keeps locked objects from being affected by random click + drag actions by accident // and allows the administrator to grab or delete a locked object. - // Administrators and estate managers are still able to click+grab locked objects not + // Administrators and estate managers are still able to click+grab locked objects not // owned by them in the scene // This is by design. @@ -834,7 +834,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objectID]; LLUUID taskOwner = null; - // Added this because at this point in time it wouldn't be wise for + // Added this because at this point in time it wouldn't be wise for // the administrator object permissions to take effect. LLUUID objectOwner = task.OwnerID; @@ -895,61 +895,61 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions #endregion - public bool CanLinkObject(LLUUID userID, LLUUID objectID) - { + public bool CanLinkObject(LLUUID userID, LLUUID objectID) + { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; - return true; - } + return true; + } - public bool CanDelinkObject(LLUUID userID, LLUUID objectID) - { + public bool CanDelinkObject(LLUUID userID, LLUUID objectID) + { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; - return true; - } + return true; + } - public bool CanBuyLand(LLUUID userID, ILandObject parcel, Scene scene) - { + public bool CanBuyLand(LLUUID userID, ILandObject parcel, Scene scene) + { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; - return true; - } + return true; + } - public bool CanCopyInventory(LLUUID itemID, LLUUID objectID, LLUUID userID) - { + public bool CanCopyInventory(LLUUID itemID, LLUUID objectID, LLUUID userID) + { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; - return true; - } + return true; + } - public bool CanDeleteInventory(LLUUID itemID, LLUUID objectID, LLUUID userID) - { + public bool CanDeleteInventory(LLUUID itemID, LLUUID objectID, LLUUID userID) + { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; - return true; - } + return true; + } - public bool CanCreateInventory(uint invType, LLUUID objectID, LLUUID userID) - { + public bool CanCreateInventory(uint invType, LLUUID objectID, LLUUID userID) + { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; - return true; - } + return true; + } - public bool CanTeleport(LLUUID userID) - { + public bool CanTeleport(LLUUID userID) + { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; - return true; - } + return true; + } } diff --git a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs index beb74ce..1bdc702 100644 --- a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs @@ -99,7 +99,7 @@ namespace OpenSim.Region.Environment.Modules // Current time in elpased seconds since Jan 1st 1970 private ulong CurrentTime { - get { + get { return (ulong)(((System.DateTime.Now.Ticks) - TicksToEpoch + TicksOffset)/10000000); } } @@ -118,7 +118,7 @@ namespace OpenSim.Region.Environment.Modules TimeZone local = TimeZone.CurrentTimeZone; TicksOffset = local.GetUtcOffset(local.ToLocalTime(DateTime.Now)).Ticks; - + m_log.Debug("[SUN] localtime offset is " + TicksOffset); // Align ticks with Second Life @@ -246,7 +246,7 @@ namespace OpenSim.Region.Environment.Modules avatar.ControllingClient.SendSunPos(Position, Velocity, CurrentTime, SecondsPerSunCycle, SecondsPerYear, OrbitalPosition); } - // set estate settings for region access to sun position + // set estate settings for region access to sun position m_scene.RegionInfo.EstateSettings.sunPosition = Position; } @@ -281,7 +281,7 @@ namespace OpenSim.Region.Environment.Modules Position = LLVector3.Rot(Position,Tilt); - // Finally we shift the axis so that more of the + // Finally we shift the axis so that more of the // circle is above the horizon than below. This // makes the nights shorter than the days. diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/BMP.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/BMP.cs index eb981d9..98d69a5 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/BMP.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/BMP.cs @@ -31,9 +31,9 @@ using OpenSim.Region.Environment.Interfaces; namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders { /// - /// A generic windows bitmap loader. + /// A generic windows bitmap loader. /// Should be capable of handling 24-bit RGB images. - /// + /// /// Uses the System.Drawing filesystem loader. /// internal class BMP : GenericSystemDrawing diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GenericSystemDrawing.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GenericSystemDrawing.cs index 484bb89..bb819e1 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GenericSystemDrawing.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GenericSystemDrawing.cs @@ -33,7 +33,7 @@ using OpenSim.Region.Environment.Interfaces; namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders { /// - /// A virtual class designed to have methods overloaded, + /// A virtual class designed to have methods overloaded, /// this class provides an interface for a generic image /// saving and loading mechanism, but does not specify the /// format. It should not be insubstantiated directly. @@ -99,7 +99,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders } /// - /// Protected method, generates a grayscale bitmap + /// Protected method, generates a grayscale bitmap /// image from a specified terrain channel. /// /// The terrain channel to export to bitmap @@ -134,7 +134,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders } /// - /// Protected method, generates a coloured bitmap + /// Protected method, generates a coloured bitmap /// image from a specified terrain channel. /// /// The terrain channel to export to bitmap diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs index 0c4e3de..7bf88f0 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs @@ -43,14 +43,14 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes double sum = 0.0; double step2 = 0.0; - // compute delta map + // compute delta map for (x = 0; x < map.Width; x++) { for (y = 0; y < map.Height; y++) { double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); - if (z > 0) // add in non-zero amount + if (z > 0) // add in non-zero amount { sum += map[x, y] * z; step2 += z; @@ -60,14 +60,14 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes double avg = sum / step2; - // blend in map + // blend in map for (x = 0; x < map.Width; x++) { for (y = 0; y < map.Height; y++) { double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength) * duration; - if (z > 0) // add in non-zero amount + if (z > 0) // add in non-zero amount { if (z > 1.0) z = 1.0; diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/OlsenSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/OlsenSphere.cs index f2a1800..6df8408 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/OlsenSphere.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/OlsenSphere.cs @@ -32,8 +32,8 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes { /// /// Speed-Optimised Hybrid Erosion Brush - /// - /// As per Jacob Olsen's Paper + /// + /// As per Jacob Olsen's Paper /// http://www.oddlabs.com/download/terrain_generation.pdf /// public class OlsenSphere : ITerrainPaintableEffect @@ -164,7 +164,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes { double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); - if (z > 0) // add in non-zero amount + if (z > 0) // add in non-zero amount { const int NEIGHBOUR_ME = 4; const int NEIGHBOUR_MAX = 9; diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/SmoothSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/SmoothSphere.cs index 49946fd..fc0a579 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/SmoothSphere.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/SmoothSphere.cs @@ -43,14 +43,14 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes double area = strength; double step = strength / 4.0; - // compute delta map + // compute delta map for (x = 0; x < map.Width; x++) { for (y = 0; y < map.Height; y++) { double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); - if (z > 0) // add in non-zero amount + if (z > 0) // add in non-zero amount { double average = 0.0; int avgsteps = 0; @@ -69,14 +69,14 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes } } } - // blend in map + // blend in map for (x = 0; x < map.Width; x++) { for (y = 0; y < map.Height; y++) { double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); - if (z > 0) // add in non-zero amount + if (z > 0) // add in non-zero amount { double da = z; double a = (map[x, y] - tweak[x, y]) * da; diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/WeatherSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/WeatherSphere.cs index 753d171..b3aa732 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/WeatherSphere.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/WeatherSphere.cs @@ -160,7 +160,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes { double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); - if (z > 0) // add in non-zero amount + if (z > 0) // add in non-zero amount { const int NEIGHBOUR_ME = 4; const int NEIGHBOUR_MAX = 9; diff --git a/OpenSim/Region/Environment/Scenes/EntityBase.cs b/OpenSim/Region/Environment/Scenes/EntityBase.cs index 18a2851..4b6ca49 100644 --- a/OpenSim/Region/Environment/Scenes/EntityBase.cs +++ b/OpenSim/Region/Environment/Scenes/EntityBase.cs @@ -35,7 +35,7 @@ namespace OpenSim.Region.Environment.Scenes { [Serializable] public abstract class EntityBase : ISerializable - { + { /// /// The scene to which this entity belongs /// @@ -56,7 +56,7 @@ namespace OpenSim.Region.Environment.Scenes protected string m_name; /// - /// + /// /// public virtual string Name { @@ -67,7 +67,7 @@ namespace OpenSim.Region.Environment.Scenes protected LLVector3 m_pos; /// - /// + /// /// public virtual LLVector3 AbsolutePosition { @@ -79,7 +79,7 @@ namespace OpenSim.Region.Environment.Scenes protected LLVector3 m_rotationalvelocity; /// - /// + /// /// public virtual LLVector3 Velocity { @@ -118,7 +118,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// public abstract void UpdateMovement(); diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index aa22740..352fdf9 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs @@ -93,7 +93,7 @@ namespace OpenSim.Region.Environment.Scenes set { // If we're not doing the initial set - // Then we've got to remove the previous + // Then we've got to remove the previous // event handler try { @@ -104,7 +104,7 @@ namespace OpenSim.Region.Environment.Scenes // This occurs when storing to _PhyScene the first time. // Is there a better way to check the event handler before // getting here - // This can be safely ignored. We're setting the first inital + // This can be safely ignored. We're setting the first inital // there are no event handler's registered. } @@ -120,7 +120,7 @@ namespace OpenSim.Region.Environment.Scenes { ScenePresences.Clear(); } - + //SceneObjects.Clear(); Entities.Clear(); } @@ -235,7 +235,7 @@ namespace OpenSim.Region.Environment.Scenes for (int i = 0; i < m_updateList.Count; i++) { EntityBase entity = m_updateList[i]; - + // Don't abort the whole update if one entity happens to give us an exception. try { @@ -327,7 +327,7 @@ namespace OpenSim.Region.Environment.Scenes part.Undo(); } - + } @@ -341,7 +341,7 @@ namespace OpenSim.Region.Environment.Scenes public void AttachObject(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, LLQuaternion rot) { // Calls attach with a Zero position - + AttachObject(remoteClient, objectLocalID, AttachmentPt, rot, LLVector3.Zero); } public void RezSingleAttachment(IClientAPI remoteClient, LLUUID itemID, uint AttachmentPt,uint ItemFlags, uint NextOwnerMask) @@ -364,8 +364,8 @@ namespace OpenSim.Region.Environment.Scenes // To LocalId or LLUUID, *THAT* is the question. How now Brown LLUUID?? public void DetachSingleAttachmentToInv(LLUUID itemID, IClientAPI remoteClient) { - - if (itemID == LLUUID.Zero) // If this happened, someone made a mistake.... + + if (itemID == LLUUID.Zero) // If this happened, someone made a mistake.... return; List EntityList = GetEntities(); @@ -443,14 +443,14 @@ namespace OpenSim.Region.Environment.Scenes { remoteClient.SendAgentAlertMessage("You don't have sufficient permissions to attach this object", false); } - + } } } } - + public ScenePresence CreateAndAddScenePresence(IClientAPI client, bool child, AvatarAppearance appearance) { ScenePresence newAvatar = null; @@ -627,13 +627,13 @@ namespace OpenSim.Region.Environment.Scenes return result; } - + /// /// Get the controlling client for the given avatar, if there is one. - /// - /// FIXME: The only user of the method right now is Caps.cs, in order to resolve a client API since it can't + /// + /// FIXME: The only user of the method right now is Caps.cs, in order to resolve a client API since it can't /// use the ScenePresence. This could be better solved in a number of ways - we could establish an - /// OpenSim.Framework.IScenePresence, or move the caps code into a region package (which might be the more + /// OpenSim.Framework.IScenePresence, or move the caps code into a region package (which might be the more /// suitable solution). /// /// @@ -641,12 +641,12 @@ namespace OpenSim.Region.Environment.Scenes public IClientAPI GetControllingClient(LLUUID agentId) { ScenePresence presence = GetScenePresence(agentId); - + if (presence != null) { return presence.ControllingClient; } - + return null; } @@ -657,7 +657,7 @@ namespace OpenSim.Region.Environment.Scenes public List GetScenePresences(FilterAvatarList filter) { // No locking of scene presences here since we're passing back a list... - + List result = new List(); List ScenePresencesList = GetScenePresences(); @@ -681,7 +681,7 @@ namespace OpenSim.Region.Environment.Scenes { ScenePresence sp; ScenePresences.TryGetValue(agentID, out sp); - + return sp; } @@ -764,13 +764,13 @@ namespace OpenSim.Region.Environment.Scenes { if (!presence.IsChildAgent) { - avatar = presence; + avatar = presence; return true; } else { m_log.WarnFormat( - "[INNER SCENE]: Requested avatar {0} could not be found in scene {1} since it is only registered as a child agent!", + "[INNER SCENE]: Requested avatar {0} could not be found in scene {1} since it is only registered as a child agent!", avatarId, m_parentScene.RegionInfo.RegionName); } } @@ -846,8 +846,8 @@ namespace OpenSim.Region.Environment.Scenes { // Only send child agents stuff in their draw distance. // This will need to be done for every agent once we figure out - // what we're going to use to store prim that agents already got - // the initial update for and what we'll use to limit the + // what we're going to use to store prim that agents already got + // the initial update for and what we'll use to limit the // space we check for new objects on movement. if (presence.IsChildAgent && m_parentScene.m_seeIntoRegionFromNeighbor) @@ -889,7 +889,7 @@ namespace OpenSim.Region.Environment.Scenes #region Client Event handlers /// - /// + /// /// /// /// @@ -918,7 +918,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// This handles the nifty little tool tip that you get when you drag your mouse over an object + /// This handles the nifty little tool tip that you get when you drag your mouse over an object /// Send to the Object Group to process. We don't know enough to service the request /// /// @@ -936,7 +936,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// /// @@ -954,7 +954,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// /// @@ -972,7 +972,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// /// @@ -1009,7 +1009,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// /// @@ -1019,13 +1019,13 @@ namespace OpenSim.Region.Environment.Scenes SceneObjectGroup group = GetGroupByPrim(localID); if (group != null) { - + LLVector3 oldPos = group.AbsolutePosition; if (group.RootPart.m_IsAttachment) { group.UpdateGroupPosition(pos); } - else + else { if (!m_parentScene.ExternalChecks.ExternalChecksCanObjectEntry(group.UUID,pos) && !group.RootPart.m_IsAttachment) { @@ -1041,7 +1041,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// /// @@ -1059,7 +1059,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// /// @@ -1094,7 +1094,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// /// @@ -1111,7 +1111,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// /// @@ -1141,7 +1141,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// /// @@ -1223,7 +1223,7 @@ namespace OpenSim.Region.Environment.Scenes { parenPrim.LinkToGroup(sceneObj); } - + // We need to explicitly resend the newly link prim's object properties since no other actions // occur on link to invoke this elsewhere (such as object selection) parenPrim.GetProperties(client); @@ -1232,7 +1232,7 @@ namespace OpenSim.Region.Environment.Scenes /// /// Delink a linkset /// - /// + /// public void DelinkObjects(List primIds) { SceneObjectGroup parenPrim = null; @@ -1278,7 +1278,7 @@ namespace OpenSim.Region.Environment.Scenes else { // If the first scan failed, we need to do a /deep/ scan of the linkages. This is /really/ slow - // We know that this is not the root prim now essentially, so we don't have to worry about remapping + // We know that this is not the root prim now essentially, so we don't have to worry about remapping // which one is the root prim bool delinkedSomething = false; for (int i = 0; i < primIds.Count; i++) @@ -1324,7 +1324,7 @@ namespace OpenSim.Region.Environment.Scenes } } } - + //Protip: In my day, we didn't call them searchable objects, we called them limited point-to-point joints //aka ObjectFlags.JointWheel = IncludeInSearch @@ -1356,7 +1356,7 @@ namespace OpenSim.Region.Environment.Scenes public void DuplicateObject(uint originalPrim, LLVector3 offset, uint flags, LLUUID AgentID, LLUUID GroupID) { m_log.DebugFormat("[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", originalPrim, offset, AgentID); - + List EntityList = GetEntities(); SceneObjectGroup originPrim = null; @@ -1405,7 +1405,7 @@ namespace OpenSim.Region.Environment.Scenes /// public float Vector3Distance(Vector3 v1, Vector3 v2) { - // We don't really need the double floating point precision... + // We don't really need the double floating point precision... // so casting it to a single return diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 6aef45e..5e2ccec 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs @@ -40,7 +40,7 @@ namespace OpenSim.Region.Environment.Scenes { public partial class Scene { - private static readonly ILog m_log + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); /// @@ -49,14 +49,14 @@ namespace OpenSim.Region.Environment.Scenes public void StartScripts() { m_log.Info("[PRIM INVENTORY]: Starting scripts in scene"); - + foreach (EntityBase group in Entities.Values) { if (group is SceneObjectGroup) { ((SceneObjectGroup) group).StartScripts(); } - } + } } /// @@ -67,9 +67,9 @@ namespace OpenSim.Region.Environment.Scenes /// in which the item is to be placed. public void AddInventoryItem(IClientAPI remoteClient, InventoryItemBase item) { - CachedUserInfo userInfo + CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); - + if (userInfo != null) { userInfo.AddItem(item); @@ -91,17 +91,17 @@ namespace OpenSim.Region.Environment.Scenes m_log.ErrorFormat( "[AGENT INVENTORY]: Agent {0} {1} was not found for add of item {2} {3}", remoteClient.Name, remoteClient.AgentId, item.Name, item.ID); - + return; - } + } } - /// + /// /// AddInventoryItem(LLUUID, InventoryItemBase) /// /// The ID of the avatar /// The item. This structure contains all the item metadata, including the folder - /// in which the item is to be placed. + /// in which the item is to be placed. public void AddInventoryItem(LLUUID avatarId, InventoryItemBase item) { ScenePresence avatar; @@ -131,7 +131,7 @@ namespace OpenSim.Region.Environment.Scenes if (userInfo.RootFolder != null) { InventoryItemBase item = userInfo.RootFolder.FindItem(itemID); - + if (item != null) { AssetBase asset = @@ -188,13 +188,13 @@ namespace OpenSim.Region.Environment.Scenes /// /// The prim which contains the item to update /// Indicates whether the script to update is currently running - /// + /// public void CapsUpdateTaskInventoryScriptAsset(IClientAPI remoteClient, LLUUID itemId, LLUUID primId, bool isScriptRunning, byte[] data) { // Retrieve group SceneObjectPart part = GetSceneObjectPart(primId); - SceneObjectGroup group = part.ParentGroup; + SceneObjectGroup group = part.ParentGroup; if (null == group) { m_log.ErrorFormat( @@ -204,36 +204,36 @@ namespace OpenSim.Region.Environment.Scenes return; } - + // Retrieve item TaskInventoryItem item = group.GetInventoryItem(part.LocalId, itemId); if (null == item) { return; } - + // Create new asset - // XXX Hardcoding the numbers is a temporary measure - need an enumeration for this + // XXX Hardcoding the numbers is a temporary measure - need an enumeration for this // There may well be one in libsecondlife AssetBase asset = CreateAsset(item.Name, item.Description, 10, 10, data); AssetCache.AddAsset(asset); - + // Update item with new asset item.AssetID = asset.FullID; group.UpdateInventoryItem(item); group.GetProperties(remoteClient); - - // Trigger rerunning of script (use TriggerRezScript event, see RezScript) + + // Trigger rerunning of script (use TriggerRezScript event, see RezScript) if (isScriptRunning) { group.StopScript(part.LocalId, item.ItemID); - group.StartScript(part.LocalId, item.ItemID); + group.StartScript(part.LocalId, item.ItemID); } } /// /// CapsUpdateTaskInventoryScriptAsset(IClientAPI, LLUUID, LLUUID, bool, byte[]) - /// + /// private void CapsUpdateTaskInventoryScriptAsset(LLUUID avatarId, LLUUID itemId, LLUUID primId, bool isScriptRunning, byte[] data) { @@ -276,7 +276,7 @@ namespace OpenSim.Region.Environment.Scenes if (userInfo != null && userInfo.RootFolder != null) { InventoryItemBase item = userInfo.RootFolder.FindItem(itemID); - + if (item != null) { if (LLUUID.Zero == transactionID) @@ -284,7 +284,7 @@ namespace OpenSim.Region.Environment.Scenes item.Name = itemUpd.Name; item.Description = itemUpd.Description; item.NextPermissions = itemUpd.NextPermissions; - item.CurrentPermissions |= 8; // Slam! + item.CurrentPermissions |= 8; // Slam! item.EveryOnePermissions = itemUpd.EveryOnePermissions; // TODO: Requires sanity checks @@ -323,7 +323,7 @@ namespace OpenSim.Region.Environment.Scenes "[AGENT INVENTORY]: Agent ID " + remoteClient.AgentId + " not found for an inventory item update."); } } - + /// /// Give an inventory item from one avatar to another /// @@ -333,35 +333,35 @@ namespace OpenSim.Region.Environment.Scenes public void GiveInventoryItem(IClientAPI recipientClient, LLUUID senderId, LLUUID itemId) { // Retrieve the item from the sender - CachedUserInfo senderUserInfo = CommsManager.UserProfileCacheService.GetUserDetails(senderId); - + CachedUserInfo senderUserInfo = CommsManager.UserProfileCacheService.GetUserDetails(senderId); + if (senderUserInfo == null) { m_log.ErrorFormat( "[AGENT INVENTORY]: Failed to find sending user {0} for item {1}", senderId, itemId); - + return; } if (senderUserInfo.RootFolder != null) { InventoryItemBase item = senderUserInfo.RootFolder.FindItem(itemId); - + if (item != null) { - if (!ExternalChecks.ExternalChecksBypassPermissions()) - { - if((item.CurrentPermissions & (uint)PermissionMask.Transfer) == 0) - return; - } + if (!ExternalChecks.ExternalChecksBypassPermissions()) + { + if ((item.CurrentPermissions & (uint)PermissionMask.Transfer) == 0) + return; + } // TODO get recipient's root folder - CachedUserInfo recipientUserInfo - = CommsManager.UserProfileCacheService.GetUserDetails(recipientClient.AgentId); - + CachedUserInfo recipientUserInfo + = CommsManager.UserProfileCacheService.GetUserDetails(recipientClient.AgentId); + if (recipientUserInfo != null) { - // Insert a copy of the item into the recipient + // Insert a copy of the item into the recipient InventoryItemBase itemCopy = new InventoryItemBase(); itemCopy.Owner = recipientClient.AgentId; itemCopy.Creator = senderId; @@ -372,37 +372,37 @@ namespace OpenSim.Region.Environment.Scenes itemCopy.AssetType = item.AssetType; itemCopy.InvType = item.InvType; itemCopy.Folder = recipientUserInfo.RootFolder.ID; - if (ExternalChecks.ExternalChecksPropagatePermissions()) - { - if(item.InvType == 6) - { - itemCopy.BasePermissions &= ~(uint)(PermissionMask.Copy | PermissionMask.Modify | PermissionMask.Transfer); - itemCopy.BasePermissions |= (item.CurrentPermissions & 7) << 13; - } - else - { - Console.WriteLine("Non-Prim item ==>"); - itemCopy.BasePermissions = item.BasePermissions & item.NextPermissions; - } - - itemCopy.CurrentPermissions = itemCopy.BasePermissions; - if((item.CurrentPermissions & 8) != 0) // Propagate slam bit - { - itemCopy.CurrentPermissions = item.NextPermissions; - itemCopy.BasePermissions=itemCopy.CurrentPermissions; - itemCopy.CurrentPermissions |= 8; - } - - itemCopy.NextPermissions = item.NextPermissions; - itemCopy.EveryOnePermissions = item.EveryOnePermissions & item.NextPermissions; - } - else - { - itemCopy.CurrentPermissions = item.CurrentPermissions; - itemCopy.NextPermissions = item.NextPermissions; - itemCopy.EveryOnePermissions = item.EveryOnePermissions & item.NextPermissions; - itemCopy.BasePermissions = item.BasePermissions; - } + if (ExternalChecks.ExternalChecksPropagatePermissions()) + { + if (item.InvType == 6) + { + itemCopy.BasePermissions &= ~(uint)(PermissionMask.Copy | PermissionMask.Modify | PermissionMask.Transfer); + itemCopy.BasePermissions |= (item.CurrentPermissions & 7) << 13; + } + else + { + Console.WriteLine("Non-Prim item ==>"); + itemCopy.BasePermissions = item.BasePermissions & item.NextPermissions; + } + + itemCopy.CurrentPermissions = itemCopy.BasePermissions; + if ((item.CurrentPermissions & 8) != 0) // Propagate slam bit + { + itemCopy.CurrentPermissions = item.NextPermissions; + itemCopy.BasePermissions=itemCopy.CurrentPermissions; + itemCopy.CurrentPermissions |= 8; + } + + itemCopy.NextPermissions = item.NextPermissions; + itemCopy.EveryOnePermissions = item.EveryOnePermissions & item.NextPermissions; + } + else + { + itemCopy.CurrentPermissions = item.CurrentPermissions; + itemCopy.NextPermissions = item.NextPermissions; + itemCopy.EveryOnePermissions = item.EveryOnePermissions & item.NextPermissions; + itemCopy.BasePermissions = item.BasePermissions; + } itemCopy.GroupID = item.GroupID; itemCopy.GroupOwned = item.GroupOwned; itemCopy.Flags = item.Flags; @@ -410,21 +410,21 @@ namespace OpenSim.Region.Environment.Scenes itemCopy.SaleType = item.SaleType; recipientUserInfo.AddItem(itemCopy); - - if (!ExternalChecks.ExternalChecksBypassPermissions()) - { - if((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) - senderUserInfo.DeleteItem(itemId); - } + + if (!ExternalChecks.ExternalChecksBypassPermissions()) + { + if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) + senderUserInfo.DeleteItem(itemId); + } // Let the recipient client know about this new item - recipientClient.SendBulkUpdateInventory(itemCopy); + recipientClient.SendBulkUpdateInventory(itemCopy); } else { m_log.ErrorFormat( - "[AGENT INVENTORY]: Could not find userinfo for recipient user {0}, {1} of item {2}, {3} from {4}", - recipientClient.Name, recipientClient.AgentId, item.Name, + "[AGENT INVENTORY]: Could not find userinfo for recipient user {0}, {1} of item {2}, {3} from {4}", + recipientClient.Name, recipientClient.AgentId, item.Name, item.ID, senderId); } } @@ -432,7 +432,7 @@ namespace OpenSim.Region.Environment.Scenes { m_log.ErrorFormat( "[AGENT INVENTORY]: Failed to find item {0} to give to {1}", itemId, senderId); - + return; } } @@ -440,7 +440,7 @@ namespace OpenSim.Region.Environment.Scenes { m_log.Error("[AGENT INVENTORY]: Failed to find item " + itemId.ToString() + ", no root folder"); return; - } + } } public void CopyInventoryItem(IClientAPI remoteClient, uint callbackID, LLUUID oldAgentID, LLUUID oldItemID, @@ -449,9 +449,9 @@ namespace OpenSim.Region.Environment.Scenes m_log.DebugFormat( "[AGENT INVENTORY]: CopyInventoryItem received by {0} with oldAgentID {1}, oldItemID {2}, new FolderID {3}, newName {4}", remoteClient.AgentId, oldAgentID, oldItemID, newFolderID, newName); - + InventoryItemBase item = CommsManager.UserProfileCacheService.libraryRoot.FindItem(oldItemID); - + if (item == null) { CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(oldAgentID); @@ -464,7 +464,7 @@ namespace OpenSim.Region.Environment.Scenes if (userInfo.RootFolder != null) { item = userInfo.RootFolder.FindItem(oldItemID); - + if (item == null) { m_log.Error("[AGENT INVENTORY]: Failed to find item " + oldItemID.ToString()); @@ -477,29 +477,29 @@ namespace OpenSim.Region.Environment.Scenes return; } } - - AssetBase asset + + AssetBase asset = AssetCache.GetAsset( item.AssetID, (item.AssetType == (int)AssetType.Texture ? true : false)); if (asset != null) { - if(remoteClient.AgentId == oldAgentID) - { - CreateNewInventoryItem( - remoteClient, newFolderID, callbackID, asset, item.BasePermissions, item.CurrentPermissions, item.EveryOnePermissions, item.NextPermissions); - } - else - { - CreateNewInventoryItem( - remoteClient, newFolderID, callbackID, asset, item.NextPermissions, item.NextPermissions, item.EveryOnePermissions & item.NextPermissions, item.NextPermissions); - } + if (remoteClient.AgentId == oldAgentID) + { + CreateNewInventoryItem( + remoteClient, newFolderID, callbackID, asset, item.BasePermissions, item.CurrentPermissions, item.EveryOnePermissions, item.NextPermissions); + } + else + { + CreateNewInventoryItem( + remoteClient, newFolderID, callbackID, asset, item.NextPermissions, item.NextPermissions, item.EveryOnePermissions & item.NextPermissions, item.NextPermissions); + } } else { m_log.ErrorFormat( "[AGENT INVENTORY]: Could not copy item {0} since asset {1} could not be found", - item.Name, item.AssetID); + item.Name, item.AssetID); } } @@ -530,18 +530,18 @@ namespace OpenSim.Region.Environment.Scenes "[AGENT INVENTORY]: Moving item {0} to {1} for {2}", itemID, folderID, remoteClient.AgentId); CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); - + if (userInfo == null) { m_log.Error("[AGENT INVENTORY]: Failed to find user " + remoteClient.AgentId.ToString()); - + return; } if (userInfo.RootFolder != null) { InventoryItemBase item = userInfo.RootFolder.FindItem(itemID); - + if (item != null) { if (newName != String.Empty) @@ -549,7 +549,7 @@ namespace OpenSim.Region.Environment.Scenes item.Name = newName; } item.Folder = folderID; - + userInfo.DeleteItem(item.ID); AddInventoryItem(remoteClient, item); @@ -557,23 +557,23 @@ namespace OpenSim.Region.Environment.Scenes else { m_log.Error("[AGENT INVENTORY]: Failed to find item " + itemID.ToString()); - + return; } } else { m_log.Error("[AGENT INVENTORY]: Failed to find item " + itemID.ToString() + ", no root folder"); - + return; } } private void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID folderID, uint callbackID, AssetBase asset, uint nextOwnerMask) - { - CreateNewInventoryItem(remoteClient, folderID, callbackID, asset, nextOwnerMask, nextOwnerMask, 0, nextOwnerMask); - } + { + CreateNewInventoryItem(remoteClient, folderID, callbackID, asset, nextOwnerMask, nextOwnerMask, 0, nextOwnerMask); + } /// /// Create a new inventory item. @@ -586,9 +586,9 @@ namespace OpenSim.Region.Environment.Scenes private void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID folderID, uint callbackID, AssetBase asset, uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask) { - CachedUserInfo userInfo + CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); - + if (userInfo != null) { InventoryItemBase item = new InventoryItemBase(); @@ -603,8 +603,8 @@ namespace OpenSim.Region.Environment.Scenes item.Folder = folderID; item.CurrentPermissions = currentMask; item.NextPermissions = nextOwnerMask; - item.EveryOnePermissions = everyoneMask; - item.BasePermissions = baseMask; + item.EveryOnePermissions = everyoneMask; + item.BasePermissions = baseMask; userInfo.AddItem(item); remoteClient.SendInventoryItemCreateUpdate(item); @@ -612,7 +612,7 @@ namespace OpenSim.Region.Environment.Scenes else { m_log.WarnFormat( - "No user details associated with client {0} uuid {1} in CreateNewInventoryItem!", + "No user details associated with client {0} uuid {1} in CreateNewInventoryItem!", remoteClient.Name, remoteClient.AgentId); } } @@ -637,12 +637,12 @@ namespace OpenSim.Region.Environment.Scenes byte wearableType, uint nextOwnerMask) { // m_log.DebugFormat("[AGENT INVENTORY]: Received request to create inventory item {0} in folder {1}", name, folderID); - + if (transactionID == LLUUID.Zero) { - CachedUserInfo userInfo + CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); - + if (userInfo != null) { ScenePresence presence; @@ -666,7 +666,7 @@ namespace OpenSim.Region.Environment.Scenes else { m_log.ErrorFormat( - "userInfo for agent uuid {0} unexpectedly null in CreateNewInventoryItem", + "userInfo for agent uuid {0} unexpectedly null in CreateNewInventoryItem", remoteClient.AgentId); } } @@ -677,10 +677,10 @@ namespace OpenSim.Region.Environment.Scenes { agentTransactions.HandleItemCreationFromTransaction( remoteClient, transactionID, folderID, callbackID, description, - name, invType, assetType, wearableType, nextOwnerMask); + name, invType, assetType, wearableType, nextOwnerMask); } - + } } @@ -693,13 +693,13 @@ namespace OpenSim.Region.Environment.Scenes { CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); - + if (userInfo == null) { m_log.WarnFormat( "[AGENT INVENTORY]: Failed to find user {0} {1} to delete inventory item {2}", remoteClient.Name, remoteClient.AgentId, itemID); - + return; } @@ -716,7 +716,7 @@ namespace OpenSim.Region.Environment.Scenes { CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); - + if (userInfo == null) { m_log.Warn("[AGENT INVENTORY]: Failed to find user " + remoteClient.AgentId.ToString()); @@ -726,13 +726,13 @@ namespace OpenSim.Region.Environment.Scenes if (userInfo.RootFolder != null) { InventoryItemBase folder = userInfo.RootFolder.FindItem(folderID); - + if (folder != null) { m_log.WarnFormat( "[AGENT INVENTORY]: Remove folder not implemented in request by {0} {1} for {2}", - remoteClient.Name, remoteClient.AgentId, folderID); - + remoteClient.Name, remoteClient.AgentId, folderID); + // doesn't work just yet, commented out. will fix in next patch. // userInfo.DeleteItem(folder); } @@ -760,7 +760,7 @@ namespace OpenSim.Region.Environment.Scenes /// /// public void RequestTaskInventory(IClientAPI remoteClient, uint primLocalID) - { + { SceneObjectGroup group = GetGroupByPrim(primLocalID); if (group != null) { @@ -808,7 +808,7 @@ namespace OpenSim.Region.Environment.Scenes localID); } } - + /// /// Move the given item in the given prim to a folder in the client's inventory /// @@ -819,33 +819,33 @@ namespace OpenSim.Region.Environment.Scenes public void MoveTaskInventoryItem(IClientAPI remoteClient, LLUUID folderId, uint primLocalId, LLUUID itemId) { SceneObjectPart part = GetSceneObjectPart(primLocalId); - + if (null == part) { m_log.WarnFormat( "[PRIM INVENTORY]: " + "Move of inventory item {0} from prim with local id {1} failed because the prim could not be found", itemId, primLocalId); - + return; - } - + } + TaskInventoryItem taskItem = part.GetInventoryItem(itemId); - + if (null == taskItem) { // Console already notified of error in GetInventoryItem return; } - + // Only owner can copy if (remoteClient.AgentId != taskItem.OwnerID) { return; } - + InventoryItemBase agentItem = new InventoryItemBase(); - + agentItem.ID = LLUUID.Random(); agentItem.Creator = taskItem.CreatorID; agentItem.Owner = remoteClient.AgentId; @@ -855,33 +855,33 @@ namespace OpenSim.Region.Environment.Scenes agentItem.AssetType = taskItem.Type; agentItem.InvType = taskItem.InvType; agentItem.Folder = folderId; - + if ((remoteClient.AgentId != taskItem.OwnerID) && ExternalChecks.ExternalChecksPropagatePermissions()) { agentItem.BasePermissions = taskItem.NextOwnerMask; agentItem.CurrentPermissions = taskItem.NextOwnerMask; agentItem.NextPermissions = taskItem.NextOwnerMask; - agentItem.EveryOnePermissions = taskItem.EveryoneMask & taskItem.NextOwnerMask; + agentItem.EveryOnePermissions = taskItem.EveryoneMask & taskItem.NextOwnerMask; } else { agentItem.BasePermissions = taskItem.BaseMask; agentItem.CurrentPermissions = taskItem.OwnerMask; agentItem.NextPermissions = taskItem.NextOwnerMask; - agentItem.EveryOnePermissions = taskItem.EveryoneMask; + agentItem.EveryOnePermissions = taskItem.EveryoneMask; } - + AddInventoryItem(remoteClient, agentItem); - if (!ExternalChecks.ExternalChecksBypassPermissions()) - { - if((taskItem.OwnerMask & (uint)PermissionMask.Copy) == 0) - part.RemoveInventoryItem(itemId); - } - + if (!ExternalChecks.ExternalChecksBypassPermissions()) + { + if ((taskItem.OwnerMask & (uint)PermissionMask.Copy) == 0) + part.RemoveInventoryItem(itemId); + } + } /// - /// Update an item in a prim (task) inventory. + /// Update an item in a prim (task) inventory. /// This method does not handle scripts, RezScript(IClientAPI, LLUUID, unit) /// /// @@ -915,14 +915,14 @@ namespace OpenSim.Region.Environment.Scenes { part.ParentGroup.AddInventoryItem(remoteClient, primLocalID, item, copyID); m_log.InfoFormat( - "[PRIM INVENTORY]: Update with item {0} requested of prim {1} for {2}", + "[PRIM INVENTORY]: Update with item {0} requested of prim {1} for {2}", item.Name, primLocalID, remoteClient.Name); part.ParentGroup.GetProperties(remoteClient); - if (!ExternalChecks.ExternalChecksBypassPermissions()) - { - if((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) - RemoveInventoryItem(remoteClient, itemID); - } + if (!ExternalChecks.ExternalChecksBypassPermissions()) + { + if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) + RemoveInventoryItem(remoteClient, itemID); + } } else { @@ -951,22 +951,22 @@ namespace OpenSim.Region.Environment.Scenes public void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID) { LLUUID copyID = LLUUID.Random(); - + if (itemID != LLUUID.Zero) { CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); - + if (userInfo != null && userInfo.RootFolder != null) { InventoryItemBase item = userInfo.RootFolder.FindItem(itemID); - + // Try library // XXX clumsy, possibly should be one call if (null == item) { item = CommsManager.UserProfileCacheService.libraryRoot.FindItem(itemID); } - + if (item != null) { SceneObjectPart part = GetSceneObjectPart(localID); @@ -975,7 +975,7 @@ namespace OpenSim.Region.Environment.Scenes part.ParentGroup.AddInventoryItem(remoteClient, localID, item, copyID); part.ParentGroup.StartScript(localID, copyID); part.ParentGroup.GetProperties(remoteClient); - + // m_log.InfoFormat("[PRIMINVENTORY]: " + // "Rezzed script {0} into prim local ID {1} for user {2}", // item.inventoryName, localID, remoteClient.Name); @@ -1000,10 +1000,10 @@ namespace OpenSim.Region.Environment.Scenes else // If the itemID is zero then the script has been rezzed directly in an object's inventory { // not yet implemented - // TODO Need to get more details from original RezScript packet + // TODO Need to get more details from original RezScript packet // XXX jc tmp // AssetBase asset = CreateAsset("chimney sweep", "sailor.lsl", 10, 10, null); -// AssetCache.AddAsset(asset); +// AssetCache.AddAsset(asset); } } @@ -1023,11 +1023,11 @@ namespace OpenSim.Region.Environment.Scenes else { foreach (DeRezObjectPacket.ObjectDataBlock Data in DeRezPacket.ObjectData) - { + { // m_log.DebugFormat( // "[AGENT INVENTORY]: Received request to derez {0} into folder {1}", // Data.ObjectLocalID, DeRezPacket.AgentBlock.DestinationID); - + EntityBase selectedEnt = null; //m_log.Info("[CLIENT]: LocalID:" + Data.ObjectLocalID.ToString()); @@ -1046,9 +1046,9 @@ namespace OpenSim.Region.Environment.Scenes bool permissionToTake = false; bool permissionToDelete = false; if (DeRezPacket.AgentBlock.Destination == 1)// Take Copy - { + { permissionToTake = ExternalChecks.ExternalChecksCanTakeCopyObject(((SceneObjectGroup)selectedEnt).UUID, remoteClient.AgentId); - permissionToDelete = false; //Just taking copy! + permissionToDelete = false; //Just taking copy! } else if (DeRezPacket.AgentBlock.Destination == 4) //Take @@ -1094,27 +1094,27 @@ namespace OpenSim.Region.Environment.Scenes item.Folder = DeRezPacket.AgentBlock.DestinationID; if ((remoteClient.AgentId != objectGroup.RootPart.OwnerID) && ExternalChecks.ExternalChecksPropagatePermissions()) { - uint perms=objectGroup.GetEffectivePermissions(); - uint nextPerms=(perms & 7) << 13; - if((nextPerms & (uint)PermissionMask.Copy) == 0) - perms &= ~(uint)PermissionMask.Copy; - if((nextPerms & (uint)PermissionMask.Transfer) == 0) - perms &= ~(uint)PermissionMask.Transfer; - if((nextPerms & (uint)PermissionMask.Modify) == 0) - perms &= ~(uint)PermissionMask.Modify; + uint perms=objectGroup.GetEffectivePermissions(); + uint nextPerms=(perms & 7) << 13; + if ((nextPerms & (uint)PermissionMask.Copy) == 0) + perms &= ~(uint)PermissionMask.Copy; + if ((nextPerms & (uint)PermissionMask.Transfer) == 0) + perms &= ~(uint)PermissionMask.Transfer; + if ((nextPerms & (uint)PermissionMask.Modify) == 0) + perms &= ~(uint)PermissionMask.Modify; item.BasePermissions = perms & objectGroup.RootPart.NextOwnerMask; item.CurrentPermissions = item.BasePermissions; item.NextPermissions = objectGroup.RootPart.NextOwnerMask; - item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask & objectGroup.RootPart.NextOwnerMask; - item.CurrentPermissions |= 8; // Slam! + item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask & objectGroup.RootPart.NextOwnerMask; + item.CurrentPermissions |= 8; // Slam! } else { item.BasePermissions = objectGroup.GetEffectivePermissions(); item.CurrentPermissions = objectGroup.GetEffectivePermissions(); item.NextPermissions = objectGroup.RootPart.NextOwnerMask; - item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask; + item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask; } // TODO: add the new fields (Flags, Sale info, etc) @@ -1201,15 +1201,15 @@ namespace OpenSim.Region.Environment.Scenes item.BasePermissions = objectGroup.RootPart.NextOwnerMask; item.CurrentPermissions = objectGroup.RootPart.NextOwnerMask; item.NextPermissions = objectGroup.RootPart.NextOwnerMask; - item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask & objectGroup.RootPart.NextOwnerMask; + item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask & objectGroup.RootPart.NextOwnerMask; } - else - { + else + { item.BasePermissions = objectGroup.GetEffectivePermissions(); item.CurrentPermissions = objectGroup.GetEffectivePermissions(); item.NextPermissions = objectGroup.RootPart.NextOwnerMask; - item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask; - } + item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask; + } userInfo.AddItem(item); @@ -1218,7 +1218,7 @@ namespace OpenSim.Region.Environment.Scenes { remoteClient.SendInventoryItemCreateUpdate(item); } - + } } } @@ -1250,7 +1250,7 @@ namespace OpenSim.Region.Environment.Scenes item.Name = asset.Name; item.AssetType = asset.Type; item.InvType = asset.InvType; - + // Sticking it in root folder for now.. objects folder later? item.Folder = userInfo.RootFolder.ID;// DeRezPacket.AgentBlock.DestinationID; @@ -1259,14 +1259,14 @@ namespace OpenSim.Region.Environment.Scenes item.BasePermissions = objectGroup.RootPart.NextOwnerMask; item.CurrentPermissions = objectGroup.RootPart.NextOwnerMask; item.NextPermissions = objectGroup.RootPart.NextOwnerMask; - item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask & objectGroup.RootPart.NextOwnerMask; + item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask & objectGroup.RootPart.NextOwnerMask; } else { item.BasePermissions = objectGroup.RootPart.BaseMask; item.CurrentPermissions = objectGroup.RootPart.OwnerMask; item.NextPermissions = objectGroup.RootPart.NextOwnerMask; - item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask; + item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask; } userInfo.AddItem(item); @@ -1345,12 +1345,12 @@ namespace OpenSim.Region.Environment.Scenes LLVector3 scale = new LLVector3(0.5f, 0.5f, 0.5f); - + LLVector3 pos = GetNewRezLocation( - RayStart, RayEnd, RayTargetID, new LLQuaternion(0, 0, 0, 1), + RayStart, RayEnd, RayTargetID, new LLQuaternion(0, 0, 0, 1), BypassRayCast, bRayEndIsIntersection,true,scale, false); - - + + // Rez object CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); @@ -1359,14 +1359,14 @@ namespace OpenSim.Region.Environment.Scenes if (userInfo.RootFolder != null) { InventoryItemBase item = userInfo.RootFolder.FindItem(itemID); - + if (item != null) { AssetBase rezAsset = AssetCache.GetAsset(item.AssetID, false); if (rezAsset != null) { - string xmlData = Helpers.FieldToUTF8String(rezAsset.Data); + string xmlData = Helpers.FieldToUTF8String(rezAsset.Data); SceneObjectGroup group = new SceneObjectGroup(this, m_regionHandle, xmlData); if (!ExternalChecks.ExternalChecksCanRezObject(group.Children.Count,remoteClient.AgentId, pos) && !attachment) { @@ -1401,10 +1401,10 @@ namespace OpenSim.Region.Environment.Scenes if (attachment) isAttachment = " Object was an attachment"; - + m_log.Error("[OJECTREZ]: Error rezzing ItemID: " + itemID + " object has no rootpart." + isAttachment); } - + // Since renaming the item in the inventory does not affect the name stored // in the serialization, transfer the correct name from the inventory to the // object itself before we rez. @@ -1413,18 +1413,18 @@ namespace OpenSim.Region.Environment.Scenes List partList = new List(group.Children.Values); - if(rootPart.OwnerID != item.Owner) - { - if((item.CurrentPermissions & 8) != 0) - { - foreach (SceneObjectPart part in partList) - { - part.EveryoneMask = item.EveryOnePermissions; - part.NextOwnerMask = item.NextPermissions; - } - } - group.ApplyNextOwnerPermissions(); - } + if (rootPart.OwnerID != item.Owner) + { + if ((item.CurrentPermissions & 8) != 0) + { + foreach (SceneObjectPart part in partList) + { + part.EveryoneMask = item.EveryOnePermissions; + part.NextOwnerMask = item.NextPermissions; + } + } + group.ApplyNextOwnerPermissions(); + } foreach (SceneObjectPart part in partList) { @@ -1434,13 +1434,13 @@ namespace OpenSim.Region.Environment.Scenes part.OwnerID = item.Owner; part.ChangeInventoryOwner(item.Owner); } - else if(((item.CurrentPermissions & 8) != 0) && (!attachment)) // Slam! - { + else if (((item.CurrentPermissions & 8) != 0) && (!attachment)) // Slam! + { part.EveryoneMask = item.EveryOnePermissions; part.NextOwnerMask = item.NextPermissions; - } + } } - + rootPart.TrimPermissions(); if (!attachment) @@ -1451,11 +1451,11 @@ namespace OpenSim.Region.Environment.Scenes } group.ApplyPhysics(m_physicalPrim); } - + group.StartScripts(); - + if (!attachment) rootPart.ScheduleFullUpdate(); @@ -1505,18 +1505,18 @@ namespace OpenSim.Region.Environment.Scenes List partList = new List(group.Children.Values); - if(rootPart.OwnerID != item.OwnerID) - { - if((item.OwnerMask & 8) != 0) - { - foreach (SceneObjectPart part in partList) - { - part.EveryoneMask = item.EveryoneMask; - part.NextOwnerMask = item.NextOwnerMask; - } - } - group.ApplyNextOwnerPermissions(); - } + if (rootPart.OwnerID != item.OwnerID) + { + if ((item.OwnerMask & 8) != 0) + { + foreach (SceneObjectPart part in partList) + { + part.EveryoneMask = item.EveryoneMask; + part.NextOwnerMask = item.NextOwnerMask; + } + } + group.ApplyNextOwnerPermissions(); + } foreach (SceneObjectPart part in partList) { @@ -1526,11 +1526,11 @@ namespace OpenSim.Region.Environment.Scenes part.OwnerID = item.OwnerID; part.ChangeInventoryOwner(item.OwnerID); } - else if((item.OwnerMask & 8) != 0) // Slam! - { - part.EveryoneMask = item.EveryoneMask; - part.NextOwnerMask = item.NextOwnerMask; - } + else if ((item.OwnerMask & 8) != 0) // Slam! + { + part.EveryoneMask = item.EveryoneMask; + part.NextOwnerMask = item.NextOwnerMask; + } } rootPart.TrimPermissions(); if (group.RootPart.Shape.PCode == (byte)PCode.Prim) @@ -1548,6 +1548,6 @@ namespace OpenSim.Region.Environment.Scenes } return null; } - + } } diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs index f55d822..c486e28 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs @@ -35,7 +35,7 @@ namespace OpenSim.Region.Environment.Scenes public partial class Scene { /// - /// + /// /// /// /// @@ -81,7 +81,7 @@ namespace OpenSim.Region.Environment.Scenes foreach (EntityBase ent in EntitieList) { if (ent is SceneObjectGroup) - { + { if (((SceneObjectGroup) ent).LocalId == primLocalID) { // A prim is only tainted if it's allowed to be edited by the person clicking it. @@ -98,7 +98,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// /// @@ -139,10 +139,10 @@ namespace OpenSim.Region.Environment.Scenes agentId, groupId, final, groupOwned, removeContribution, parcelLocalID, parcelArea, parcelPrice, authenticated); // First, allow all validators a stab at it - m_eventManager.TriggerValidateLandBuy(this, args); + m_eventManager.TriggerValidateLandBuy(this, args); // Then, check validation and transfer - m_eventManager.TriggerLandBuy(this, args); + m_eventManager.TriggerLandBuy(this, args); } public virtual void ProcessObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient) diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 1964ef4..32dc7d5 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -98,7 +98,7 @@ namespace OpenSim.Region.Environment.Scenes /// Each agent has its own capabilities handler. /// protected Dictionary m_capsHandlers = new Dictionary(); - + protected BaseHttpServer m_httpListener; protected Dictionary Modules = new Dictionary(); @@ -135,7 +135,7 @@ namespace OpenSim.Region.Environment.Scenes private int m_update_backup = 200; private int m_update_terrain = 50; private int m_update_land = 1; - + private int frameMS = 0; private int physicsMS2 = 0; @@ -201,7 +201,7 @@ namespace OpenSim.Region.Environment.Scenes get { return m_innerScene.Entities; } set { m_innerScene.Entities = value; } } - + public Dictionary m_restorePresences { get { return m_innerScene.RestorePresences; } @@ -324,14 +324,14 @@ namespace OpenSim.Region.Environment.Scenes public override bool OtherRegionUp(RegionInfo otherRegion) { - // Another region is up. + // Another region is up. // Gets called from Grid Comms (SceneCommunicationService<---RegionListener<----LocalBackEnd<----OGS1) - // We have to tell all our ScenePresences about it.. + // We have to tell all our ScenePresences about it.. // and add it to the neighbor list. // We only add it to the neighbor list if it's within 1 region from here. - // Agents may have draw distance values that cross two regions though, so - // we add it to the notify list regardless of distance. + // Agents may have draw distance values that cross two regions though, so + // we add it to the notify list regardless of distance. // We'll check the agent's draw distance before notifying them though. @@ -339,9 +339,9 @@ namespace OpenSim.Region.Environment.Scenes { for (int i = 0; i < m_neighbours.Count; i++) { - // The purpose of this loop is to re-update the known neighbors + // The purpose of this loop is to re-update the known neighbors // when another region comes up on top of another one. - // The latest region in that location ends up in the + // The latest region in that location ends up in the // 'known neighbors list' // Additionally, the commFailTF property gets reset to false. if (m_neighbours[i].RegionHandle == otherRegion.RegionHandle) @@ -354,7 +354,7 @@ namespace OpenSim.Region.Environment.Scenes } // If the value isn't in the neighbours, add it. - // If the RegionInfo isn't exact but is for the same XY World location, + // If the RegionInfo isn't exact but is for the same XY World location, // then the above loop will fix that. if (!(CheckNeighborRegion(otherRegion))) @@ -431,8 +431,8 @@ namespace OpenSim.Region.Environment.Scenes } } return found; - - + + } public virtual void Restart(float seconds) { @@ -461,8 +461,8 @@ namespace OpenSim.Region.Environment.Scenes } } - // The Restart timer has occured. - // We have to figure out if this is a notification or if the number of seconds specified in Restart + // The Restart timer has occured. + // We have to figure out if this is a notification or if the number of seconds specified in Restart // have elapsed. // If they have elapsed, call RestartNow() public void RestartTimer_Elapsed(object sender, ElapsedEventArgs e) @@ -500,7 +500,7 @@ namespace OpenSim.Region.Environment.Scenes } // This is a helper function that notifies root agents in this region that a new sim near them has come up - // This is in the form of a timer because when an instance of OpenSim.exe is started, + // This is in the form of a timer because when an instance of OpenSim.exe is started, // Even though the sims initialize, they don't listen until 'all of the sims are initialized' // If we tell an agent about a sim that's not listening yet, the agent will not be able to connect to it. // subsequently the agent will never see the region come back online. @@ -730,7 +730,7 @@ namespace OpenSim.Region.Environment.Scenes if (m_frame % m_update_entities == 0) m_innerScene.UpdateEntities(); - // run through entities that have scheduled themselves for + // run through entities that have scheduled themselves for // updates looking for updates(faster) if (m_frame % m_update_entitiesquick == 0) m_innerScene.ProcessUpdates(); @@ -743,13 +743,13 @@ namespace OpenSim.Region.Environment.Scenes { if (m_frame % m_update_events == 0) UpdateEvents(); - + if (m_frame % m_update_backup == 0) UpdateStorageBackup(); - + if (m_frame % m_update_terrain == 0) UpdateTerrain(); - + if (m_frame % m_update_land == 0) UpdateLand(); otherMS = System.Environment.TickCount - otherMS; @@ -800,14 +800,14 @@ namespace OpenSim.Region.Environment.Scenes // Get actual time dilation float tmpval = (m_timespan / (float)SinceLastFrame.TotalSeconds); - // If actual time dilation is greater then one, we're catching up, so subtract + // If actual time dilation is greater then one, we're catching up, so subtract // the amount that's greater then 1 from the time dilation if (tmpval > 1.0) { tmpval = tmpval - (tmpval - 1.0f); } m_timedilation = tmpval; - + m_lastupdate = DateTime.Now; } } @@ -858,9 +858,9 @@ namespace OpenSim.Region.Environment.Scenes { ForEachScenePresence(delegate(ScenePresence presence) { whatToDo(presence.ControllingClient); }); } - + /// - /// + /// /// /// public bool Backup() @@ -929,7 +929,7 @@ namespace OpenSim.Region.Environment.Scenes /// /// Loads the World heightmap /// - /// + /// public override void LoadWorldMap() { try @@ -946,7 +946,7 @@ namespace OpenSim.Region.Environment.Scenes { Heightmap = new TerrainChannel(map); } - + } catch (Exception e) { @@ -961,13 +961,13 @@ namespace OpenSim.Region.Environment.Scenes public void RegisterRegionWithGrid() { RegisterCommsEvents(); - + // These two 'commands' *must be* next to each other or sim rebooting fails. m_sceneGridService.RegisterRegion(RegionInfo); m_sceneGridService.InformNeighborsThatRegionisUp(RegionInfo); - + Dictionary dGridSettings = m_sceneGridService.GetGridSettings(); - + if (dGridSettings.ContainsKey("allow_forceful_banlines")) { if (dGridSettings["allow_forceful_banlines"] != "TRUE") @@ -984,11 +984,11 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// public void CreateTerrainTexture(bool temporary) { - //create a texture asset of the terrain + //create a texture asset of the terrain IMapImageGenerator terrain = RequestModuleInterface(); // Cannot create a map for a nonexistant heightmap yet. @@ -1129,7 +1129,7 @@ namespace OpenSim.Region.Environment.Scenes AssetCache.AddAsset(asset); } } - + } #endregion @@ -1211,7 +1211,7 @@ namespace OpenSim.Region.Environment.Scenes if (RayTargetID != LLUUID.Zero) { SceneObjectPart target = GetSceneObjectPart(RayTargetID); - + LLVector3 direction = LLVector3.Norm(RayEnd - RayStart); Vector3 AXOrigin = new Vector3(RayStart.X, RayStart.Y, RayStart.Z); Vector3 AXdirection = new Vector3(direction.X, direction.Y, direction.Z); @@ -1220,9 +1220,9 @@ namespace OpenSim.Region.Environment.Scenes { pos = target.AbsolutePosition; //m_log.Info("[OBJECT_REZ]: TargetPos: " + pos.ToString() + ", RayStart: " + RayStart.ToString() + ", RayEnd: " + RayEnd.ToString() + ", Volume: " + Util.GetDistanceTo(RayStart,RayEnd).ToString() + ", mag1: " + Util.GetMagnitude(RayStart).ToString() + ", mag2: " + Util.GetMagnitude(RayEnd).ToString()); - + // TODO: Raytrace better here - + //EntityIntersection ei = m_innerScene.GetClosestIntersectingPrim(new Ray(AXOrigin, AXdirection)); Ray NewRay = new Ray(AXOrigin, AXdirection); @@ -1246,13 +1246,13 @@ namespace OpenSim.Region.Environment.Scenes // Set the position to the intersection point LLVector3 offset = (normal * (ScaleOffset / 2f)); pos = (intersectionpoint + offset); - + // Un-offset the prim (it gets offset later by the consumer method) pos.Z -= 0.25F; - - } - - + + } + + return pos; } else @@ -1267,8 +1267,8 @@ namespace OpenSim.Region.Environment.Scenes if (ei.HitTF) { pos = new LLVector3(ei.ipoint.x, ei.ipoint.y, ei.ipoint.z); - } - + } + return pos; } } @@ -1284,7 +1284,7 @@ namespace OpenSim.Region.Environment.Scenes byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID, byte RayEndIsIntersection) { - + LLVector3 pos = GetNewRezLocation(RayStart, RayEnd, RayTargetID, rot, bypassRaycast, RayEndIsIntersection, true, new LLVector3(0.5f,0.5f,0.5f), false); if ( ExternalChecks.ExternalChecksCanRezObject(1,ownerID,pos)) @@ -1386,11 +1386,11 @@ namespace OpenSim.Region.Environment.Scenes /// /// Locate New region Handle and offset the prim position for the new region - /// + /// /// /// current position of Group /// Scene Object Group that we're crossing - + public void CrossPrimGroupIntoNewRegion(LLVector3 position, SceneObjectGroup grp) { if (grp == null) @@ -1424,7 +1424,7 @@ namespace OpenSim.Region.Environment.Scenes pos.X = ((pos.X - Constants.RegionSize)); newRegionHandle = Util.UIntsToLong((uint)((thisx + 1) * Constants.RegionSize), (uint)(thisy * Constants.RegionSize)); - + // x + 1 } else if (position.X < -0.1f) @@ -1449,7 +1449,7 @@ namespace OpenSim.Region.Environment.Scenes // Offset the positions for the new region across the border grp.OffsetForNewRegion(pos); - + CrossPrimGroupIntoNewRegion(newRegionHandle, grp); } @@ -1507,7 +1507,7 @@ namespace OpenSim.Region.Environment.Scenes if (sp != null) { // hack assetID until we get assetID into the XML format. - // LastOwnerID is used for group deeding, so when you do stuff + // LastOwnerID is used for group deeding, so when you do stuff // with the deeded object, it goes back to them grp.SetFromAssetID(grp.RootPart.LastOwnerID); @@ -1515,7 +1515,7 @@ namespace OpenSim.Region.Environment.Scenes } } } - + } } @@ -1533,16 +1533,16 @@ namespace OpenSim.Region.Environment.Scenes #region Add/Remove Avatar Methods /// - /// + /// /// - /// public override void AddNewClient(IClientAPI client, bool child) { m_log.DebugFormat( - "[CONNECTION DEBUGGING]: Creating new client for {0} at {1}", + "[CONNECTION DEBUGGING]: Creating new client for {0} at {1}", client.AgentId, RegionInfo.RegionName); - + SubscribeToClientEvents(client); ScenePresence presence; @@ -1618,7 +1618,7 @@ namespace OpenSim.Region.Environment.Scenes client.OnObjectDuplicateOnRay += doObjectDuplicateOnRay; client.OnUpdatePrimFlags += m_innerScene.UpdatePrimFlags; client.OnRequestObjectPropertiesFamily += m_innerScene.RequestObjectPropertiesFamily; - + client.OnRequestGodlikePowers += handleRequestGodlikePowers; client.OnGodKickUser += HandleGodlikeKickUser; client.OnObjectPermissions += HandleObjectPermissionsUpdate; @@ -1655,7 +1655,7 @@ namespace OpenSim.Region.Environment.Scenes client.OnSetStartLocationRequest += SetHomeRezPoint; client.OnUndo += m_innerScene.HandleUndo; - + EventManager.TriggerOnNewClient(client); } public virtual void TeleportClientHome(LLUUID AgentId, IClientAPI client) @@ -1669,14 +1669,14 @@ namespace OpenSim.Region.Environment.Scenes RequestTeleportLocation(client, homeRegion, homePostion,homeLookat,(uint)0); } } - + public void doObjectDuplicateOnRay(uint localID, uint dupeFlags, LLUUID AgentID, LLUUID GroupID, LLUUID RayTargetObj, LLVector3 RayEnd, LLVector3 RayStart, bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters, bool CopyRotates) - { + { LLVector3 pos; const bool frontFacesOnly = true; - + SceneObjectPart target = GetSceneObjectPart(localID); SceneObjectPart target2 = GetSceneObjectPart(RayTargetObj); @@ -1685,8 +1685,8 @@ namespace OpenSim.Region.Environment.Scenes LLVector3 direction = LLVector3.Norm(RayEnd - RayStart); Vector3 AXOrigin = new Vector3(RayStart.X, RayStart.Y, RayStart.Z); - Vector3 AXdirection = new Vector3(direction.X, direction.Y, direction.Z); - + Vector3 AXdirection = new Vector3(direction.X, direction.Y, direction.Z); + if (target2.ParentGroup != null) { pos = target2.AbsolutePosition; @@ -1717,7 +1717,7 @@ namespace OpenSim.Region.Environment.Scenes LLVector3 normal = new LLVector3(ei.normal.x, ei.normal.y, ei.normal.z); LLVector3 offset = (normal * (ScaleOffset / 2f)); pos = (intersectionpoint + offset); - + if (CopyCenters) { // now we cast a ray from inside the prim(absolute position) to one of it's faces along the face normal. @@ -1735,7 +1735,7 @@ namespace OpenSim.Region.Environment.Scenes normal.Z = ei2.normal.z; } } - + // Set the position to the intersection point offset = (normal * (ScaleOffset / 2f)); pos = (intersectionpoint + offset); @@ -1749,8 +1749,8 @@ namespace OpenSim.Region.Environment.Scenes return; } return; - - + + } @@ -1776,7 +1776,7 @@ namespace OpenSim.Region.Environment.Scenes UserProfile.HomeLookAtY = (int)lookAt.Y; UserProfile.HomeLookAtZ = (int)lookAt.Z; CommsManager.UserService.UpdateUserProfileProperties(UserProfile); - + remoteClient.SendAgentAlertMessage("Set home to here if supported by login service",false); } else @@ -1784,7 +1784,7 @@ namespace OpenSim.Region.Environment.Scenes remoteClient.SendAgentAlertMessage("Set Home request Failed",false); } } - + protected virtual ScenePresence CreateAndAddScenePresence(IClientAPI client, bool child) { AvatarAppearance appearance; @@ -1844,7 +1844,7 @@ namespace OpenSim.Region.Environment.Scenes m_sceneGridService.SendCloseChildAgentConnections(agentID, childknownRegions); RemoveCapsHandler(agentID); - + CommsManager.UserProfileCacheService.RemoveUser(agentID); } @@ -1870,7 +1870,7 @@ namespace OpenSim.Region.Environment.Scenes ForEachScenePresence( delegate(ScenePresence presence) { presence.CoarseLocationChange(); }); - + IAgentAssetTransactions agentTransactions = this.RequestModuleInterface(); if (agentTransactions != null) { @@ -1921,7 +1921,7 @@ namespace OpenSim.Region.Environment.Scenes } //m_log.InfoFormat("[SCENE] Memory pre GC {0}", System.GC.GetTotalMemory(false)); - //m_log.InfoFormat("[SCENE] Memory post GC {0}", System.GC.GetTotalMemory(true)); + //m_log.InfoFormat("[SCENE] Memory post GC {0}", System.GC.GetTotalMemory(true)); } public void HandleRemoveKnownRegionsFromAvatar(LLUUID avatarID, List regionslst) @@ -1931,7 +1931,7 @@ namespace OpenSim.Region.Environment.Scenes { lock (av) { - + for (int i = 0; i < regionslst.Count; i++) { av.KnownChildRegions.Remove(regionslst[i]); @@ -1957,7 +1957,7 @@ namespace OpenSim.Region.Environment.Scenes #region Entities /// - /// + /// /// /// /// @@ -1983,7 +1983,7 @@ namespace OpenSim.Region.Environment.Scenes #region RegionComms /// - /// + /// /// public void RegisterCommsEvents() { @@ -1999,7 +1999,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// public void UnRegisterReginWithComms() { @@ -2026,7 +2026,7 @@ namespace OpenSim.Region.Environment.Scenes if (regionHandle == m_regInfo.RegionHandle) { capsPaths[agent.AgentID] = agent.CapsPath; - + if (!agent.child) { AddCapsHandler(agent.AgentID); @@ -2041,44 +2041,44 @@ namespace OpenSim.Region.Environment.Scenes } } } - + m_log.DebugFormat( "[CONNECTION DEBUGGING]: Creating new circuit code ({0}) for avatar {1} at {2}", agent.circuitcode, agent.AgentID, RegionInfo.RegionName); - + m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent); } else { m_log.WarnFormat( - "[CONNECTION DEBUGGING]: Skipping this region for welcoming avatar {0} [{1}] at {2}", + "[CONNECTION DEBUGGING]: Skipping this region for welcoming avatar {0} [{1}] at {2}", agent.AgentID, regionHandle, RegionInfo.RegionName); } - } + } /// /// Add a caps handler for the given agent. If the CAPS handler already exists for this agent, /// then it is replaced by a new CAPS handler. - /// + /// /// FIXME: On login this is called twice, once for the login and once when the connection is made. /// This is somewhat innefficient and should be fixed. The initial login creation is necessary /// since the client asks for capabilities immediately after being informed of the seed. /// - /// - /// + /// + /// public void AddCapsHandler(LLUUID agentId) - { - String capsObjectPath = GetCapsPath(agentId); + { + String capsObjectPath = GetCapsPath(agentId); m_log.DebugFormat( "[CAPS]: Setting up CAPS handler for root agent {0} in {1}", agentId, RegionInfo.RegionName); - + Caps cap = new Caps(AssetCache, m_httpListener, m_regInfo.ExternalHostName, m_httpListener.Port, capsObjectPath, agentId, m_dumpAssetsToFile, RegionInfo.RegionName); cap.RegisterHandlers(); - + EventManager.TriggerOnRegisterCaps(agentId, cap); cap.AddNewInventoryItem = AddInventoryItem; @@ -2087,7 +2087,7 @@ namespace OpenSim.Region.Environment.Scenes cap.CAPSFetchInventoryDescendents = CommsManager.UserProfileCacheService.HandleFetchInventoryDescendentsCAPS; cap.GetClient = m_innerScene.GetControllingClient; m_capsHandlers[agentId] = cap; - } + } /// /// Remove the caps handler for a given agent. @@ -2100,9 +2100,9 @@ namespace OpenSim.Region.Environment.Scenes if (m_capsHandlers.ContainsKey(agentId)) { m_log.DebugFormat( - "[CAPS]: Removing CAPS handler for root agent {0} in {1}", + "[CAPS]: Removing CAPS handler for root agent {0} in {1}", agentId, RegionInfo.RegionName); - + m_capsHandlers[agentId].DeregisterHandlers(); EventManager.TriggerOnDeregisterCaps(agentId, m_capsHandlers[agentId]); @@ -2118,7 +2118,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// /// @@ -2152,8 +2152,8 @@ namespace OpenSim.Region.Environment.Scenes ScenePresence childAgentUpdate = GetScenePresence(new LLUUID(cAgentData.AgentID)); if (childAgentUpdate != null) { - // I can't imagine *yet* why we would get an update if the agent is a root agent.. - // however to avoid a race condition crossing borders.. + // I can't imagine *yet* why we would get an update if the agent is a root agent.. + // however to avoid a race condition crossing borders.. if (childAgentUpdate.IsChildAgent) { uint rRegionX = (uint)(cAgentData.regionHandle >> 40); @@ -2193,7 +2193,7 @@ namespace OpenSim.Region.Environment.Scenes } // Tell a single agent to disconnect from the region. presence.ControllingClient.SendShutdownConnectionNotice(); - + presence.ControllingClient.Close(true); } } @@ -2202,11 +2202,11 @@ namespace OpenSim.Region.Environment.Scenes /// /// Tell neighboring regions about this agent - /// When the regions respond with a true value, + /// When the regions respond with a true value, /// tell the agents about the region. - /// + /// /// We have to tell the regions about the agents first otherwise it'll deny them access - /// + /// /// /// public void InformClientOfNeighbours(ScenePresence presence) @@ -2309,7 +2309,7 @@ namespace OpenSim.Region.Environment.Scenes #region Module Methods /// - /// + /// /// /// /// @@ -2379,21 +2379,21 @@ namespace OpenSim.Region.Environment.Scenes m_statsReporter.SetObjectCapacity(objects); } objectCapacity = objects; - + } public List GetFriendList(LLUUID avatarID) { return CommsManager.GetUserFriendList(avatarID); } - + #endregion #region Other Methods /// - /// + /// /// /// public void SetTimePhase(int phase) @@ -2402,7 +2402,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// /// @@ -2437,7 +2437,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// /// @@ -2451,14 +2451,14 @@ namespace OpenSim.Region.Environment.Scenes } return LLUUID.Zero; } - + /// - /// This method is a way for the Friends Module to create an instant - /// message to the avatar and for Instant Messages that travel across + /// This method is a way for the Friends Module to create an instant + /// message to the avatar and for Instant Messages that travel across /// gridcomms to make it to the Instant Message Module. - /// - /// Friendship establishment and groups are unfortunately tied with instant messaging and + /// + /// Friendship establishment and groups are unfortunately tied with instant messaging and /// there's no way to separate them completely. /// /// object containing the instant message data @@ -2525,7 +2525,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// public void SendGeneralAlert(string message) @@ -2539,7 +2539,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// /// @@ -2556,7 +2556,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// /// @@ -2569,7 +2569,7 @@ namespace OpenSim.Region.Environment.Scenes { // User needs to be logged into this sim if (m_scenePresences.ContainsKey(agentID)) - { + { // First check that this is the sim owner if (ExternalChecks.ExternalChecksCanBeGodLike(agentID)) { @@ -2632,8 +2632,8 @@ namespace OpenSim.Region.Environment.Scenes /// /// Kicks User specified from the simulator. This logs them off of the grid - /// If the client gets the UUID: 44e87126e7944ded05b37c42da3d5cdb it assumes - /// that you're kicking it even if the avatar's UUID isn't the UUID that the + /// If the client gets the UUID: 44e87126e7944ded05b37c42da3d5cdb it assumes + /// that you're kicking it even if the avatar's UUID isn't the UUID that the /// agent is assigned /// /// The person doing the kicking @@ -2662,7 +2662,7 @@ namespace OpenSim.Region.Environment.Scenes } ); - + // This is a bit crude. It seems the client will be null before it actually stops the thread // The thread will kill itself eventually :/ // Is there another way to make sure *all* clients get this 'inter region' message? @@ -2722,7 +2722,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// /// @@ -2743,7 +2743,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// public void HandleAlertCommand(string[] commandParams) @@ -2931,7 +2931,7 @@ namespace OpenSim.Region.Environment.Scenes private bool m_dumpAssetsToFile; /// - /// + /// /// /// public void AddScriptEngine(ScriptEngineInterface scriptEngine) @@ -2978,7 +2978,7 @@ namespace OpenSim.Region.Environment.Scenes { return false; } - } + } else { if (part.OwnerID == parcel.landData.ownerID) @@ -2996,7 +2996,7 @@ namespace OpenSim.Region.Environment.Scenes if (pos.X > 0f && pos.X < Constants.RegionSize && pos.Y > 0f && pos.Y < Constants.RegionSize) { - // The only time parcel != null when an object is inside a region is when + // The only time parcel != null when an object is inside a region is when // there is nothing behind the landchannel. IE, no land plugin loaded. return true; } @@ -3027,7 +3027,7 @@ namespace OpenSim.Region.Environment.Scenes public bool pipeEventsForScript(uint localID) { - + SceneObjectPart part = GetSceneObjectPart(localID); if (part != null) { @@ -3046,7 +3046,7 @@ namespace OpenSim.Region.Environment.Scenes #region InnerScene wrapper methods /// - /// + /// /// /// /// @@ -3071,7 +3071,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// public void SendAllSceneObjectsToClient(ScenePresence presence) @@ -3080,10 +3080,10 @@ namespace OpenSim.Region.Environment.Scenes } //The idea is to have a group of method that return a list of avatars meeting some requirement - // ie it could be all m_scenePresences within a certain range of the calling prim/avatar. + // ie it could be all m_scenePresences within a certain range of the calling prim/avatar. /// - /// + /// /// /// public List GetAvatars() @@ -3132,7 +3132,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// public void ForEachScenePresence(Action action) @@ -3154,13 +3154,13 @@ namespace OpenSim.Region.Environment.Scenes } } } - + /// /// Delete this object from the scene. /// /// public void DeleteSceneObjectGroup(SceneObjectGroup group) - { + { SceneObjectPart rootPart = (group).GetChildPart(group.UUID); if (rootPart.PhysActor != null) { @@ -3177,18 +3177,18 @@ namespace OpenSim.Region.Environment.Scenes m_innerScene.RemoveAPrimCount(); } group.DeleteParts(); - + // In case anybody else retains a reference to this group, signal deletion by changing the name // to null. We can't zero out the UUID because this is taken from the root part, which has already // been removed. // FIXME: This is a really poor temporary solution, since it still leaves plenty of scope for race // conditions where a user deletes an entity while it is being stored. Really, the update // code needs a redesign. - group.Name = null; - } + group.Name = null; + } /// - /// + /// /// /// // public void ForEachObject(Action action) @@ -3207,7 +3207,7 @@ namespace OpenSim.Region.Environment.Scenes // } /// - /// + /// /// /// /// @@ -3217,7 +3217,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// /// diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs index dc67436..fbef367 100644 --- a/OpenSim/Region/Environment/Scenes/SceneBase.cs +++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs @@ -77,11 +77,11 @@ namespace OpenSim.Region.Environment.Scenes { get { return m_externalChecks; } } - + protected string m_datastore; private uint m_nextLocalId = 8880000; - + private AssetCache m_assetCache; public AssetCache AssetCache @@ -89,8 +89,8 @@ namespace OpenSim.Region.Environment.Scenes get { return m_assetCache; } set { m_assetCache = value; } } - - protected RegionStatus m_regStatus; + + protected RegionStatus m_regStatus; public RegionStatus Region_Status { @@ -130,7 +130,7 @@ namespace OpenSim.Region.Environment.Scenes #region Add/Remove Agent/Avatar /// - /// + /// /// /// /// @@ -138,7 +138,7 @@ namespace OpenSim.Region.Environment.Scenes public abstract void AddNewClient(IClientAPI client, bool child); /// - /// + /// /// /// public abstract void RemoveClient(LLUUID agentID); @@ -148,7 +148,7 @@ namespace OpenSim.Region.Environment.Scenes #endregion /// - /// + /// /// /// public virtual RegionInfo RegionInfo @@ -206,7 +206,7 @@ namespace OpenSim.Region.Environment.Scenes } #endregion - + /// /// XXX These two methods are very temporary /// @@ -217,7 +217,7 @@ namespace OpenSim.Region.Environment.Scenes { return capsPaths[agentId]; } - + return null; } } diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index 18ce61a..885d1e9 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs @@ -104,7 +104,7 @@ namespace OpenSim.Region.Environment.Scenes regionCommsHost.OnAvatarCrossingIntoRegion += AgentCrossing; regionCommsHost.OnCloseAgentConnection += CloseConnection; regionCommsHost.OnRegionUp += newRegionUp; - regionCommsHost.OnChildAgentUpdate += ChildAgentUpdate; + regionCommsHost.OnChildAgentUpdate += ChildAgentUpdate; } else { @@ -130,7 +130,7 @@ namespace OpenSim.Region.Environment.Scenes #region CommsManager Event handlers /// - /// + /// /// /// /// @@ -289,7 +289,7 @@ namespace OpenSim.Region.Environment.Scenes agent.child = true; InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync; - + try { d.BeginInvoke(avatar, agent, neighbours[i].RegionHandle, neighbours[i].ExternalEndPoint, @@ -299,20 +299,20 @@ namespace OpenSim.Region.Environment.Scenes catch (Exception e) { m_log.ErrorFormat( - "[REGIONINFO]: Could not resolve external hostname {0} for region {1} ({2}, {3}). {4}", - neighbours[i].ExternalHostName, - neighbours[i].RegionHandle, - neighbours[i].RegionLocX, + "[REGIONINFO]: Could not resolve external hostname {0} for region {1} ({2}, {3}). {4}", + neighbours[i].ExternalHostName, + neighbours[i].RegionHandle, + neighbours[i].RegionLocX, neighbours[i].RegionLocY, e); - + // FIXME: Okay, even though we've failed, we're still going to throw the exception on, // since I don't know what will happen if we just let the client continue - + // XXX: Well, decided to swallow the exception instead for now. Let us see how that goes. - // throw e; - - } + // throw e; + + } } } } @@ -362,12 +362,12 @@ namespace OpenSim.Region.Environment.Scenes { m_log.Info("[INTERGRID]: Completed informing neighbors that I'm here"); handlerRegionUp = OnRegionUp; - + // yes, we're notifying ourselves. if (handlerRegionUp != null) handlerRegionUp(region); - + } else { @@ -407,9 +407,9 @@ namespace OpenSim.Region.Environment.Scenes /// /// This informs all neighboring regions about the settings of it's child agent. /// Calls an asynchronous method to do so.. so it doesn't lag the sim. - /// + /// /// This contains information, such as, Draw Distance, Camera location, Current Position, Current throttle settings, etc. - /// + /// /// private void SendChildAgentDataUpdateAsync(ChildAgentDataUpdate cAgentData, ScenePresence presence) { @@ -468,14 +468,14 @@ namespace OpenSim.Region.Environment.Scenes if (regionAccepted) { m_log.Info("[INTERGRID]: Completed sending agent Close agent Request to neighbor"); - + } else { m_log.Info("[INTERGRID]: Failed sending agent Close agent Request to neighbor"); - + } - + } // We remove the list of known regions from the agent's known region list through an event // to scene, because, if an agent logged of, it's likely that there will be no scene presence @@ -572,25 +572,25 @@ namespace OpenSim.Region.Environment.Scenes if (destRegionUp) { avatar.Close(); - - // Compared to ScenePresence.CrossToNewRegion(), there's no obvious code to handle a teleport + + // Compared to ScenePresence.CrossToNewRegion(), there's no obvious code to handle a teleport // failure at this point (unlike a border crossing failure). So perhaps this can never fail // once we reach here... avatar.Scene.RemoveCapsHandler(avatar.UUID); - + m_commsProvider.InterRegion.InformRegionOfChildAgent(regionHandle, agent); m_commsProvider.InterRegion.ExpectAvatarCrossing(regionHandle, avatar.ControllingClient.AgentId, position, false); AgentCircuitData circuitdata = avatar.ControllingClient.RequestClientInfo(); - + // TODO Should construct this behind a method - string capsPath = - "http://" + reg.ExternalHostName + ":" + reg.HttpPort - + "/CAPS/" + circuitdata.CapsPath + "0000/"; - + string capsPath = + "http://" + reg.ExternalHostName + ":" + reg.HttpPort + + "/CAPS/" + circuitdata.CapsPath + "0000/"; + m_log.DebugFormat( - "[CAPS]: Sending new CAPS seed url {0} to client {1}", capsPath, avatar.UUID); - + "[CAPS]: Sending new CAPS seed url {0} to client {1}", capsPath, avatar.UUID); + avatar.ControllingClient.SendRegionTeleport(regionHandle, 13, reg.ExternalEndPoint, 4, (1 << 4), capsPath); avatar.MakeChildAgent(); @@ -618,7 +618,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// /// diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs index dacd609..7ff9213 100644 --- a/OpenSim/Region/Environment/Scenes/SceneEvents.cs +++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs @@ -183,7 +183,7 @@ namespace OpenSim.Region.Environment.Scenes public delegate void DeregisterCapsEvent(LLUUID agentID, Caps caps); public event DeregisterCapsEvent OnDeregisterCaps; - public class MoneyTransferArgs : EventArgs + public class MoneyTransferArgs : EventArgs { public LLUUID sender; public LLUUID receiver; @@ -208,7 +208,7 @@ namespace OpenSim.Region.Environment.Scenes public class LandBuyArgs : EventArgs { public LLUUID agentId = LLUUID.Zero; - + public LLUUID groupId = LLUUID.Zero; public LLUUID parcelOwnerID = LLUUID.Zero; @@ -225,9 +225,9 @@ namespace OpenSim.Region.Environment.Scenes public int transactionID = 0; public int amountDebited = 0; - + public LandBuyArgs(LLUUID pagentId, LLUUID pgroupId, bool pfinal, bool pgroupOwned, - bool premoveContribution, int pparcelLocalID, int pparcelArea, int pparcelPrice, + bool premoveContribution, int pparcelLocalID, int pparcelArea, int pparcelPrice, bool pauthenticated) { agentId = pagentId; @@ -367,7 +367,7 @@ namespace OpenSim.Region.Environment.Scenes if (handlerParcelPrimCountUpdate != null) { handlerParcelPrimCountUpdate(); - } + } } public void TriggerMoneyTransfer(Object sender, MoneyTransferArgs e) @@ -538,7 +538,7 @@ namespace OpenSim.Region.Environment.Scenes } } - public void TriggerOnRegisterCaps(LLUUID agentID, Caps caps) + public void TriggerOnRegisterCaps(LLUUID agentID, Caps caps) { handlerRegisterCaps = OnRegisterCaps; if (handlerRegisterCaps != null) @@ -547,7 +547,7 @@ namespace OpenSim.Region.Environment.Scenes } } - public void TriggerOnDeregisterCaps(LLUUID agentID, Caps caps) + public void TriggerOnDeregisterCaps(LLUUID agentID, Caps caps) { handlerDeregisterCaps = OnDeregisterCaps; if (handlerDeregisterCaps != null) @@ -580,7 +580,7 @@ namespace OpenSim.Region.Environment.Scenes handlerValidateLandBuy(sender, e); } } - + public void TriggerAtTargetEvent(uint localID, uint handle, LLVector3 targetpos, LLVector3 currentpos) { handlerScriptAtTargetEvent = OnScriptAtTargetEvent; diff --git a/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs b/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs index 645c302..040ee70 100644 --- a/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs +++ b/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs @@ -61,19 +61,19 @@ namespace OpenSim.Region.Environment.Scenes public uint ExternalChecksGenerateClientFlags(LLUUID userID, LLUUID objectID) { - SceneObjectPart part=m_scene.GetSceneObjectPart(objectID); + SceneObjectPart part=m_scene.GetSceneObjectPart(objectID); - uint perms=part.GetEffectiveObjectFlags() | - (uint)LLObject.ObjectFlags.ObjectModify | - (uint)LLObject.ObjectFlags.ObjectCopy | - (uint)LLObject.ObjectFlags.ObjectMove | - (uint)LLObject.ObjectFlags.ObjectTransfer | - (uint)LLObject.ObjectFlags.ObjectYouOwner | - (uint)LLObject.ObjectFlags.ObjectYouOfficer; + uint perms=part.GetEffectiveObjectFlags() | + (uint)LLObject.ObjectFlags.ObjectModify | + (uint)LLObject.ObjectFlags.ObjectCopy | + (uint)LLObject.ObjectFlags.ObjectMove | + (uint)LLObject.ObjectFlags.ObjectTransfer | + (uint)LLObject.ObjectFlags.ObjectYouOwner | + (uint)LLObject.ObjectFlags.ObjectYouOfficer; foreach (GenerateClientFlags check in GenerateClientFlagsCheckFunctions) { - perms &= check(userID, objectID); + perms &= check(userID, objectID); } return perms; } diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs index 215ab75..8f3de51 100644 --- a/OpenSim/Region/Environment/Scenes/SceneManager.cs +++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs @@ -180,7 +180,7 @@ namespace OpenSim.Region.Environment.Scenes [Obsolete("TODO: Remove this warning by 0.7")] public bool RunTerrainCmdOnCurrentScene(string[] cmdparams, ref string result) { - m_log.Warn("DEPRECIATED: The terrain engine has been replaced with a new terrain plugin module. Please type 'plugin terrain help' for new commands."); + m_log.Warn("DEPRECIATED: The terrain engine has been replaced with a new terrain plugin module. Please type 'plugin terrain help' for new commands."); return false; } @@ -253,7 +253,7 @@ namespace OpenSim.Region.Environment.Scenes public bool TrySetCurrentScene(LLUUID regionID) { Console.WriteLine("Searching for Region: '{0}'", regionID.ToString()); - + foreach (Scene scene in m_localScenes) { if (scene.RegionInfo.RegionID == regionID) @@ -262,7 +262,7 @@ namespace OpenSim.Region.Environment.Scenes return true; } } - + return false; } diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs index 8a7096f..1ac51a6 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs @@ -50,7 +50,7 @@ namespace OpenSim.Region.Environment.Scenes if (part != null) { part.StartScript(itemID); - + } else { @@ -58,9 +58,9 @@ namespace OpenSim.Region.Environment.Scenes "[PRIM INVENTORY]: " + "Couldn't find part {0} in object group {1}, {2} to start script with ID {3}", localID, Name, UUID, itemID); - } + } } - + // /// Start a given script. // /// // /// @@ -79,9 +79,9 @@ namespace OpenSim.Region.Environment.Scenes // "[PRIM INVENTORY]: " + // "Couldn't find part {0} in object group {1}, {2} to start script with ID {3}", // localID, Name, UUID, itemID); -// } -// } - +// } +// } + /// /// Start the scripts contained in all the prims in this group. /// @@ -107,7 +107,7 @@ namespace OpenSim.Region.Environment.Scenes } } } - + /// Start a given script. /// /// @@ -127,11 +127,11 @@ namespace OpenSim.Region.Environment.Scenes "[PRIM INVENTORY]: " + "Couldn't find part {0} in object group {1}, {2} to stop script with ID {3}", partID, Name, UUID, itemID); - } - } - + } + } + /// - /// + /// /// /// /// @@ -172,7 +172,7 @@ namespace OpenSim.Region.Environment.Scenes localID, Name, UUID); } } - + /// /// Add an inventory item to a prim in this group. /// @@ -181,7 +181,7 @@ namespace OpenSim.Region.Environment.Scenes /// /// The item UUID that should be used by the new item. /// - public bool AddInventoryItem(IClientAPI remoteClient, uint localID, + public bool AddInventoryItem(IClientAPI remoteClient, uint localID, InventoryItemBase item, LLUUID copyItemID) { LLUUID newItemId = (copyItemID != LLUUID.Zero) ? copyItemID : item.ID; @@ -190,8 +190,8 @@ namespace OpenSim.Region.Environment.Scenes if (part != null) { TaskInventoryItem taskItem = new TaskInventoryItem(); - - taskItem.ItemID = newItemId; + + taskItem.ItemID = newItemId; taskItem.AssetID = item.AssetID; taskItem.Name = item.Name; taskItem.Description = item.Description; @@ -199,15 +199,15 @@ namespace OpenSim.Region.Environment.Scenes taskItem.CreatorID = item.Creator; taskItem.Type = item.AssetType; taskItem.InvType = item.InvType; - + taskItem.BaseMask = item.BasePermissions; taskItem.OwnerMask = item.CurrentPermissions; // FIXME: ignoring group permissions for now as they aren't stored in item taskItem.EveryoneMask = item.EveryOnePermissions; taskItem.NextOwnerMask = item.NextPermissions; - + part.AddInventoryItem(taskItem); - + return true; } else @@ -220,7 +220,7 @@ namespace OpenSim.Region.Environment.Scenes return false; } - + /// /// Returns an existing inventory item. Returns the original, so any changes will be live. /// @@ -240,11 +240,11 @@ namespace OpenSim.Region.Environment.Scenes "[PRIM INVENTORY]: " + "Couldn't find prim local ID {0} in prim {1}, {2} to get inventory item ID {3}", primID, part.Name, part.UUID, itemID); - } - + } + return null; - } - + } + /// /// Update an existing inventory item. /// @@ -256,8 +256,8 @@ namespace OpenSim.Region.Environment.Scenes SceneObjectPart part = GetChildPart(item.ParentPartID); if (part != null) { - part.UpdateInventoryItem(item); - + part.UpdateInventoryItem(item); + return true; } else @@ -266,55 +266,55 @@ namespace OpenSim.Region.Environment.Scenes "[PRIM INVENTORY]: " + "Couldn't find prim ID {0} to update item {1}, {2}", item.ParentPartID, item.Name, item.ItemID); - } - + } + return false; - } + } public int RemoveInventoryItem(uint localID, LLUUID itemID) { SceneObjectPart part = GetChildPart(localID); if (part != null) - { + { int type = part.RemoveInventoryItem(itemID); - + return type; } - + return -1; - } + } - public uint GetEffectivePermissions() - { - uint perms=(uint)(PermissionMask.Modify | - PermissionMask.Copy | - PermissionMask.Move | - PermissionMask.Transfer) | 7; + public uint GetEffectivePermissions() + { + uint perms=(uint)(PermissionMask.Modify | + PermissionMask.Copy | + PermissionMask.Move | + PermissionMask.Transfer) | 7; - foreach (SceneObjectPart part in m_parts.Values) - perms &= part.MaskEffectivePermissions(); + foreach (SceneObjectPart part in m_parts.Values) + perms &= part.MaskEffectivePermissions(); - if((RootPart.OwnerMask & (uint)PermissionMask.Modify) == 0) - perms &= ~(uint)PermissionMask.Modify; - if((RootPart.OwnerMask & (uint)PermissionMask.Copy) == 0) - perms &= ~(uint)PermissionMask.Copy; - if((RootPart.OwnerMask & (uint)PermissionMask.Transfer) == 0) - perms &= ~(uint)PermissionMask.Transfer; + if ((RootPart.OwnerMask & (uint)PermissionMask.Modify) == 0) + perms &= ~(uint)PermissionMask.Modify; + if ((RootPart.OwnerMask & (uint)PermissionMask.Copy) == 0) + perms &= ~(uint)PermissionMask.Copy; + if ((RootPart.OwnerMask & (uint)PermissionMask.Transfer) == 0) + perms &= ~(uint)PermissionMask.Transfer; - if((RootPart.OwnerMask & RootPart.NextOwnerMask & (uint)PermissionMask.Modify) == 0) - perms &= ~((uint)PermissionMask.Modify >> 13); - if((RootPart.OwnerMask & RootPart.NextOwnerMask & (uint)PermissionMask.Copy) == 0) - perms &= ~((uint)PermissionMask.Copy >> 13); - if((RootPart.OwnerMask & RootPart.NextOwnerMask & (uint)PermissionMask.Transfer) == 0) - perms &= ~((uint)PermissionMask.Transfer >> 13); + if ((RootPart.OwnerMask & RootPart.NextOwnerMask & (uint)PermissionMask.Modify) == 0) + perms &= ~((uint)PermissionMask.Modify >> 13); + if ((RootPart.OwnerMask & RootPart.NextOwnerMask & (uint)PermissionMask.Copy) == 0) + perms &= ~((uint)PermissionMask.Copy >> 13); + if ((RootPart.OwnerMask & RootPart.NextOwnerMask & (uint)PermissionMask.Transfer) == 0) + perms &= ~((uint)PermissionMask.Transfer >> 13); - return perms; - } + return perms; + } - public void ApplyNextOwnerPermissions() - { - foreach (SceneObjectPart part in m_parts.Values) - part.ApplyNextOwnerPermissions(); - } + public void ApplyNextOwnerPermissions() + { + foreach (SceneObjectPart part in m_parts.Values) + part.ApplyNextOwnerPermissions(); + } } } diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 14bfde0..332d160 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -86,11 +86,11 @@ namespace OpenSim.Region.Environment.Scenes private PrimCountTaintedDelegate handlerPrimCountTainted = null; /// - /// Signal whether the non-inventory attributes of any prims in the group have changed + /// Signal whether the non-inventory attributes of any prims in the group have changed /// since the group's last persistent backup /// public bool HasGroupChanged = false; - + private LLVector3 lastPhysGroupPos; @@ -119,7 +119,7 @@ namespace OpenSim.Region.Environment.Scenes /// but not sure a object should have this /// as what does it tell us? that some avatar has selected it (but not what Avatar/user) /// think really there should be a list (or whatever) in each scenepresence - /// saying what prim(s) that user has selected. + /// saying what prim(s) that user has selected. /// protected bool m_isSelected = false; @@ -134,7 +134,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// public int PrimCount { @@ -153,7 +153,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// public LLVector3 GroupCentrePoint { @@ -215,7 +215,7 @@ namespace OpenSim.Region.Environment.Scenes part.GroupPosition = val; } } - + //if (m_rootPart.PhysActor != null) //{ //m_rootPart.PhysActor.Position = @@ -225,7 +225,7 @@ namespace OpenSim.Region.Environment.Scenes //} } } - + public override uint LocalId { get @@ -316,17 +316,17 @@ namespace OpenSim.Region.Environment.Scenes #region Constructors /// - /// + /// /// public SceneObjectGroup() { } /// - /// This constructor creates a SceneObjectGroup using a pre-existing SceneObjectPart. - /// The original SceneObjectPart will be used rather than a copy, preserving + /// This constructor creates a SceneObjectGroup using a pre-existing SceneObjectPart. + /// The original SceneObjectPart will be used rather than a copy, preserving /// its existing localID and UUID. - /// + /// public SceneObjectGroup(Scene scene, ulong regionHandle, SceneObjectPart part) { m_scene = scene; @@ -416,7 +416,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// public SceneObjectGroup(string xmlData) { @@ -464,7 +464,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// public SceneObjectGroup(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos, LLQuaternion rot, PrimitiveBaseShape shape) @@ -486,7 +486,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// public SceneObjectGroup(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape) @@ -576,7 +576,7 @@ namespace OpenSim.Region.Environment.Scenes EntityIntersection inter = part.TestIntersectionOBB(hRay, parentrotation,frontFacesOnly, faceCenters); - // This may need to be updated to the maximum draw distance possible.. + // This may need to be updated to the maximum draw distance possible.. // We might (and probably will) be checking for prim creation from other sims // when the camera crosses the border. float idist = Constants.RegionSize; @@ -676,7 +676,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// private void SetPartAsRoot(SceneObjectPart part) @@ -693,7 +693,7 @@ namespace OpenSim.Region.Environment.Scenes DetachFromBackup(this); m_rootPart.m_attachedAvatar = agentID; - + if (m_rootPart.PhysActor != null) { m_scene.PhysicsScene.RemovePrim(m_rootPart.PhysActor); @@ -753,7 +753,7 @@ namespace OpenSim.Region.Environment.Scenes AttachToBackup(); m_rootPart.ScheduleFullUpdate(); m_rootPart.ClearUndoState(); - + } public void DetachToInventoryPrep() { @@ -764,7 +764,7 @@ namespace OpenSim.Region.Environment.Scenes //detachedpos = avatar.AbsolutePosition; avatar.RemoveAttachment(this); } - + m_rootPart.m_attachedAvatar = LLUUID.Zero; m_rootPart.SetParentLocalId(0); //m_rootPart.SetAttachmentPoint((byte)0); @@ -773,10 +773,10 @@ namespace OpenSim.Region.Environment.Scenes //m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_scene.m_physicalPrim); //AttachToBackup(); //m_rootPart.ScheduleFullUpdate(); - + } /// - /// + /// /// /// private void SetPartAsNonRoot(SceneObjectPart part) @@ -802,7 +802,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// Added as a way for the storage provider to reset the scene, + /// Added as a way for the storage provider to reset the scene, /// most likely a better way to do this sort of thing but for now... /// /// @@ -813,7 +813,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// public void AddPart(SceneObjectPart part) @@ -826,7 +826,7 @@ namespace OpenSim.Region.Environment.Scenes try { m_parts.Add(part.UUID, part); - + } catch (Exception e) { @@ -836,7 +836,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// public void UpdateParentIDs() { @@ -847,7 +847,7 @@ namespace OpenSim.Region.Environment.Scenes if (part.UUID != m_rootPart.UUID) { part.ParentID = m_rootPart.LocalId; - + } } } @@ -860,7 +860,7 @@ namespace OpenSim.Region.Environment.Scenes foreach (SceneObjectPart part in m_parts.Values) { part.UUID = LLUUID.Random(); - + } } } @@ -897,7 +897,7 @@ namespace OpenSim.Region.Environment.Scenes { SceneObjectPart part = GetChildPart(localId); OnGrabPart(part, offsetPos, remoteClient); - + } } @@ -905,7 +905,7 @@ namespace OpenSim.Region.Environment.Scenes { part.StoreUndoState(); part.OnGrab(offsetPos, remoteClient); - + } public virtual void OnGrabGroup(LLVector3 offsetPos, IClientAPI remoteClient) @@ -1068,7 +1068,7 @@ namespace OpenSim.Region.Environment.Scenes #region Events /// - /// + /// /// public void TriggerTainted() { @@ -1198,7 +1198,7 @@ namespace OpenSim.Region.Environment.Scenes dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true); } - // Now we've made a copy that replaces this one, we need to + // Now we've made a copy that replaces this one, we need to // switch the owner to the person who did the copying // Second Life copies an object and duplicates the first one in it's place // So, we have to make a copy of this one, set it in it's place then set the owner on this one @@ -1227,7 +1227,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// /// @@ -1359,7 +1359,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// /// @@ -1373,14 +1373,14 @@ namespace OpenSim.Region.Environment.Scenes { m_parts.Add(newPart.UUID, newPart); } - + SetPartAsNonRoot(newPart); - + } /// /// Reset the LLUUIDs for all the prims that make up this group. - /// + /// /// This is called by methods which want to add a new group to an existing scene, in order /// to ensure that there are no clashes with groups already present. /// @@ -1398,7 +1398,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// public void ServiceObjectPropertiesFamilyRequest(IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags) @@ -1425,7 +1425,7 @@ namespace OpenSim.Region.Environment.Scenes /// public override void Update() { - + lock (m_parts) { //if (m_rootPart.m_IsAttachment) @@ -1436,7 +1436,7 @@ namespace OpenSim.Region.Environment.Scenes //} //return; //} - + if (Util.GetDistanceTo(lastPhysGroupPos, AbsolutePosition) > 0.02) { m_rootPart.UpdateFlag = 1; @@ -1447,10 +1447,10 @@ namespace OpenSim.Region.Environment.Scenes //if (part.UpdateFlag == 0) part.UpdateFlag = 1; //} - - + + checkAtTargets(); - + if ((Math.Abs(lastPhysGroupRot.W - GroupRotation.W) > 0.1) || (Math.Abs(lastPhysGroupRot.X - GroupRotation.X) > 0.1) @@ -1508,7 +1508,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// public void ScheduleGroupForTerseUpdate() { @@ -1524,7 +1524,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// public void SendGroupFullUpdate() { @@ -1545,7 +1545,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// public void SendGroupTerseUpdate() { @@ -1669,7 +1669,7 @@ namespace OpenSim.Region.Environment.Scenes { if (objectGroup.RootPart.UpdateFlag > 0) { - // I've never actually seen this happen, though I think it's theoretically possible + // I've never actually seen this happen, though I think it's theoretically possible m_log.WarnFormat( "[SCENE OBJECT GROUP]: Aborted linking {0}, {1} to {2}, {3} as it has yet to finish delinking", objectGroup.RootPart.Name, objectGroup.RootPart.UUID, RootPart.Name, RootPart.UUID); @@ -1678,7 +1678,7 @@ namespace OpenSim.Region.Environment.Scenes } // m_log.DebugFormat( -// "[SCENE OBJECT GROUP]: Linking group with root part {0}, {1} to group with root part {2}, {3}", +// "[SCENE OBJECT GROUP]: Linking group with root part {0}, {1} to group with root part {2}, {3}", // objectGroup.RootPart.Name, objectGroup.RootPart.UUID, RootPart.Name, RootPart.UUID); SceneObjectPart linkPart = objectGroup.m_rootPart; @@ -1747,19 +1747,19 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// Delink the given prim from this group. The delinked prim is established as + /// Delink the given prim from this group. The delinked prim is established as /// an independent SceneObjectGroup. /// /// public void DelinkFromGroup(uint partID) { SceneObjectPart linkPart = GetChildPart(partID); - + if (null != linkPart) { linkPart.ClearUndoState(); // m_log.DebugFormat( -// "[SCENE OBJECT GROUP]: Delinking part {0}, {1} from group with root part {2}, {3}", +// "[SCENE OBJECT GROUP]: Delinking part {0}, {1} from group with root part {2}, {3}", // linkPart.Name, linkPart.UUID, RootPart.Name, RootPart.UUID); LLQuaternion worldRot = linkPart.GetWorldRotation(); @@ -1777,8 +1777,8 @@ namespace OpenSim.Region.Environment.Scenes m_scene.PhysicsScene.RemovePrim(linkPart.PhysActor); } - // We need to reset the child part's position - // ready for life as a separate object after being a part of another object + // We need to reset the child part's position + // ready for life as a separate object after being a part of another object Quaternion parentRot = new Quaternion( m_rootPart.RotationOffset.W, @@ -1933,7 +1933,7 @@ namespace OpenSim.Region.Environment.Scenes m_rootPart.TouchName, new byte[0], m_rootPart.SitName, m_rootPart.Name, m_rootPart.Description, m_rootPart.OwnerMask, m_rootPart.NextOwnerMask, m_rootPart.GroupMask, m_rootPart.EveryoneMask, m_rootPart.BaseMask); - + } /// @@ -1998,13 +1998,13 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// /// /// /// - /// + /// public void UpdatePrimFlags(uint localID, ushort type, bool inUse, byte[] data) { SceneObjectPart part = GetChildPart(localID); @@ -2046,7 +2046,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// /// @@ -2071,7 +2071,7 @@ namespace OpenSim.Region.Environment.Scenes #region Shape /// - /// + /// /// /// public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock, uint localID) @@ -2091,7 +2091,7 @@ namespace OpenSim.Region.Environment.Scenes #region Resize /// - /// + /// /// /// /// @@ -2169,7 +2169,7 @@ namespace OpenSim.Region.Environment.Scenes #region Position /// - /// + /// /// /// public void UpdateGroupPosition(LLVector3 pos) @@ -2189,7 +2189,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// /// @@ -2210,7 +2210,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// private void UpdateRootPosition(LLVector3 pos) @@ -2255,7 +2255,7 @@ namespace OpenSim.Region.Environment.Scenes #region Rotation /// - /// + /// /// /// public void UpdateGroupRotation(LLQuaternion rot) @@ -2272,7 +2272,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// /// @@ -2291,7 +2291,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// /// @@ -2312,7 +2312,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// private void UpdateRootRotation(LLQuaternion rot) @@ -2463,7 +2463,7 @@ namespace OpenSim.Region.Environment.Scenes // Reusing att.tolerance to hold the index of the target in the targets dictionary // to avoid deadlocking the sim. m_scene.TriggerAtTargetEvent(localids[ctr], (uint)att.tolerance, att.targetPos, m_rootPart.GroupPosition); - + } } diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs index e1be8ff..cce263c 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs @@ -67,7 +67,7 @@ namespace OpenSim.Region.Environment.Scenes /// /// Holds in memory prim inventory - /// + /// protected TaskInventoryDictionary m_taskInventory = new TaskInventoryDictionary(); public TaskInventoryDictionary TaskInventory @@ -84,21 +84,21 @@ namespace OpenSim.Region.Environment.Scenes /// /// Reset LLUUIDs for all the items in the prim's inventory. This involves either generating /// new ones or setting existing UUIDs to the correct parent UUIDs. - /// + /// /// If this method is called and there are inventory items, then we regard the inventory as having changed. /// /// Link number for the part public void ResetInventoryIDs() { lock (TaskInventory) - { + { if (0 == TaskInventory.Count) { - return; + return; } - - HasInventoryChanged = true; - + + HasInventoryChanged = true; + IList items = new List(TaskInventory.Values); TaskInventory.Clear(); @@ -127,7 +127,7 @@ namespace OpenSim.Region.Environment.Scenes if (ownerId != item.OwnerID) { item.LastOwnerID = item.OwnerID; - item.OwnerID = ownerId; + item.OwnerID = ownerId; } } } @@ -178,7 +178,7 @@ namespace OpenSim.Region.Environment.Scenes { // m_log.InfoFormat( // "[PRIM INVENTORY]: " + - // "Starting script {0}, {1} in prim {2}, {3}", + // "Starting script {0}, {1} in prim {2}, {3}", // item.Name, item.ItemID, Name, UUID); AddFlag(LLObject.ObjectFlags.Scripted); @@ -211,7 +211,7 @@ namespace OpenSim.Region.Environment.Scenes /// /// /// A - /// + /// public void StartScript(LLUUID itemId) { lock (m_taskInventory) @@ -234,7 +234,7 @@ namespace OpenSim.Region.Environment.Scenes /// /// Stop a script which is in this prim's inventory. /// - /// + /// public void StopScript(LLUUID itemId) { if (m_taskInventory.ContainsKey(itemId)) @@ -306,9 +306,9 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// Restore a whole collection of items to the prim's inventory at once. + /// Restore a whole collection of items to the prim's inventory at once. /// We assume that the items already have all their fields correctly filled out. - /// The items are not flagged for persistence to the database, since they are being restored + /// The items are not flagged for persistence to the database, since they are being restored /// from persistence rather than being newly added. /// /// @@ -338,9 +338,9 @@ namespace OpenSim.Region.Environment.Scenes if (m_taskInventory.ContainsKey(itemID)) { // m_log.DebugFormat( -// "[PRIM INVENTORY]: Retrieved task inventory item {0}, {1} from prim {2}, {3}", +// "[PRIM INVENTORY]: Retrieved task inventory item {0}, {1} from prim {2}, {3}", // m_taskInventory[itemID].Name, itemID, Name, UUID); - + return m_taskInventory[itemID]; } else @@ -450,11 +450,11 @@ namespace OpenSim.Region.Environment.Scenes /// /// public bool GetInventoryFileName(IClientAPI client, uint localID) - { + { // m_log.DebugFormat( // "[PRIM INVENTORY]: Received request from client {0} for inventory file name of {1}, {2}", // client.AgentId, Name, UUID); - + if (m_inventorySerial > 0) { client.SendTaskInventory(m_uuid, (short)m_inventorySerial, @@ -473,9 +473,9 @@ namespace OpenSim.Region.Environment.Scenes /// /// public void RequestInventoryFile(IXfer xferManager) - { + { byte[] fileData = new byte[0]; - + // Confusingly, the folder item has to be the object id, while the 'parent id' has to be zero. This matches // what appears to happen in the Second Life protocol. If this isn't the case. then various functionality // isn't available (such as drag from prim inventory to agent inventory) @@ -486,39 +486,39 @@ namespace OpenSim.Region.Environment.Scenes foreach (TaskInventoryItem item in m_taskInventory.Values) { invString.AddItemStart(); - invString.AddNameValueLine("item_id", item.ItemID.ToString()); + invString.AddNameValueLine("item_id", item.ItemID.ToString()); invString.AddNameValueLine("parent_id", UUID.ToString()); invString.AddPermissionsStart(); - - invString.AddNameValueLine("base_mask", Helpers.UIntToHexString(item.BaseMask)); - invString.AddNameValueLine("owner_mask", Helpers.UIntToHexString(item.OwnerMask)); + + invString.AddNameValueLine("base_mask", Helpers.UIntToHexString(item.BaseMask)); + invString.AddNameValueLine("owner_mask", Helpers.UIntToHexString(item.OwnerMask)); invString.AddNameValueLine("group_mask", "00000000"); invString.AddNameValueLine("everyone_mask", "00000000"); invString.AddNameValueLine("next_owner_mask", Helpers.UIntToHexString(item.NextOwnerMask)); - + invString.AddNameValueLine("creator_id", item.CreatorID.ToString()); invString.AddNameValueLine("owner_id", item.OwnerID.ToString()); - + invString.AddNameValueLine("last_owner_id", item.LastOwnerID.ToString()); // invString.AddNameValueLine("last_owner_id", item.OwnerID.ToString()); - + invString.AddNameValueLine("group_id", item.GroupID.ToString()); invString.AddSectionEnd(); - + invString.AddNameValueLine("asset_id", item.AssetID.ToString()); invString.AddNameValueLine("type", TaskInventoryItem.Types[item.Type]); invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.InvType]); invString.AddNameValueLine("flags", "00000000"); - + invString.AddSaleStart(); invString.AddNameValueLine("sale_type", "not"); invString.AddNameValueLine("sale_price", "0"); invString.AddSectionEnd(); - + invString.AddNameValueLine("name", item.Name + "|"); invString.AddNameValueLine("desc", item.Description + "|"); - + invString.AddNameValueLine("creation_date", item.CreationDate.ToString()); invString.AddSectionEnd(); } @@ -576,13 +576,13 @@ namespace OpenSim.Region.Environment.Scenes BuildString += "\tpermissions 0\n"; AddSectionStart(); } - + public void AddSaleStart() { BuildString += "\tsale_info\t0\n"; AddSectionStart(); - } - + } + protected void AddSectionStart() { BuildString += "\t{\n"; @@ -610,64 +610,64 @@ namespace OpenSim.Region.Environment.Scenes } } - public uint MaskEffectivePermissions() - { - uint mask=0x7fffffff; - - foreach (TaskInventoryItem item in m_taskInventory.Values) - { - if(item.InvType != 6) - { - if((item.OwnerMask & item.NextOwnerMask & (uint)PermissionMask.Copy) == 0) - mask &= ~((uint)PermissionMask.Copy >> 13); - if((item.OwnerMask & item.NextOwnerMask & (uint)PermissionMask.Transfer) == 0) - mask &= ~((uint)PermissionMask.Transfer >> 13); - if((item.OwnerMask & item.NextOwnerMask & (uint)PermissionMask.Modify) == 0) - mask &= ~((uint)PermissionMask.Modify >> 13); - } - else - { - if((item.OwnerMask & ((uint)PermissionMask.Copy >> 13)) == 0) - mask &= ~((uint)PermissionMask.Copy >> 13); - if((item.OwnerMask & ((uint)PermissionMask.Transfer >> 13)) == 0) - mask &= ~((uint)PermissionMask.Transfer >> 13); - if((item.OwnerMask & ((uint)PermissionMask.Modify >> 13)) == 0) - mask &= ~((uint)PermissionMask.Modify >> 13); - } - - if((item.OwnerMask & (uint)PermissionMask.Copy) == 0) - mask &= ~(uint)PermissionMask.Copy; - if((item.OwnerMask & (uint)PermissionMask.Transfer) == 0) - mask &= ~(uint)PermissionMask.Transfer; - if((item.OwnerMask & (uint)PermissionMask.Modify) == 0) - mask &= ~(uint)PermissionMask.Modify; - } - return mask; - } - - public void ApplyNextOwnerPermissions() - { - BaseMask &= NextOwnerMask; - OwnerMask &= NextOwnerMask; - EveryoneMask &= NextOwnerMask; - - foreach (TaskInventoryItem item in m_taskInventory.Values) - { - if(item.InvType == 6) - { - if((item.OwnerMask & ((uint)PermissionMask.Copy >> 13)) == 0) - item.OwnerMask &= ~(uint)PermissionMask.Copy; - if((item.OwnerMask & ((uint)PermissionMask.Transfer >> 13)) == 0) - item.OwnerMask &= ~(uint)PermissionMask.Transfer; - if((item.OwnerMask & ((uint)PermissionMask.Modify >> 13)) == 0) - item.OwnerMask &= ~(uint)PermissionMask.Modify; - } - item.OwnerMask &= item.NextOwnerMask; - item.BaseMask &= item.NextOwnerMask; - item.EveryoneMask &= item.NextOwnerMask; - } - - TriggerScriptChangedEvent(Changed.OWNER); - } + public uint MaskEffectivePermissions() + { + uint mask=0x7fffffff; + + foreach (TaskInventoryItem item in m_taskInventory.Values) + { + if (item.InvType != 6) + { + if ((item.OwnerMask & item.NextOwnerMask & (uint)PermissionMask.Copy) == 0) + mask &= ~((uint)PermissionMask.Copy >> 13); + if ((item.OwnerMask & item.NextOwnerMask & (uint)PermissionMask.Transfer) == 0) + mask &= ~((uint)PermissionMask.Transfer >> 13); + if ((item.OwnerMask & item.NextOwnerMask & (uint)PermissionMask.Modify) == 0) + mask &= ~((uint)PermissionMask.Modify >> 13); + } + else + { + if ((item.OwnerMask & ((uint)PermissionMask.Copy >> 13)) == 0) + mask &= ~((uint)PermissionMask.Copy >> 13); + if ((item.OwnerMask & ((uint)PermissionMask.Transfer >> 13)) == 0) + mask &= ~((uint)PermissionMask.Transfer >> 13); + if ((item.OwnerMask & ((uint)PermissionMask.Modify >> 13)) == 0) + mask &= ~((uint)PermissionMask.Modify >> 13); + } + + if ((item.OwnerMask & (uint)PermissionMask.Copy) == 0) + mask &= ~(uint)PermissionMask.Copy; + if ((item.OwnerMask & (uint)PermissionMask.Transfer) == 0) + mask &= ~(uint)PermissionMask.Transfer; + if ((item.OwnerMask & (uint)PermissionMask.Modify) == 0) + mask &= ~(uint)PermissionMask.Modify; + } + return mask; + } + + public void ApplyNextOwnerPermissions() + { + BaseMask &= NextOwnerMask; + OwnerMask &= NextOwnerMask; + EveryoneMask &= NextOwnerMask; + + foreach (TaskInventoryItem item in m_taskInventory.Values) + { + if (item.InvType == 6) + { + if ((item.OwnerMask & ((uint)PermissionMask.Copy >> 13)) == 0) + item.OwnerMask &= ~(uint)PermissionMask.Copy; + if ((item.OwnerMask & ((uint)PermissionMask.Transfer >> 13)) == 0) + item.OwnerMask &= ~(uint)PermissionMask.Transfer; + if ((item.OwnerMask & ((uint)PermissionMask.Modify >> 13)) == 0) + item.OwnerMask &= ~(uint)PermissionMask.Modify; + } + item.OwnerMask &= item.NextOwnerMask; + item.BaseMask &= item.NextOwnerMask; + item.EveryoneMask &= item.NextOwnerMask; + } + + TriggerScriptChangedEvent(Changed.OWNER); + } } } diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 0196b91..a52d5f9 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -41,7 +41,7 @@ using OpenSim.Region.Physics.Manager; namespace OpenSim.Region.Environment.Scenes { - // I don't really know where to put this except here. + // I don't really know where to put this except here. // Can't access the OpenSim.Region.ScriptEngine.Common.LSL_BaseClass.Changed constants [Flags] public enum ExtraParamType @@ -81,13 +81,13 @@ namespace OpenSim.Region.Environment.Scenes SCALE = 0x40 } - + [Serializable] public partial class SceneObjectPart : IScriptHost, ISerializable { [XmlIgnore] public PhysicsActor PhysActor = null; - + public LLUUID LastOwnerID; public LLUUID OwnerID; public LLUUID GroupID; @@ -95,7 +95,7 @@ namespace OpenSim.Region.Environment.Scenes public byte ObjectSaleType; public int SalePrice; public uint Category; - + // TODO: This needs to be persisted in next XML version update! [XmlIgnore] public int[] PayPrice = {-2,-2,-2,-2,-2}; [XmlIgnore] private Dictionary m_scriptEvents = new Dictionary(); @@ -139,7 +139,7 @@ namespace OpenSim.Region.Environment.Scenes set { Flags = (LLObject.ObjectFlags)value; } } - #endregion + #endregion protected byte[] m_particleSystem = new byte[0]; @@ -152,13 +152,13 @@ namespace OpenSim.Region.Environment.Scenes /// 0 - no update is scheduled /// 1 - terse update scheduled /// 2 - full update scheduled - /// + /// /// TODO - This should be an enumeration /// private byte m_updateFlag; #region Properties - + public LLUUID CreatorID; public LLUUID ObjectCreator @@ -230,7 +230,7 @@ namespace OpenSim.Region.Environment.Scenes /// A Linked Child Prim objects position in world public LLVector3 GetWorldPosition() { - + Quaternion parentRot = new Quaternion( ParentGroup.RootPart.RotationOffset.W, ParentGroup.RootPart.RotationOffset.X, @@ -256,13 +256,13 @@ namespace OpenSim.Region.Environment.Scenes /// public LLQuaternion GetWorldRotation() { - + Quaternion newRot; - + if (this.LinkNum == 0) { newRot = new Quaternion(RotationOffset.W,RotationOffset.X,RotationOffset.Y,RotationOffset.Z); - + } else { @@ -286,7 +286,7 @@ namespace OpenSim.Region.Environment.Scenes //return new LLQuaternion(axiomPartRotation.x, axiomPartRotation.y, axiomPartRotation.z, axiomPartRotation.w); } - + public void StoreUndoState() { if (!m_undoing) @@ -307,7 +307,7 @@ namespace OpenSim.Region.Environment.Scenes if (m_parentGroup.GetSceneMaxUndo() > 0) { UndoState nUndo = new UndoState(this); - + m_undo.Push(nUndo); } @@ -362,7 +362,7 @@ namespace OpenSim.Region.Environment.Scenes } else { - + // To move the child prim in respect to the group position and rotation we have to calculate LLVector3 resultingposition = GetWorldPosition(); @@ -370,7 +370,7 @@ namespace OpenSim.Region.Environment.Scenes LLQuaternion resultingrot = GetWorldRotation(); PhysActor.Orientation = new Quaternion(resultingrot.W, resultingrot.X, resultingrot.Y, resultingrot.Z); } - + // Tell the physics engines that this prim changed. m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); } @@ -379,12 +379,12 @@ namespace OpenSim.Region.Environment.Scenes Console.WriteLine(e.Message); } } - + } } private byte[] m_TextureAnimation; - + protected LLVector3 m_offsetPosition; public LLVector3 OffsetPosition @@ -398,7 +398,7 @@ namespace OpenSim.Region.Environment.Scenes { // Hack to get the child prim to update world positions in the physics engine ParentGroup.ResetChildPrimPhysicsPositions(); - + } catch (NullReferenceException) { @@ -467,7 +467,7 @@ namespace OpenSim.Region.Environment.Scenes Console.WriteLine(ex.Message); } } - + } } @@ -494,8 +494,8 @@ namespace OpenSim.Region.Environment.Scenes return m_velocity; } - set { - + set { + m_velocity = value; if (PhysActor != null) { @@ -505,7 +505,7 @@ namespace OpenSim.Region.Environment.Scenes m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); } } - + } } @@ -565,7 +565,7 @@ namespace OpenSim.Region.Environment.Scenes { m_color = value; TriggerScriptChangedEvent(Changed.COLOR); - + /* ScheduleFullUpdate() need not be called b/c after * setting the color, the text will be set, so then * ScheduleFullUpdate() will be called. */ @@ -615,11 +615,11 @@ namespace OpenSim.Region.Environment.Scenes public int LinkNum { get { return m_linkNum; } - set - { + set + { m_linkNum = value; TriggerScriptChangedEvent(Changed.LINK); - + } } @@ -646,7 +646,7 @@ namespace OpenSim.Region.Environment.Scenes public void ApplyImpulse(LLVector3 impulsei, bool localGlobalTF) { PhysicsVector impulse = new PhysicsVector(impulsei.X, impulsei.Y, impulsei.Z); - + if (localGlobalTF) { @@ -659,7 +659,7 @@ namespace OpenSim.Region.Environment.Scenes } else { - + if (m_parentGroup != null) { m_parentGroup.applyImpulse(impulse); @@ -698,9 +698,9 @@ namespace OpenSim.Region.Environment.Scenes public PrimitiveBaseShape Shape { get { return m_shape; } - set + set { - + m_shape = value; TriggerScriptChangedEvent(Changed.SHAPE); } @@ -709,7 +709,7 @@ namespace OpenSim.Region.Environment.Scenes public LLVector3 Scale { get { return m_shape.Scale; } - set + set { StoreUndoState(); m_shape.Scale = value; @@ -731,7 +731,7 @@ namespace OpenSim.Region.Environment.Scenes } #endregion - + public LLUUID ObjectOwner { get { return OwnerID; } @@ -809,9 +809,9 @@ namespace OpenSim.Region.Environment.Scenes Acceleration = new LLVector3(0, 0, 0); m_TextureAnimation = new byte[0]; m_inventoryFileName = "inventory_" + LLUUID.Random().ToString() + ".tmp"; - + // Prims currently only contain a single folder (Contents). From looking at the Second Life protocol, - // this appears to have the same UUID (!) as the prim. If this isn't the case, one can't drag items from + // this appears to have the same UUID (!) as the prim. If this isn't the case, one can't drag items from // the prim into an agent inventory (Linden client reports that the "Object not found for drop" in its log Flags = 0; @@ -819,7 +819,7 @@ namespace OpenSim.Region.Environment.Scenes TrimPermissions(); //m_undo = new UndoStack(ParentGroup.GetSceneMaxUndo()); - + ScheduleFullUpdate(); } @@ -855,14 +855,14 @@ namespace OpenSim.Region.Environment.Scenes OffsetPosition = position; RotationOffset = rotation; ObjectFlags = flags; - + // Since we don't store script state, this is only a 'temporary' objectflag now // If the object is scripted, the script will get loaded and this will be set again - ObjectFlags &= ~(uint)(LLObject.ObjectFlags.Scripted | LLObject.ObjectFlags.Touch); - + ObjectFlags &= ~(uint)(LLObject.ObjectFlags.Scripted | LLObject.ObjectFlags.Touch); + TrimPermissions(); // ApplyPhysics(); - + ScheduleFullUpdate(); } @@ -881,7 +881,7 @@ namespace OpenSim.Region.Environment.Scenes SceneObjectPart newobject = (SceneObjectPart) serializer.Deserialize(xmlReader); return newobject; } - + public void ApplyPhysics(uint rootObjectFlags, bool m_physicalPrim) { @@ -902,7 +902,7 @@ namespace OpenSim.Region.Environment.Scenes new PhysicsVector(Scale.X, Scale.Y, Scale.Z), new Quaternion(RotationOffset.W, RotationOffset.X, RotationOffset.Y, RotationOffset.Z), RigidBody); - + // Basic Physics returns null.. joy joy joy. if (PhysActor != null) { @@ -954,7 +954,7 @@ namespace OpenSim.Region.Environment.Scenes Vector3 rOrigin = iray.Origin; Vector3 rDirection = iray.Direction; - + //rDirection = rDirection.Normalize(); // Buidling the first part of the Quadratic equation @@ -985,7 +985,7 @@ namespace OpenSim.Region.Environment.Scenes radius = vScale.z; // the second part of this is the default prim size - // once we factor in the aabb of the prim we're adding we can + // once we factor in the aabb of the prim we're adding we can // change this to; // radius = (radius / 2) - 0.01f; // @@ -1018,7 +1018,7 @@ namespace OpenSim.Region.Environment.Scenes } } - // We got an intersection. putting together an EntityIntersection object with the + // We got an intersection. putting together an EntityIntersection object with the // intersection information Vector3 ipoint = new Vector3(iray.Origin.x + (iray.Direction.x*root), iray.Origin.y + (iray.Direction.y*root), @@ -1089,16 +1089,16 @@ namespace OpenSim.Region.Environment.Scenes Vector3 AXpos = new Vector3(pos.X, pos.Y, pos.Z); // tScale is the offset to derive the vertex based on the scale. - // it's different for each vertex because we've got to rotate it + // it's different for each vertex because we've got to rotate it // to get the world position of the vertex to produce the Oriented Bounding Box - Vector3 tScale = new Vector3(); + Vector3 tScale = new Vector3(); Vector3 AXscale = new Vector3(m_shape.Scale.X * 0.5f, m_shape.Scale.Y * 0.5f, m_shape.Scale.Z * 0.5f); //Vector3 pScale = (AXscale) - (AXrot.Inverse() * (AXscale)); //Vector3 nScale = (AXscale * -1) - (AXrot.Inverse() * (AXscale * -1)); - + // rScale is the rotated offset to find a vertex based on the scale and the world rotation. Vector3 rScale = new Vector3(); @@ -1109,14 +1109,14 @@ namespace OpenSim.Region.Environment.Scenes // | | // | 4 top | // |_________| - // C D - + // C D + // A _________ B // | Back | // | 3 | // |_________| - // C D - + // C D + // A _________ B B _________ A // | Left | | Right | // | 0 | | 2 | @@ -1127,13 +1127,13 @@ namespace OpenSim.Region.Environment.Scenes // | Front | // | 1 | // |_________| - // C D + // C D // C _________ D // | | // | 5 bot | // |_________| - // A B + // A B #endregion #region Plane Decomposition of Oriented Bounding Box @@ -1238,22 +1238,22 @@ namespace OpenSim.Region.Environment.Scenes for (int i = 0; i < 6; i++) { //m_log.Info("[FACECALCULATION]: FaceA[" + i + "]=" + FaceA[i] + " FaceB[" + i + "]=" + FaceB[i] + " FaceC[" + i + "]=" + FaceC[i] + " FaceD[" + i + "]=" + FaceD[i]); - + // Our Plane direction AmBa = FaceA[i] - FaceB[i]; AmBb = FaceB[i] - FaceC[i]; - + cross = AmBb.Cross(AmBa); // normalize the cross product to get the normal. - normals[i] = cross / cross.Length; - + normals[i] = cross / cross.Length; + //m_log.Info("[NORMALS]: normals[ " + i + "]" + normals[i].ToString()); //distance[i] = (normals[i].x * AmBa.x + normals[i].y * AmBa.y + normals[i].z * AmBa.z) * -1; } EntityIntersection returnresult = new EntityIntersection(); - + returnresult.distance = 1024; float c = 0; float a = 0; @@ -1276,7 +1276,7 @@ namespace OpenSim.Region.Environment.Scenes //{ //return returnresult; //} - // else + // else //{ //continue; //} @@ -1294,9 +1294,9 @@ namespace OpenSim.Region.Environment.Scenes //} //} - //else + //else //{ - //if (a < fmin) + //if (a < fmin) //{ //if (a < 0 || a < fmax) //{ @@ -1339,7 +1339,7 @@ namespace OpenSim.Region.Environment.Scenes // If the normal is pointing outside the object - + if (iray.Direction.Dot(normals[i]) < 0 || !frontFacesOnly) { @@ -1359,7 +1359,7 @@ namespace OpenSim.Region.Environment.Scenes { distance2 = (float)GetDistanceTo(q, iray.Origin); } - + if (distance2 < returnresult.distance) { @@ -1378,7 +1378,7 @@ namespace OpenSim.Region.Environment.Scenes } return returnresult; } - + // Use this for attachments! LocalID should be avatar's localid public void SetParentLocalId(uint localID) { @@ -1388,16 +1388,16 @@ namespace OpenSim.Region.Environment.Scenes public void SetAttachmentPoint(uint AttachmentPoint) { m_attachmentPoint = AttachmentPoint; - + // save the attachment point. //if (AttachmentPoint != 0) //{ m_shape.State = (byte)AttachmentPoint; //} - + } /// - /// + /// /// public void SetParent(SceneObjectGroup parent) { @@ -1417,7 +1417,7 @@ namespace OpenSim.Region.Environment.Scenes PhysActor.Buoyancy = fvalue; } } - + public void SetAxisRotation(int axis, int rotate) { if (m_parentGroup != null) @@ -1448,7 +1448,7 @@ namespace OpenSim.Region.Environment.Scenes } } - + public LLVector3 GetSitTargetPositionLL() { @@ -1547,9 +1547,9 @@ namespace OpenSim.Region.Environment.Scenes dupe.ObjectSaleType = ObjectSaleType; dupe.SalePrice = SalePrice; dupe.Category = Category; - + dupe.TaskInventory = (TaskInventoryDictionary)dupe.TaskInventory.Clone(); - + dupe.ResetIDs(linkNum); // This may be wrong... it might have to be applied in SceneObjectGroup to the object that's being duplicated. @@ -1569,7 +1569,7 @@ namespace OpenSim.Region.Environment.Scenes } #endregion - + /// /// Reset LLUUIDs for this part. This involves generate this part's own LLUUID and /// generating new LLUUIDs for all the items in the inventory. @@ -1578,8 +1578,8 @@ namespace OpenSim.Region.Environment.Scenes public void ResetIDs(int linkNum) { UUID = LLUUID.Random(); - LinkNum = linkNum; - + LinkNum = linkNum; + ResetInventoryIDs(); } @@ -1603,9 +1603,9 @@ namespace OpenSim.Region.Environment.Scenes m_parentGroup.HasGroupChanged = true; m_parentGroup.QueueForUpdateCheck(); } - + int timeNow = Util.UnixTimeSinceEpoch(); - + // If multiple updates are scheduled on the same second, we still need to perform all of them // So we'll force the issue by bumping up the timestamp so that later processing sees these need // to be performed. @@ -1617,11 +1617,11 @@ namespace OpenSim.Region.Environment.Scenes { TimeStampFull = (uint)timeNow; } - + m_updateFlag = 2; - + // m_log.DebugFormat( -// "[SCENE OBJECT PART]: Scheduling full update for {0}, {1} at {2}", +// "[SCENE OBJECT PART]: Scheduling full update for {0}, {1} at {2}", // UUID, Name, TimeStampFull); } @@ -1668,13 +1668,13 @@ namespace OpenSim.Region.Environment.Scenes m_updateFlag = 1; // m_log.DebugFormat( -// "[SCENE OBJECT PART]: Scheduling terse update for {0}, {1} at {2}", +// "[SCENE OBJECT PART]: Scheduling terse update for {0}, {1} at {2}", // UUID, Name, TimeStampTerse); } } /// - /// Tell all the prims which have had updates scheduled + /// Tell all the prims which have had updates scheduled /// public void SendScheduledUpdates() { @@ -1687,7 +1687,7 @@ namespace OpenSim.Region.Environment.Scenes // bad, so it's been replaced by an event driven method. //if ((ObjectFlags & (uint)LLObject.ObjectFlags.Physics) != 0) //{ - // Only send the constant terse updates on physical objects! + // Only send the constant terse updates on physical objects! //ScheduleTerseUpdate(); //} } @@ -1706,7 +1706,7 @@ namespace OpenSim.Region.Environment.Scenes #region Shape /// - /// + /// /// /// public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock) @@ -1750,7 +1750,7 @@ namespace OpenSim.Region.Environment.Scenes //m_log.Info("TSomething4:" + ((type & (ushort)ExtraParamType.Something4) == (ushort)ExtraParamType.Something4)); //m_log.Info("TSomething5:" + ((type & (ushort)ExtraParamType.Something5) == (ushort)ExtraParamType.Something5)); //m_log.Info("TSomething6:" + ((type & (ushort)ExtraParamType.Something6) == (ushort)ExtraParamType.Something6)); - + bool usePhysics = false; bool IsTemporary = false; bool IsPhantom = false; @@ -1758,7 +1758,7 @@ namespace OpenSim.Region.Environment.Scenes bool wasUsingPhysics = ((ObjectFlags & (uint) LLObject.ObjectFlags.Physics) != 0); //bool IsLocked = false; int i = 0; - + try { @@ -1975,7 +1975,7 @@ namespace OpenSim.Region.Environment.Scenes #region Texture /// - /// + /// /// /// public void UpdateTextureEntry(byte[] textureEntry) @@ -1985,7 +1985,7 @@ namespace OpenSim.Region.Environment.Scenes ScheduleFullUpdate(); } - // Added to handle bug in libsecondlife's TextureEntry.ToBytes() + // Added to handle bug in libsecondlife's TextureEntry.ToBytes() // not handling RGBA properly. Cycles through, and "fixes" the color // info public void UpdateTexture(LLObject.TextureEntry tex) @@ -2030,7 +2030,7 @@ namespace OpenSim.Region.Environment.Scenes byte[] data = new byte[16]; int pos = 0; - // The flags don't like conversion from uint to byte, so we have to do + // The flags don't like conversion from uint to byte, so we have to do // it the crappy way. See the above function :( data[pos] = ConvertScriptUintToByte(pTexAnim.Flags); pos++; @@ -2059,7 +2059,7 @@ namespace OpenSim.Region.Environment.Scenes #region Position /// - /// + /// /// /// public void UpdateOffSet(LLVector3 pos) @@ -2115,7 +2115,7 @@ namespace OpenSim.Region.Environment.Scenes foreach (ScenePresence p in avatarts) { // TODO: some filtering by distance of avatar - + p.ControllingClient.SendPreLoadSound(objectID, objectID, soundID); } } @@ -2193,14 +2193,14 @@ namespace OpenSim.Region.Environment.Scenes #region Resizing/Scale /// - /// + /// /// /// public void Resize(LLVector3 scale) { StoreUndoState(); m_shape.Scale = scale; - + ScheduleFullUpdate(); } @@ -2261,7 +2261,7 @@ namespace OpenSim.Region.Environment.Scenes } #region Client Update Methods - + /// /// Tell all scene presences that they should send updates for this part to their clients /// @@ -2287,7 +2287,7 @@ namespace OpenSim.Region.Environment.Scenes } } } - + public void AddFullUpdateToAvatar(ScenePresence presence) { @@ -2295,7 +2295,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// public void SendFullUpdateToAllClients() { @@ -2309,7 +2309,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// public void SendFullUpdate(IClientAPI remoteClient, uint clientFlags) @@ -2328,7 +2328,7 @@ namespace OpenSim.Region.Environment.Scenes lPos = OffsetPosition; SendFullUpdateToClient(remoteClient, lPos, clientflags); } - + /// /// Sends a full update to the client /// @@ -2338,7 +2338,7 @@ namespace OpenSim.Region.Environment.Scenes public void SendFullUpdateToClient(IClientAPI remoteClient, LLVector3 lPos, uint clientFlags) { clientFlags &= ~(uint) LLObject.ObjectFlags.CreateSelected; - + if (remoteClient.AgentId == OwnerID) { if ((uint) (Flags & LLObject.ObjectFlags.CreateSelected) != 0) @@ -2351,7 +2351,7 @@ namespace OpenSim.Region.Environment.Scenes byte[] color = new byte[] {m_color.R, m_color.G, m_color.B, m_color.A}; remoteClient.SendPrimitiveToClient( - m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, m_shape, + m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, m_shape, lPos, Velocity, Acceleration, RotationOffset, RotationalVelocity, clientFlags, m_uuid, OwnerID, m_text, color, ParentID, m_particleSystem, m_clickAction, m_TextureAnimation, m_IsAttachment, m_attachmentPoint,fromAssetID); @@ -2373,7 +2373,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// public void SendTerseUpdateToAllClients() { @@ -2451,7 +2451,7 @@ namespace OpenSim.Region.Environment.Scenes m_parentGroup.AbsolutePosition = newpos; return; } - + } ScheduleTerseUpdate(); diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 28507cd..ba8bbd9 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -40,7 +40,7 @@ using OpenSim.Region.Physics.Manager; namespace OpenSim.Region.Environment.Scenes { - enum ScriptControlled : int + enum ScriptControlled : int { CONTROL_ZERO = 0, CONTROL_FWD = 1, @@ -63,14 +63,14 @@ namespace OpenSim.Region.Environment.Scenes public ScriptControlled eventControls; } - [Serializable] + [Serializable] public class ScenePresence : EntityBase, ISerializable { // ~ScenePresence() // { // System.Console.WriteLine("[ScenePresence] Destructor called"); // } - + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public static byte[] DefaultTexture; @@ -92,7 +92,7 @@ namespace OpenSim.Region.Environment.Scenes private LLVector3 m_requestedSitOffset = new LLVector3(); private float m_sitAvatarHeight = 2.0f; private float m_godlevel = 0; - + private bool m_invulnerable = true; private LLVector3 m_LastChildAgentUpdatePosition = new LLVector3(); @@ -114,7 +114,7 @@ namespace OpenSim.Region.Environment.Scenes private float m_health = 100f; private LLVector3 m_lastVelocity = LLVector3.Zero; - + // Default AV Height private float m_avHeight = 127.0f; @@ -213,10 +213,10 @@ namespace OpenSim.Region.Environment.Scenes get { return m_invulnerable; } } - public float GodLevel - { - get { return m_godlevel; } - } + public float GodLevel + { + get { return m_godlevel; } + } private readonly ulong m_regionHandle; @@ -260,7 +260,7 @@ namespace OpenSim.Region.Environment.Scenes /// /// This works out to be the ClientView object associated with this avatar, or it's client connection manager /// - private IClientAPI m_controllingClient; + private IClientAPI m_controllingClient; protected PhysicsActor m_physicsActor; @@ -350,7 +350,7 @@ namespace OpenSim.Region.Environment.Scenes /// /// If this is true, agent doesn't have a representation in this scene. /// this is an agent 'looking into' this scene from a nearby scene(region) - /// + /// /// if False, this agent has a representation in this scene /// private bool m_isChildAgent = true; @@ -482,7 +482,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// Send updates to the client about prims which have been placed on the update queue. We don't + /// Send updates to the client about prims which have been placed on the update queue. We don't /// necessarily send updates for all the parts on the queue, e.g. if an updates with a more recent /// timestamp has already been sent. /// @@ -498,12 +498,12 @@ namespace OpenSim.Region.Environment.Scenes if (!m_gotAllObjectsInScene) { if (!m_isChildAgent || m_scene.m_seeIntoRegionFromNeighbor) - { + { m_scene.SendAllSceneObjectsToClient(this); - m_gotAllObjectsInScene = true; + m_gotAllObjectsInScene = true; } } - + if (m_partsUpdateQueue.Count > 0) { bool runUpdate = true; @@ -520,12 +520,12 @@ namespace OpenSim.Region.Environment.Scenes if (update.LastFullUpdateTime < part.TimeStampFull) { // m_log.DebugFormat( -// "[SCENE PRESENCE]: Fully updating prim {0}, {1} - part timestamp {2}", +// "[SCENE PRESENCE]: Fully updating prim {0}, {1} - part timestamp {2}", // part.Name, part.UUID, part.TimeStampFull); - + part.SendFullUpdate(ControllingClient, GenerateClientFlags(part.UUID)); - // We'll update to the part's timestamp rather than the current time to + // We'll update to the part's timestamp rather than the current time to // avoid the race condition whereby the next tick occurs while we are // doing this update. If this happened, then subsequent updates which occurred // on the same tick or the next tick of the last update would be ignored. @@ -536,9 +536,9 @@ namespace OpenSim.Region.Environment.Scenes else if (update.LastTerseUpdateTime <= part.TimeStampTerse) { // m_log.DebugFormat( -// "[SCENE PRESENCE]: Tersely updating prim {0}, {1} - part timestamp {2}", +// "[SCENE PRESENCE]: Tersely updating prim {0}, {1} - part timestamp {2}", // part.Name, part.UUID, part.TimeStampTerse); - + part.SendTerseUpdate(ControllingClient); update.LastTerseUpdateTime = part.TimeStampTerse; @@ -575,15 +575,15 @@ namespace OpenSim.Region.Environment.Scenes /// /// This turns a child agent, into a root agent - /// This is called when an agent teleports into a region, or if an + /// This is called when an agent teleports into a region, or if an /// agent crosses into this region from a neighbor over the border /// public void MakeRootAgent(LLVector3 pos, bool isFlying) { // m_log.DebugFormat( -// "[SCENEPRESENCE]: Upgrading child agent {0}, {1} to a root agent in {2}", +// "[SCENEPRESENCE]: Upgrading child agent {0}, {1} to a root agent in {2}", // Name, UUID, m_scene.RegionInfo.RegionName); - + m_isChildAgent = false; AbsolutePosition = pos; @@ -599,7 +599,7 @@ namespace OpenSim.Region.Environment.Scenes //{ m_scene.SendAllSceneObjectsToClient(this); m_scene.LandChannel.SendLandUpdate(this, true); - + //m_gotAllObjectsInScene = true; //} } @@ -607,8 +607,8 @@ namespace OpenSim.Region.Environment.Scenes /// /// This turns a root agent into a child agent /// when an agent departs this region for a neighbor, this gets called. - /// - /// It doesn't get called for a teleport. Reason being, an agent that + /// + /// It doesn't get called for a teleport. Reason being, an agent that /// teleports out may not be anywhere near this region /// public void MakeChildAgent() @@ -616,15 +616,15 @@ namespace OpenSim.Region.Environment.Scenes m_animations.Clear(); // m_log.DebugFormat( -// "[SCENEPRESENCE]: Downgrading child agent {0}, {1} to a root agent in {2}", +// "[SCENEPRESENCE]: Downgrading child agent {0}, {1} to a root agent in {2}", // Name, UUID, m_scene.RegionInfo.RegionName); - + Velocity = new LLVector3(0, 0, 0); m_isChildAgent = true; m_scene.SwapRootAgentCount(true); RemoveFromPhysicalScene(); m_scene.EventManager.TriggerOnMakeChildAgent(this); - //this.Pos = new LLVector3(128, 128, 70); + //this.Pos = new LLVector3(128, 128, 70); } /// @@ -643,7 +643,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// public void Teleport(LLVector3 pos) @@ -656,7 +656,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// public void StopMovement() { @@ -762,7 +762,7 @@ namespace OpenSim.Region.Environment.Scenes uint flags = agentData.ControlFlags; LLQuaternion bodyRotation = agentData.BodyRotation; - // Camera location in world. We'll need to raytrace + // Camera location in world. We'll need to raytrace // from this location from time to time. m_CameraCenter.x = agentData.CameraCenter.X; m_CameraCenter.y = agentData.CameraCenter.Y; @@ -815,7 +815,7 @@ namespace OpenSim.Region.Environment.Scenes // m_AgentControlFlags = flags; // m_headrotation = agentData.AgentData.HeadRotation; // m_state = agentData.AgentData.State; - + if (m_allowMovement) { int i = 0; @@ -870,7 +870,7 @@ namespace OpenSim.Region.Environment.Scenes i++; } } - // Cause the avatar to stop flying if it's colliding + // Cause the avatar to stop flying if it's colliding // with something with the down arrow pressed. // Skip if there's no physicsactor @@ -886,7 +886,7 @@ namespace OpenSim.Region.Environment.Scenes // Are the collision requirements fulfilled? bool colliding = (m_physicsActor.IsColliding == true); - + if (m_physicsActor.Flying && colliding && controlland) { @@ -903,9 +903,9 @@ namespace OpenSim.Region.Environment.Scenes UpdateMovementAnimations(); } } - + m_scene.EventManager.TriggerOnClientMovement(this); - + m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); } @@ -934,7 +934,7 @@ namespace OpenSim.Region.Environment.Scenes m_pos += m_parentPosition + new LLVector3(0.0f, 0.0f, 2.0f*m_sitAvatarHeight); m_parentPosition = new LLVector3(); - + m_parentID = 0; SendFullUpdateToAllClients(); @@ -949,10 +949,10 @@ namespace OpenSim.Region.Environment.Scenes private void SendSitResponse(IClientAPI remoteClient, LLUUID targetID, LLVector3 offset) { - - - + + + bool autopilot = true; LLVector3 pos = new LLVector3(); LLQuaternion sitOrientation = new LLQuaternion(0, 0, 0, 1); @@ -1008,10 +1008,10 @@ namespace OpenSim.Region.Environment.Scenes } ControllingClient.SendSitResponse(targetID, offset, sitOrientation, autopilot, LLVector3.Zero, LLVector3.Zero, false); - - // This calls HandleAgentSit twice, once from here, and the client calls + + // This calls HandleAgentSit twice, once from here, and the client calls // HandleAgentSit itself after it gets to the location - // It doesn't get to the location until we've moved them there though + // It doesn't get to the location until we've moved them there though // which happens in HandleAgentSit :P if (!autopilot) HandleAgentSit(remoteClient, UUID); @@ -1256,7 +1256,7 @@ namespace OpenSim.Region.Environment.Scenes } m_perfMonMS = System.Environment.TickCount; - + m_rotation = rotation; NewForce newVelocity = new NewForce(); Vector3 direc = rotation*vec; @@ -1268,9 +1268,9 @@ namespace OpenSim.Region.Environment.Scenes direc *= 4; //bool controlland = (((m_AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) || ((m_AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG) != 0)); //bool colliding = (m_physicsActor.IsColliding==true); - //if (controlland) + //if (controlland) // m_log.Info("[AGENT]: landCommand"); - //if (colliding) + //if (colliding) // m_log.Info("[AGENT]: colliding"); //if (m_physicsActor.Flying && colliding && controlland) //{ @@ -1306,7 +1306,7 @@ namespace OpenSim.Region.Environment.Scenes #region Overridden Methods /// - /// + /// /// public override void Update() { @@ -1383,7 +1383,7 @@ namespace OpenSim.Region.Environment.Scenes lastPhysPos = AbsolutePosition; m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); - + } public void SendCoarseLocations() @@ -1433,7 +1433,7 @@ namespace OpenSim.Region.Environment.Scenes foreach (ScenePresence avatar in avatars) { SendFullUpdateToOtherClient(avatar); - + if (avatar.LocalId != LocalId) { if (!avatar.m_isChildAgent || m_scene.m_seeIntoRegionFromNeighbor) @@ -1448,7 +1448,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// public void SendInitialData() { @@ -1472,7 +1472,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// public void SendOwnAppearance() @@ -1481,7 +1481,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// public void SendAppearanceToAllOtherAgents() { @@ -1498,7 +1498,7 @@ namespace OpenSim.Region.Environment.Scenes } public void SendAppearanceToOtherAgent(ScenePresence avatar) - { + { avatar.ControllingClient.SendAppearance( m_appearance.Owner, m_appearance.VisualParams, @@ -1522,7 +1522,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// /// /// @@ -1536,7 +1536,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// + /// /// public void SendAnimPack() { @@ -1568,7 +1568,7 @@ namespace OpenSim.Region.Environment.Scenes } // Minimum Draw distance is 64 meters, the Radius of the draw distance sphere is 32m - if (Util.GetDistanceTo(AbsolutePosition,m_LastChildAgentUpdatePosition) > 32) + if (Util.GetDistanceTo(AbsolutePosition,m_LastChildAgentUpdatePosition) > 32) { ChildAgentDataUpdate cadu = new ChildAgentDataUpdate(); cadu.ActiveGroupID=LLUUID.Zero.UUID; @@ -1593,14 +1593,14 @@ namespace OpenSim.Region.Environment.Scenes multiplier = 0.25f; } - //m_log.Info("[NeighborThrottle]: " + m_scene.GetInaccurateNeighborCount().ToString() + " - m: " + multiplier.ToString()); + //m_log.Info("[NeighborThrottle]: " + m_scene.GetInaccurateNeighborCount().ToString() + " - m: " + multiplier.ToString()); cadu.throttles = ControllingClient.GetThrottlesPacked(multiplier); - - - - cadu.Velocity = new sLLVector3(Velocity); + + + + cadu.Velocity = new sLLVector3(Velocity); m_scene.SendOutChildAgentUpdates(cadu,this); m_LastChildAgentUpdatePosition.X = AbsolutePosition.X; m_LastChildAgentUpdatePosition.Y = AbsolutePosition.Y; @@ -1681,9 +1681,9 @@ namespace OpenSim.Region.Environment.Scenes ulong neighbourHandle = Helpers.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize)); SimpleRegionInfo neighbourRegion = m_scene.RequestNeighbouringRegionInfo(neighbourHandle); if (neighbourRegion != null) - { + { // When the neighbour is informed of the border crossing, it will set up CAPS handlers for the avatar - // This means we need to remove the current caps handler here and possibly compensate later, + // This means we need to remove the current caps handler here and possibly compensate later, // in case both scenes are being hosted on the same region server. Messy m_scene.RemoveCapsHandler(UUID); newpos = newpos + (vel); @@ -1691,17 +1691,17 @@ namespace OpenSim.Region.Environment.Scenes m_scene.InformNeighbourOfCrossing(neighbourHandle, m_controllingClient.AgentId, newpos, m_physicsActor.Flying); if (res) - { + { AgentCircuitData circuitdata = m_controllingClient.RequestClientInfo(); - // TODO Should construct this behind a method - string capsPath = + // TODO Should construct this behind a method + string capsPath = "http://" + neighbourRegion.ExternalHostName + ":" + neighbourRegion.HttpPort + "/CAPS/" + circuitdata.CapsPath + "0000/"; - + m_log.DebugFormat( - "[CAPS]: Sending new CAPS seed url {0} to client {1}", capsPath, m_uuid); - + "[CAPS]: Sending new CAPS seed url {0} to client {1}", capsPath, m_uuid); + m_controllingClient.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint, capsPath); MakeChildAgent(); @@ -1742,17 +1742,17 @@ namespace OpenSim.Region.Environment.Scenes /// public void ChildAgentDataUpdate(ChildAgentDataUpdate cAgentData, uint tRegionX, uint tRegionY, uint rRegionX, uint rRegionY) { - // + // int shiftx = ((int)rRegionX - (int)tRegionX) * (int)Constants.RegionSize; int shifty = ((int)rRegionY - (int)tRegionY) * (int)Constants.RegionSize; - + m_DrawDistance = cAgentData.drawdistance; m_pos = new LLVector3(cAgentData.Position.x + shiftx, cAgentData.Position.y + shifty, cAgentData.Position.z); // It's hard to say here.. We can't really tell where the camera position is unless it's in world cordinates from the sending region m_CameraCenter = new Vector3(cAgentData.cameraPosition.x, cAgentData.cameraPosition.y, cAgentData.cameraPosition.z); - + m_godlevel = cAgentData.godlevel; SetHeight(cAgentData.AVHeight); @@ -1793,8 +1793,8 @@ namespace OpenSim.Region.Environment.Scenes } catch (NullReferenceException) { - // Under extreme load, this returns a NullReference Exception that we can ignore. - // Ignoring this causes no movement to be sent to the physics engine... + // Under extreme load, this returns a NullReference Exception that we can ignore. + // Ignoring this causes no movement to be sent to the physics engine... // which when the scene is moving at 1 frame every 10 seconds, it doesn't really matter! } m_newForce = true; @@ -1809,12 +1809,12 @@ namespace OpenSim.Region.Environment.Scenes static ScenePresence() { - + LLObject.TextureEntry textu = AvatarAppearance.GetDefaultTexture(); DefaultTexture = textu.ToBytes(); } - [Serializable] + [Serializable] public class NewForce { public float X; @@ -1826,8 +1826,8 @@ namespace OpenSim.Region.Environment.Scenes } } - [Serializable] - public class ScenePartUpdate : ISerializable + [Serializable] + public class ScenePartUpdate : ISerializable { public LLUUID FullID; public uint LastFullUpdateTime; @@ -1883,7 +1883,7 @@ namespace OpenSim.Region.Environment.Scenes public void AddToPhysicalScene() { PhysicsScene scene = m_scene.PhysicsScene; - + PhysicsVector pVec = new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z); @@ -1936,7 +1936,7 @@ namespace OpenSim.Region.Environment.Scenes if (m_health <= 0) m_scene.EventManager.TriggerAvatarKill(killerObj, this); } - + if (Velocity.X > 0 || Velocity.Y > 0) UpdateMovementAnimations(); } @@ -2161,7 +2161,7 @@ namespace OpenSim.Region.Environment.Scenes // m_partsUpdateQueue = (UpdateQueue)info.GetValue("m_partsUpdateQueue", typeof(UpdateQueue)); /* - Dictionary updateTimes_work + Dictionary updateTimes_work = (Dictionary)info.GetValue("m_updateTimes", typeof(Dictionary)); foreach (Guid id in updateTimes_work.Keys) @@ -2188,7 +2188,7 @@ namespace OpenSim.Region.Environment.Scenes (float)info.GetValue("lastKnownAllowedPosition.X", typeof(float)), (float)info.GetValue("lastKnownAllowedPosition.Y", typeof(float)), (float)info.GetValue("lastKnownAllowedPosition.Z", typeof(float))); - + sentMessageAboutRestrictedParcelFlyingDown = (bool)info.GetValue("sentMessageAboutRestrictedParcelFlyingDown", typeof(bool)); m_LastChildAgentUpdatePosition @@ -2196,7 +2196,7 @@ namespace OpenSim.Region.Environment.Scenes (float)info.GetValue("m_LastChildAgentUpdatePosition.X", typeof(float)), (float)info.GetValue("m_LastChildAgentUpdatePosition.Y", typeof(float)), (float)info.GetValue("m_LastChildAgentUpdatePosition.Z", typeof(float))); - + m_perfMonMS = (int)info.GetValue("m_perfMonMS", typeof(int)); m_AgentControlFlags = (uint)info.GetValue("m_AgentControlFlags", typeof(uint)); @@ -2246,7 +2246,7 @@ namespace OpenSim.Region.Environment.Scenes info.AddValue("m_sitAvatarHeight", m_sitAvatarHeight); info.AddValue("m_godlevel", m_godlevel); info.AddValue("m_setAlwaysRun", m_setAlwaysRun); - + // Quaternion info.AddValue("m_bodyRot.w", m_bodyRot.w); info.AddValue("m_bodyRot.x", m_bodyRot.x); @@ -2374,7 +2374,7 @@ namespace OpenSim.Region.Environment.Scenes public void RegisterControlEventsToScript(int controls, int accept, int pass_on, uint Obj_localID, LLUUID Script_item_LLUUID) { - + ScriptControllers obj = new ScriptControllers(); obj.ignoreControls = ScriptControlled.CONTROL_ZERO; obj.eventControls = ScriptControlled.CONTROL_ZERO; @@ -2386,7 +2386,7 @@ namespace OpenSim.Region.Environment.Scenes IgnoredControls |= (ScriptControlled)controls; obj.ignoreControls = (ScriptControlled)controls; } - + if (pass_on == 0 && accept == 1) { IgnoredControls |= (ScriptControlled)controls; @@ -2432,7 +2432,7 @@ namespace OpenSim.Region.Environment.Scenes lock (scriptedcontrols) { scriptedcontrols.Clear(); - } + } ControllingClient.SendTakeControls(int.MaxValue, false, false); } @@ -2454,7 +2454,7 @@ namespace OpenSim.Region.Environment.Scenes internal void SendControlToScripts(uint flags, ScriptControlled lastFlags) { - + ScriptControlled allflags = ScriptControlled.CONTROL_ZERO; if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_POS) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS) != 0) @@ -2497,10 +2497,10 @@ namespace OpenSim.Region.Environment.Scenes { allflags |= ScriptControlled.CONTROL_LBUTTON; } - + ScriptControlled held = ScriptControlled.CONTROL_ZERO; ScriptControlled change = ScriptControlled.CONTROL_ZERO; - + foreach (ScriptControlled DCF in Enum.GetValues(typeof (ScriptControlled))) { // Held @@ -2539,7 +2539,7 @@ namespace OpenSim.Region.Environment.Scenes } } LastCommands = allflags; - + } internal uint RemoveIgnoredControls(uint flags, ScriptControlled Ignored) { diff --git a/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs b/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs index 8390f64..7d048a3 100644 --- a/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs +++ b/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs @@ -70,7 +70,7 @@ namespace OpenSim.Region.Environment.Scenes obj.ResetIDs(); } //if we want this to be a import method then we need new uuids for the object to avoid any clashes - //obj.RegenerateFullIDs(); + //obj.RegenerateFullIDs(); m_innerScene.AddEntity(obj); SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); @@ -143,7 +143,7 @@ namespace OpenSim.Region.Environment.Scenes { XmlDocument doc = new XmlDocument(); XmlNode rootNode; - + XmlTextReader reader = new XmlTextReader(new StringReader(xmlString)); reader.WhitespaceHandling = WhitespaceHandling.None; doc.Load(reader); @@ -153,7 +153,7 @@ namespace OpenSim.Region.Environment.Scenes { CreatePrimFromXml(aPrimNode.OuterXml); } - + } public void LoadPrimsFromXml2(string fileName) @@ -206,7 +206,7 @@ namespace OpenSim.Region.Environment.Scenes rootPart.PhysActor.LocalID = rootPart.LocalId; rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); } - rootPart.Velocity = receivedVelocity; + rootPart.Velocity = receivedVelocity; } obj.ScheduleGroupForFullUpdate(); diff --git a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs index a150164..90a971f 100644 --- a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs @@ -97,12 +97,12 @@ namespace OpenSim.Region.Environment.Scenes private int m_scriptLinesPerSecond = 0; private int objectCapacity = 45000; - + SimStatsPacket.StatBlock[] sb = new SimStatsPacket.StatBlock[21]; SimStatsPacket.RegionBlock rb = new SimStatsPacket.RegionBlock(); SimStatsPacket statpack = (SimStatsPacket)PacketPool.Instance.GetPacket(PacketType.SimStats); - + private RegionInfo ReportingRegion; @@ -138,8 +138,8 @@ namespace OpenSim.Region.Environment.Scenes lock (m_report) { // Packet is already initialized and ready for data insert - - + + statpack.Region = rb; statpack.Region.RegionX = ReportingRegion.RegionLocX; statpack.Region.RegionY = ReportingRegion.RegionLocY; @@ -152,99 +152,99 @@ namespace OpenSim.Region.Environment.Scenes statpack.Region.RegionFlags = (uint) 0; } statpack.Region.ObjectCapacity = (uint) objectCapacity; - + #region various statistic googly moogly - + // Our FPS is actually 10fps, so multiplying by 5 to get the amount that people expect there // 0-50 is pretty close to 0-45 float simfps = (int) ((m_fps * 5)); - + //if (simfps > 45) //simfps = simfps - (simfps - 45); //if (simfps < 0) //simfps = 0; - + // float physfps = ((m_pfps / 1000)); - + //if (physfps > 600) //physfps = physfps - (physfps - 600); - + if (physfps < 0) physfps = 0; - + #endregion - - //Our time dilation is 0.91 when we're running a full speed, - // therefore to make sure we get an appropriate range, - // we have to factor in our error. (0.10f * statsUpdateFactor) + + //Our time dilation is 0.91 when we're running a full speed, + // therefore to make sure we get an appropriate range, + // we have to factor in our error. (0.10f * statsUpdateFactor) // multiplies the fix for the error times the amount of times it'll occur a second // / 10 divides the value by the number of times the sim heartbeat runs (10fps) // Then we divide the whole amount by the amount of seconds pass in between stats updates. - + sb[0].StatID = (uint) Stats.TimeDilation; sb[0].StatValue = m_timeDilation ; //((((m_timeDilation + (0.10f * statsUpdateFactor)) /10) / statsUpdateFactor)); - + sb[1].StatID = (uint) Stats.SimFPS; sb[1].StatValue = simfps/statsUpdateFactor; - + sb[2].StatID = (uint) Stats.PhysicsFPS; sb[2].StatValue = physfps / statsUpdateFactor; - + sb[3].StatID = (uint) Stats.AgentUpdates; sb[3].StatValue = (m_agentUpdates / statsUpdateFactor); - + sb[4].StatID = (uint) Stats.Agents; sb[4].StatValue = m_rootAgents; - + sb[5].StatID = (uint) Stats.ChildAgents; sb[5].StatValue = m_childAgents; - + sb[6].StatID = (uint) Stats.TotalPrim; sb[6].StatValue = m_numPrim; - + sb[7].StatID = (uint) Stats.ActivePrim; sb[7].StatValue = m_activePrim; - + sb[8].StatID = (uint)Stats.FrameMS; sb[8].StatValue = m_frameMS / statsUpdateFactor; - + sb[9].StatID = (uint)Stats.NetMS; sb[9].StatValue = m_netMS / statsUpdateFactor; - + sb[10].StatID = (uint)Stats.PhysicsMS; sb[10].StatValue = m_physicsMS / statsUpdateFactor; - + sb[11].StatID = (uint)Stats.ImageMS ; sb[11].StatValue = m_imageMS / statsUpdateFactor; - + sb[12].StatID = (uint)Stats.OtherMS; sb[12].StatValue = m_otherMS / statsUpdateFactor; - + sb[13].StatID = (uint)Stats.InPacketsPerSecond; sb[13].StatValue = (m_inPacketsPerSecond); - + sb[14].StatID = (uint)Stats.OutPacketsPerSecond; sb[14].StatValue = (m_outPacketsPerSecond / statsUpdateFactor); - + sb[15].StatID = (uint)Stats.UnAckedBytes; sb[15].StatValue = m_unAckedBytes; - + sb[16].StatID = (uint)Stats.AgentMS; sb[16].StatValue = m_agentMS / statsUpdateFactor; - + sb[17].StatID = (uint)Stats.PendingDownloads; sb[17].StatValue = m_pendingDownloads; - + sb[18].StatID = (uint)Stats.PendingUploads; sb[18].StatValue = m_pendingUploads; - + sb[19].StatID = (uint)Stats.ActiveScripts; sb[19].StatValue = m_activeScripts; - + sb[20].StatID = (uint)Stats.ScriptLinesPerSecond; sb[20].StatValue = m_scriptLinesPerSecond / statsUpdateFactor; - + statpack.Stat = sb; handlerSendStatResult = OnSendStatsResult; @@ -255,7 +255,7 @@ namespace OpenSim.Region.Environment.Scenes resetvalues(); } } - + private void resetvalues() { m_timeDilation = 0; @@ -274,13 +274,13 @@ namespace OpenSim.Region.Environment.Scenes m_imageMS = 0; m_otherMS = 0; -//Ckrinke This variable is not used, so comment to remove compiler warning until it is used. +//Ckrinke This variable is not used, so comment to remove compiler warning until it is used. //Ckrinke m_scriptMS = 0; } # region methods called from Scene // The majority of these functions are additive - // so that you can easily change the amount of + // so that you can easily change the amount of // seconds in between sim stats updates public void AddTimeDilation(float td) @@ -368,14 +368,14 @@ namespace OpenSim.Region.Environment.Scenes { m_otherMS += ms; } - -// private static readonly log4net.ILog m_log + +// private static readonly log4net.ILog m_log // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - + public void addPendingDownload(int count) { m_pendingDownloads += count; - //m_log.InfoFormat("[stats]: Adding {0} to pending downloads to make {1}", count, m_pendingDownloads); + //m_log.InfoFormat("[stats]: Adding {0} to pending downloads to make {1}", count, m_pendingDownloads); } public void addScriptLines(int count) diff --git a/OpenSim/Region/Environment/Types/UpdateQueue.cs b/OpenSim/Region/Environment/Types/UpdateQueue.cs index ec1ffd2..e9133ac 100644 --- a/OpenSim/Region/Environment/Types/UpdateQueue.cs +++ b/OpenSim/Region/Environment/Types/UpdateQueue.cs @@ -34,8 +34,8 @@ using OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.Environment.Types { - [Serializable] - public class UpdateQueue : ISerializable + [Serializable] + public class UpdateQueue : ISerializable { private Queue m_queue; diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index 6087857..78b5d1f 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs @@ -292,7 +292,7 @@ namespace OpenSim.Region.Examples.SimpleModule return new byte[0]; } - + public virtual void SendAnimations(LLUUID[] animations, int[] seqs, LLUUID sourceAgentId) { } @@ -311,12 +311,12 @@ namespace OpenSim.Region.Examples.SimpleModule LLUUID imSessionID, string fromName, byte dialog, uint timeStamp) { } - + public virtual void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, LLUUID imSessionID, string fromName, byte dialog, uint timeStamp, byte[] binaryBucket) { - } + } public virtual void SendLayerData(float[] map) { @@ -396,7 +396,7 @@ namespace OpenSim.Region.Examples.SimpleModule } public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, - PrimitiveBaseShape primShape, LLVector3 pos, LLVector3 vel, + PrimitiveBaseShape primShape, LLVector3 pos, LLVector3 vel, LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, @@ -404,7 +404,7 @@ namespace OpenSim.Region.Examples.SimpleModule { } public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, - PrimitiveBaseShape primShape, LLVector3 pos, LLVector3 vel, + PrimitiveBaseShape primShape, LLVector3 pos, LLVector3 vel, LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, @@ -443,10 +443,10 @@ namespace OpenSim.Region.Examples.SimpleModule public virtual void SendRemoveInventoryItem(LLUUID itemID) { } - + /// IClientAPI.SendBulkUpdateInventory(InventoryItemBase) - public virtual void SendBulkUpdateInventory(InventoryItemBase item) - { + public virtual void SendBulkUpdateInventory(InventoryItemBase item) + { } public LLUUID GetDefaultAnimation(string name) @@ -550,7 +550,7 @@ namespace OpenSim.Region.Examples.SimpleModule public void SendObjectPropertiesFamilyData(uint RequestFlags, LLUUID ObjectUUID, LLUUID OwnerID, LLUUID GroupID, uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask, - uint NextOwnerMask, int OwnershipCost, byte SaleType,int SalePrice, uint Category, + uint NextOwnerMask, int OwnershipCost, byte SaleType,int SalePrice, uint Category, LLUUID LastOwnerID, string ObjectName, string Description) { } diff --git a/OpenSim/Region/Examples/SimpleModule/Properties/AssemblyInfo.cs b/OpenSim/Region/Examples/SimpleModule/Properties/AssemblyInfo.cs index e0e8fd9..4c0c0a0 100644 --- a/OpenSim/Region/Examples/SimpleModule/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Examples/SimpleModule/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. [assembly: AssemblyTitle("OpenSim.Region.Examples.SimpleModule")] @@ -40,8 +40,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)] @@ -51,11 +51,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.*")] [assembly: AssemblyVersion("1.0.0.0")] diff --git a/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs index 4c933d6..bac2252 100644 --- a/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs @@ -101,7 +101,7 @@ namespace OpenSim.Region.Modules.AvatarFactory else { // BUG: !? (Reduced from 5000 to 500 by Adam) - Thread.Sleep(500); //why is this here? + Thread.Sleep(500); //why is this here? //this is the first thread to request this appearance //so let it check the db and if not found then create a default appearance @@ -279,7 +279,7 @@ namespace OpenSim.Region.Modules.AvatarFactory { if (profile.RootFolder != null) { - + foreach (AvatarWearingArgs.Wearable wear in e.NowWearing) { if (wear.Type < 13) @@ -292,9 +292,9 @@ namespace OpenSim.Region.Modules.AvatarFactory else { LLUUID assetId; - + InventoryItemBase baseItem = profile.RootFolder.FindItem(wear.ItemID); - + if (baseItem != null) { assetId = baseItem.AssetID; diff --git a/OpenSim/Region/Modules/AvatarFactory/Properties/AssemblyInfo.cs b/OpenSim/Region/Modules/AvatarFactory/Properties/AssemblyInfo.cs index a9fe53e..640b0b0 100644 --- a/OpenSim/Region/Modules/AvatarFactory/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Modules/AvatarFactory/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. [assembly: AssemblyTitle("OpenSim.Region.Modules.AvatarFactory")] @@ -40,8 +40,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)] @@ -51,11 +51,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.*")] [assembly: AssemblyVersion("1.0.0.0")] diff --git a/OpenSim/Region/Modules/Python/Properties/AssemblyInfo.cs b/OpenSim/Region/Modules/Python/Properties/AssemblyInfo.cs index 0839267..a54ddda 100644 --- a/OpenSim/Region/Modules/Python/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Modules/Python/Properties/AssemblyInfo.cs @@ -2,7 +2,7 @@ using System.Runtime.CompilerServices; 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. [assembly: AssemblyTitle("Python")] @@ -14,8 +14,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)] @@ -25,11 +25,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.*")] [assembly: AssemblyVersion("1.0.0.0")] diff --git a/OpenSim/Region/Modules/SvnSerialiser/Properties/AssemblyInfo.cs b/OpenSim/Region/Modules/SvnSerialiser/Properties/AssemblyInfo.cs index c9f8423..165fcea 100644 --- a/OpenSim/Region/Modules/SvnSerialiser/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Modules/SvnSerialiser/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. [assembly: AssemblyTitle("SvnSerialiser")] @@ -40,8 +40,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)] @@ -51,11 +51,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.*")] [assembly: AssemblyVersion("1.0.0.0")] diff --git a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs index 9415fff..5ced2d1 100644 --- a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs +++ b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs @@ -282,9 +282,9 @@ namespace OpenSim.Region.Physics.BulletXPlugin bool needsCollision;// = base.NeedsCollision(bodyA, bodyB); int c1 = 3; int c2 = 3; - + //////////////////////////////////////////////////////// - //BulletX Mesh Collisions + //BulletX Mesh Collisions //added by Jed zhu //data: May 07,2005 //////////////////////////////////////////////////////// @@ -302,9 +302,9 @@ namespace OpenSim.Region.Physics.BulletXPlugin else needsCollision = base.NeedsCollision(bodyA, bodyB); - + #endregion - + //m_log.DebugFormat("[BulletX]: A collision was detected between {0} and {1} --> {2}", nameA, nameB, //needsCollision); @@ -705,7 +705,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin } foreach (BulletXPrim prim in _prims.Values) { - //_height = HeightValue(prim.RigidBodyPosition); + //_height = HeightValue(prim.RigidBodyPosition); _height = _simFlatPlanet.HeightValue(prim.RigidBodyPosition); prim.ValidateHeight(_height); //if (_simFlatPlanet.heightIsNotValid(prim.RigidBodyPosition, out _height)) prim.ValidateHeight(_height); @@ -741,8 +741,8 @@ namespace OpenSim.Region.Physics.BulletXPlugin public override bool IsThreaded { - get - { + get + { return (false); // for now we won't be multithreaded } } @@ -1380,17 +1380,17 @@ namespace OpenSim.Region.Physics.BulletXPlugin /// public class BulletXPrim : BulletXActor { - //Density it will depends of material. + //Density it will depends of material. //For now all prims have the same density, all prims are made of water. Be water my friend! :D private const float _density = 1000.0f; private BulletXScene _parent_scene; private PhysicsVector m_prev_position = new PhysicsVector(0, 0, 0); private bool m_lastUpdateSent = false; - //added by jed zhu + //added by jed zhu private IMesh _mesh; public IMesh GetMesh() { return _mesh; } - + public BulletXPrim(String primName, BulletXScene parent_scene, PhysicsVector pos, PhysicsVector size, AxiomQuaternion rotation, IMesh mesh, PrimitiveBaseShape pbs, bool isPhysical) diff --git a/OpenSim/Region/Physics/BulletXPlugin/TriangleIndexVertexArray.cs b/OpenSim/Region/Physics/BulletXPlugin/TriangleIndexVertexArray.cs index 0902077..637cf6e 100644 --- a/OpenSim/Region/Physics/BulletXPlugin/TriangleIndexVertexArray.cs +++ b/OpenSim/Region/Physics/BulletXPlugin/TriangleIndexVertexArray.cs @@ -20,8 +20,8 @@ */ /* - This file contains a class TriangleIndexVertexArray. I tried using the class with the same name - from the BulletX implementation and found it unusable for the purpose of using triangle meshes + This file contains a class TriangleIndexVertexArray. I tried using the class with the same name + from the BulletX implementation and found it unusable for the purpose of using triangle meshes within BulletX as the implementation was painfully incomplete. The attempt to derive from the original class failed as viable members were hidden. Fiddling around with BulletX itself was not my intention. diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index c1dc91b..3cf2646 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs @@ -140,7 +140,7 @@ namespace OpenSim.Region.Physics.Manager // a race condition if the last subscriber unsubscribes // immediately after the null check and before the event is raised. RequestTerseUpdate handler = OnRequestTerseUpdate; - + if (handler != null) { handler(); @@ -163,9 +163,9 @@ namespace OpenSim.Region.Physics.Manager public virtual void SendCollisionUpdate(EventArgs e) { CollisionUpdate handler = OnCollisionUpdate; - + if (handler != null) - { + { handler(e); } } @@ -205,9 +205,9 @@ namespace OpenSim.Region.Physics.Manager public class NullPhysicsActor : PhysicsActor { - public override bool Stopped - { - get{ return false; } + public override bool Stopped + { + get{ return false; } } public override PhysicsVector Position @@ -222,7 +222,7 @@ namespace OpenSim.Region.Physics.Manager set { return; } } - public override uint LocalID + public override uint LocalID { set { return; } } @@ -240,14 +240,14 @@ namespace OpenSim.Region.Physics.Manager public override float Buoyancy { get { return 0f; } - set { return; } + set { return; } } public override bool FloatOnWater { set { return; } } - + public override bool CollidingGround { get { return false; } @@ -297,7 +297,7 @@ namespace OpenSim.Region.Physics.Manager set { return; } } - public override float CollisionScore + public override float CollisionScore { get { return 0f; } } @@ -385,7 +385,7 @@ namespace OpenSim.Region.Physics.Manager public override void SubscribeEvents(int ms) { - + } public override void UnSubscribeEvents() { diff --git a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs index b8ca180..6a71581 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs @@ -94,7 +94,7 @@ namespace OpenSim.Region.Physics.Manager _MeshPlugins.Add(plugHard.GetName(), plugHard); m_log.Info("[PHYSICS]: Added meshing engine: " + plugHard.GetName()); - // And now walk all assemblies (DLLs effectively) and see if they are home + // And now walk all assemblies (DLLs effectively) and see if they are home // of a plugin that is of interest for us string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Physics"); string[] pluginFiles = Directory.GetFiles(path, "*.dll"); @@ -108,11 +108,11 @@ namespace OpenSim.Region.Physics.Manager private void AddPlugin(string FileName) { // TODO / NOTE - // The assembly named 'OpenSim.Region.Physics.BasicPhysicsPlugin' was loaded from + // The assembly named 'OpenSim.Region.Physics.BasicPhysicsPlugin' was loaded from // 'file:///C:/OpenSim/trunk2/bin/Physics/OpenSim.Region.Physics.BasicPhysicsPlugin.dll' // using the LoadFrom context. The use of this context can result in unexpected behavior - // for serialization, casting and dependency resolution. In almost all cases, it is recommended - // that the LoadFrom context be avoided. This can be done by installing assemblies in the + // for serialization, casting and dependency resolution. In almost all cases, it is recommended + // that the LoadFrom context be avoided. This can be done by installing assemblies in the // Global Assembly Cache or in the ApplicationBase directory and using Assembly. // Load when explicitly loading assemblies. Assembly pluginAssembly = Assembly.LoadFrom(FileName); diff --git a/OpenSim/Region/Physics/Manager/PhysicsSensor.cs b/OpenSim/Region/Physics/Manager/PhysicsSensor.cs index ce53108..add741b 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsSensor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsSensor.cs @@ -35,7 +35,7 @@ namespace OpenSim.Region.Physics.Manager { NONE = 0, AGENT = 1, - ACTIVE = 2, + ACTIVE = 2, PASSIVE = 3, SCRIPTED = 4 } diff --git a/OpenSim/Region/Physics/Manager/ZeroMesher.cs b/OpenSim/Region/Physics/Manager/ZeroMesher.cs index b98cb35..b759213 100644 --- a/OpenSim/Region/Physics/Manager/ZeroMesher.cs +++ b/OpenSim/Region/Physics/Manager/ZeroMesher.cs @@ -31,9 +31,9 @@ using OpenSim.Framework; /* * This is the zero mesher. * Whatever you want him to mesh, he can't, telling you that by responding with a null pointer. - * Effectivly this is for switching off meshing and for testing as each physics machine should deal + * Effectivly this is for switching off meshing and for testing as each physics machine should deal * with the null pointer situation. - * But it's also a convenience thing, as physics machines can rely on having a mesher in any situation, even + * But it's also a convenience thing, as physics machines can rely on having a mesher in any situation, even * if it's a dump one like this. * Note, that this mesher is *not* living in a module but in the manager itself, so * it's always availabe and thus the default in case of configuration errors diff --git a/OpenSim/Region/Physics/Meshing/HelperTypes.cs b/OpenSim/Region/Physics/Meshing/HelperTypes.cs index efc5968..584133c 100644 --- a/OpenSim/Region/Physics/Meshing/HelperTypes.cs +++ b/OpenSim/Region/Physics/Meshing/HelperTypes.cs @@ -49,7 +49,7 @@ public class Quaternion } public Quaternion(Vertex axis, float angle) { - // using (* 0.5) instead of (/2) + // using (* 0.5) instead of (/2) w = (float)Math.Cos(angle * 0.5f); x = axis.X * (float)Math.Sin(angle * 0.5f); y = axis.Y * (float)Math.Sin(angle * 0.5f); @@ -65,8 +65,8 @@ public class Quaternion c.w = a.w * b.w - a.x * b.x - a.y * b.y - a.z * b.z; return c; } - - + + public Matrix4 computeMatrix() { return new Matrix4(this); @@ -74,7 +74,7 @@ public class Quaternion public void normalize() { float mag = length(); - + w /= mag; x /= mag; y /= mag; @@ -367,7 +367,7 @@ public class Triangle // It is assumed, that the triangles vertices are already set correctly double p1x, p2x, p1y, p2y, p3x, p3y; - // Deviation of this routine: + // Deviation of this routine: // A circle has the general equation (M-p)^2=r^2, where M and p are vectors // this gives us three equations f(p)=r^2, each for one point p1, p2, p3 // putting respectively two equations together gives two equations @@ -378,7 +378,7 @@ public class Triangle // Now using the equations that are formed by the components of the vectors // and isolate Mx lets you make one equation that only holds My // The rest is straight forward and eaasy :-) - // + // /* helping variables for temporary results */ double c1, c2; @@ -496,7 +496,7 @@ public class Triangle v2 = vt; } - // Dumps a triangle in the "raw faces" format, blender can import. This is for visualisation and + // Dumps a triangle in the "raw faces" format, blender can import. This is for visualisation and // debugging purposes public String ToStringRaw() { diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index 2e7ec15..4bf12c9 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs @@ -115,7 +115,7 @@ namespace OpenSim.Region.Physics.Meshing for (iCurrentVertex = usedForSeed; iCurrentVertex < iMaxVertex; iCurrentVertex++) { // Background: A triangle mesh fulfills the delaunay condition if (iff!) - // each circumlocutory circle (i.e. the circle that touches all three corners) + // each circumlocutory circle (i.e. the circle that touches all three corners) // of each triangle is empty of other vertices. // Obviously a single (seeding) triangle fulfills this condition. // If we now add one vertex, we need to reconstruct all triangles, that @@ -132,7 +132,7 @@ namespace OpenSim.Region.Physics.Meshing // Reconstruction phase. First step, dissolve each triangle into it's simplices, // i.e. it's "border lines" // Goal is to find "inner" borders and delete them, while the hull gets conserved. - // Inner borders are special in the way that they always come twice, which is how we detect them + // Inner borders are special in the way that they always come twice, which is how we detect them foreach (Triangle t in influencedTriangles) { List newSimplices = t.GetSimplices(); @@ -142,8 +142,8 @@ namespace OpenSim.Region.Physics.Meshing // Now sort the simplices. That will make identical ones reside side by side in the list simplices.Sort(); - // Look for duplicate simplices here. - // Remember, they are directly side by side in the list right now, + // Look for duplicate simplices here. + // Remember, they are directly side by side in the list right now, // So we only check directly neighbours int iSimplex; List innerSimplices = new List(); @@ -162,7 +162,7 @@ namespace OpenSim.Region.Physics.Meshing } // each simplex still in the list belongs to the hull of the region in question - // The new vertex (yes, we still deal with verices here :-)) forms a triangle + // The new vertex (yes, we still deal with verices here :-)) forms a triangle // with each of these simplices. Build the new triangles and add them to the list foreach (Simplex s in simplices) { @@ -206,14 +206,14 @@ namespace OpenSim.Region.Physics.Meshing } break; - + default: if (hshape == HollowShape.Same) hshape= HollowShape.Square; break; } - + SimpleHull holeHull = null; if (hshape == HollowShape.Square) @@ -428,13 +428,13 @@ namespace OpenSim.Region.Physics.Meshing UInt16 pathShearY = primShape.PathShearY; Int16 twistTop = primShape.PathTwistBegin; Int16 twistBot = primShape.PathTwist; - + //m_log.Error("pathShear:" + primShape.PathShearX.ToString() + "," + primShape.PathShearY.ToString()); //m_log.Error("pathTaper:" + primShape.PathTaperX.ToString() + "," + primShape.PathTaperY.ToString()); //m_log.Error("ProfileBegin:" + primShape.ProfileBegin.ToString() + "," + primShape.ProfileBegin.ToString()); //m_log.Error("PathScale:" + primShape.PathScaleX.ToString() + "," + primShape.PathScaleY.ToString()); - + // Procedure: This is based on the fact that the upper (plus) and lower (minus) Z-surface // of a block are basically the same // They may be warped differently but the shape is identical @@ -469,7 +469,7 @@ namespace OpenSim.Region.Physics.Meshing if (fProfileBeginAngle < fProfileEndAngle) fProfileEndAngle -= 360.0; - // Note, that we don't want to cut out a triangle, even if this is a + // Note, that we don't want to cut out a triangle, even if this is a // good approximation for small cuts. Indeed we want to cut out an arc // and we approximate this arc by a polygon chain // Also note, that these vectors are of length 1.0 and thus their endpoints lay outside the model space @@ -559,7 +559,7 @@ namespace OpenSim.Region.Physics.Meshing extr.taperBotFactorX = 1.0f - ((100 - (float)taperX) / 100); //m_log.Warn("taperBotFactorX: " + extr.taperBotFactorX.ToString()); } - + } if (taperY != 100) @@ -575,8 +575,8 @@ namespace OpenSim.Region.Physics.Meshing //m_log.Warn("taperBotFactorY: " + extr.taperBotFactorY.ToString()); } } - - + + if (pathShearX != 0) { if (pathShearX > 50) @@ -585,7 +585,7 @@ namespace OpenSim.Region.Physics.Meshing extr.pushX = (((float)(256 - pathShearX) / 100) * -1f); // m_log.Warn("pushX: " + extr.pushX); } - else + else { extr.pushX = (float)pathShearX / 100; // m_log.Warn("pushX: " + extr.pushX); @@ -600,7 +600,7 @@ namespace OpenSim.Region.Physics.Meshing extr.pushY = (((float)(256 - pathShearY) / 100) * -1f); //m_log.Warn("pushY: " + extr.pushY); } - else + else { extr.pushY = (float)pathShearY / 100; //m_log.Warn("pushY: " + extr.pushY); @@ -615,7 +615,7 @@ namespace OpenSim.Region.Physics.Meshing extr.twistTop = 360 - (-1 * extr.twistTop); } - + extr.twistTop = (float)(extr.twistTop * DEG_TO_RAD); } @@ -660,7 +660,7 @@ namespace OpenSim.Region.Physics.Meshing UInt16 pathShearY = primShape.PathShearY; Int16 twistBot = primShape.PathTwist; Int16 twistTop = primShape.PathTwistBegin; - + // Procedure: This is based on the fact that the upper (plus) and lower (minus) Z-surface // of a block are basically the same @@ -715,7 +715,7 @@ namespace OpenSim.Region.Physics.Meshing //Vertex Q1Q12 = new Vertex(-0.46f, -0.18f, 0.0f); //Vertex Q1Q13 = new Vertex(-0.43f, -0.24f, 0.0f); //Vertex Q1Q14 = new Vertex(-0.40f, -0.30f, 0.0f); - + SimpleHull outerHull = new SimpleHull(); //Clockwise around the quadrants //outerHull.AddVertex(Q1Q15); @@ -803,7 +803,7 @@ namespace OpenSim.Region.Physics.Meshing if (fProfileBeginAngle < fProfileEndAngle) fProfileEndAngle -= 360.0; - // Note, that we don't want to cut out a triangle, even if this is a + // Note, that we don't want to cut out a triangle, even if this is a // good approximation for small cuts. Indeed we want to cut out an arc // and we approximate this arc by a polygon chain // Also note, that these vectors are of length 1.0 and thus their endpoints lay outside the model space @@ -940,7 +940,7 @@ namespace OpenSim.Region.Physics.Meshing extr.pushY = (float)pathShearY / 100; //m_log.Warn("pushY: " + extr.pushY); } - + } if (twistTop != 0) @@ -949,9 +949,9 @@ namespace OpenSim.Region.Physics.Meshing if (extr.twistTop > 0) { extr.twistTop = 360 - (-1 * extr.twistTop); - + } - + extr.twistTop = (float)(extr.twistTop * DEG_TO_RAD); } @@ -967,7 +967,7 @@ namespace OpenSim.Region.Physics.Meshing } extr.twistMid = (float)(extr.twistMid * DEG_TO_RAD); } - + if (twistBot != 0) { extr.twistBot = 180 * ((float)twistBot / 100); @@ -1013,7 +1013,7 @@ namespace OpenSim.Region.Physics.Meshing Vertex MM = new Vertex(-0.25f, -0.45f, 0.0f); Vertex PM = new Vertex(+0.5f, 0f, 0.0f); Vertex PP = new Vertex(-0.25f, +0.45f, 0.0f); - + SimpleHull outerHull = new SimpleHull(); //outerHull.AddVertex(MM); @@ -1022,7 +1022,7 @@ namespace OpenSim.Region.Physics.Meshing outerHull.AddVertex(PP); outerHull.AddVertex(MM); outerHull.AddVertex(PM); - + // Deal with cuts now if ((profileBegin != 0) || (profileEnd != 0)) { @@ -1034,7 +1034,7 @@ namespace OpenSim.Region.Physics.Meshing if (fProfileBeginAngle < fProfileEndAngle) fProfileEndAngle -= 360.0; - // Note, that we don't want to cut out a triangle, even if this is a + // Note, that we don't want to cut out a triangle, even if this is a // good approximation for small cuts. Indeed we want to cut out an arc // and we approximate this arc by a polygon chain // Also note, that these vectors are of length 1.0 and thus their endpoints lay outside the model space @@ -1177,7 +1177,7 @@ namespace OpenSim.Region.Physics.Meshing extr.twistTop = 360 - (-1 * extr.twistTop); } - + extr.twistTop = (float)(extr.twistTop * DEG_TO_RAD); } @@ -1255,7 +1255,7 @@ namespace OpenSim.Region.Physics.Meshing // Base Faces of the Icosahedron (20) - SphereLODTriangle(v1, v2, v3, diameter, LOD, m); + SphereLODTriangle(v1, v2, v3, diameter, LOD, m); SphereLODTriangle(v4, v3, v2, diameter, LOD, m); SphereLODTriangle(v4, v5, v6, diameter, LOD, m); SphereLODTriangle(v4, v9, v5, diameter, LOD, m); @@ -1284,7 +1284,7 @@ namespace OpenSim.Region.Physics.Meshing v.Z *= size.Z; } - // This was built with the normals pointing inside.. + // This was built with the normals pointing inside.. // therefore we have to invert the normals foreach (Triangle t in m.triangles) { @@ -1308,7 +1308,7 @@ namespace OpenSim.Region.Physics.Meshing v.Y *= size.Y; v.Z *= size.Z; } - // This was built with the normals pointing inside.. + // This was built with the normals pointing inside.. // therefore we have to invert the normals foreach (Triangle t in sm.triangles) { @@ -1462,7 +1462,7 @@ namespace OpenSim.Region.Physics.Meshing default: mesh = CreateBoxMesh(primName, primShape, size); CalcNormals(mesh); - //Set default mesh to cube otherwise it'll return + //Set default mesh to cube otherwise it'll return // null and crash on the 'setMesh' method in the physics plugins. //mesh = null; break; @@ -1472,6 +1472,6 @@ namespace OpenSim.Region.Physics.Meshing return mesh; } - + } } diff --git a/OpenSim/Region/Physics/Meshing/SimpleHull.cs b/OpenSim/Region/Physics/Meshing/SimpleHull.cs index 2896d3b..5eeadae 100644 --- a/OpenSim/Region/Physics/Meshing/SimpleHull.cs +++ b/OpenSim/Region/Physics/Meshing/SimpleHull.cs @@ -337,7 +337,7 @@ namespace OpenSim.Region.Physics.Meshing } - if (baseStartVertex == null) // i.e. no simplex fulfilled the "outside" condition. + if (baseStartVertex == null) // i.e. no simplex fulfilled the "outside" condition. // In otherwords, subtractHull completely embraces baseHull { return result; diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index 4165484..5024b5d 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs @@ -36,7 +36,7 @@ namespace OpenSim.Region.Physics.OdePlugin /// /// Various properties that ODE uses for AMotors but isn't exposed in ODE.NET so we must define them ourselves. /// - + public enum dParam : int { LowStop = 0, @@ -106,7 +106,7 @@ namespace OpenSim.Region.Physics.OdePlugin private CollisionCategories m_collisionFlags = (CollisionCategories.Geom | CollisionCategories.Space | CollisionCategories.Body - | CollisionCategories.Character + | CollisionCategories.Character | CollisionCategories.Land); public IntPtr Body; private OdeScene _parent_scene; @@ -145,7 +145,7 @@ namespace OpenSim.Region.Physics.OdePlugin { m_colliderarr[i] = false; } - CAPSULE_LENGTH = (size.Z - ((size.Z * height_fudge_factor))); + CAPSULE_LENGTH = (size.Z - ((size.Z * height_fudge_factor))); lock (OdeScene.OdeLock) { @@ -338,7 +338,7 @@ namespace OpenSim.Region.Physics.OdePlugin } /// - /// turn the PID controller on or off. + /// turn the PID controller on or off. /// The PID Controller will turn on all by itself in many situations /// /// @@ -354,7 +354,7 @@ namespace OpenSim.Region.Physics.OdePlugin /// /// This 'puts' an avatar somewhere in the physics space. - /// Not really a good choice unless you 'know' it's a good + /// Not really a good choice unless you 'know' it's a good /// spot otherwise you're likely to orbit the avatar. /// public override PhysicsVector Position @@ -389,7 +389,7 @@ namespace OpenSim.Region.Physics.OdePlugin lock (OdeScene.OdeLock) { d.JointDestroy(Amotor); - + PhysicsVector SetSize = value; float prevCapsule = CAPSULE_LENGTH; float capsuleradius = CAPSULE_RADIUS; @@ -405,7 +405,7 @@ namespace OpenSim.Region.Physics.OdePlugin AvatarGeomAndBodyCreation(_position.X, _position.Y, _position.Z + (Math.Abs(CAPSULE_LENGTH - prevCapsule) * 2), m_tensor); Velocity = new PhysicsVector(0f, 0f, 0f); - + } _parent_scene.geom_name_map[Shell] = m_name; _parent_scene.actor_name_map[Shell] = (PhysicsActor) this; @@ -423,7 +423,7 @@ namespace OpenSim.Region.Physics.OdePlugin int dAMotorEuler = 1; _parent_scene.waitForSpaceUnlock(_parent_scene.space); Shell = d.CreateCapsule(_parent_scene.space, CAPSULE_RADIUS, CAPSULE_LENGTH); - + d.GeomSetCategoryBits(Shell, (int)m_collisionCategories); d.GeomSetCollideBits(Shell, (int)m_collisionFlags); @@ -442,8 +442,8 @@ namespace OpenSim.Region.Physics.OdePlugin d.GeomSetBody(Shell, Body); - - // The purpose of the AMotor here is to keep the avatar's physical + + // The purpose of the AMotor here is to keep the avatar's physical // surrogate from rotating while moving Amotor = d.JointCreateAMotor(_parent_scene.world, IntPtr.Zero); d.JointAttach(Amotor, Body, IntPtr.Zero); @@ -455,7 +455,7 @@ namespace OpenSim.Region.Physics.OdePlugin d.JointSetAMotorAngle(Amotor, 0, 0); d.JointSetAMotorAngle(Amotor, 1, 0); d.JointSetAMotorAngle(Amotor, 2, 0); - + // These lowstops and high stops are effectively (no wiggle room) d.JointSetAMotorParam(Amotor, (int)dParam.LowStop, -0.000000000001f); d.JointSetAMotorParam(Amotor, (int)dParam.LoStop3, -0.000000000001f); @@ -464,23 +464,23 @@ namespace OpenSim.Region.Physics.OdePlugin d.JointSetAMotorParam(Amotor, (int)dParam.HiStop3, 0.000000000001f); d.JointSetAMotorParam(Amotor, (int)dParam.HiStop2, 0.000000000001f); - // Fudge factor is 1f by default, we're setting it to 0. We don't want it to Fudge or the + // Fudge factor is 1f by default, we're setting it to 0. We don't want it to Fudge or the // capped cyllinder will fall over d.JointSetAMotorParam(Amotor, (int)dParam.FudgeFactor, 0f); d.JointSetAMotorParam(Amotor, (int)dParam.FMax, tensor); - + //d.Matrix3 bodyrotation = d.BodyGetRotation(Body); //d.QfromR( //d.Matrix3 checkrotation = new d.Matrix3(0.7071068,0.5, -0.7071068, - // + // //m_log.Info("[PHYSICSAV]: Rotation: " + bodyrotation.M00 + " : " + bodyrotation.M01 + " : " + bodyrotation.M02 + " : " + bodyrotation.M10 + " : " + bodyrotation.M11 + " : " + bodyrotation.M12 + " : " + bodyrotation.M20 + " : " + bodyrotation.M21 + " : " + bodyrotation.M22); //standupStraight(); - - - + + + } - // + // /// /// Uses the capped cyllinder volume formula to calculate the avatar's mass. /// This may be used in calculations in the scene/scenepresence @@ -508,13 +508,13 @@ namespace OpenSim.Region.Physics.OdePlugin } -// This code is very useful. Written by DanX0r. We're just not using it right now. +// This code is very useful. Written by DanX0r. We're just not using it right now. // Commented out to prevent a warning. // // private void standupStraight() // { // // The purpose of this routine here is to quickly stabilize the Body while it's popped up in the air. -// // The amotor needs a few seconds to stabilize so without it, the avatar shoots up sky high when you +// // The amotor needs a few seconds to stabilize so without it, the avatar shoots up sky high when you // // change appearance and when you enter the simulator // // After this routine is done, the amotor stabilizes much quicker // d.Vector3 feet; @@ -558,7 +558,7 @@ namespace OpenSim.Region.Physics.OdePlugin if (_zeroFlag) return new PhysicsVector(0f, 0f, 0f); m_lastUpdateSent = false; - return _velocity; + return _velocity; } set { @@ -601,7 +601,7 @@ namespace OpenSim.Region.Physics.OdePlugin } /// - /// Adds the force supplied to the Target Velocity + /// Adds the force supplied to the Target Velocity /// The PID controller takes this target velocity and tries to make it a reality /// /// @@ -616,7 +616,7 @@ namespace OpenSim.Region.Physics.OdePlugin // _target_velocity.Y += force.Y; //_target_velocity.Z += force.Z; } - else + else { m_pidControllerActive = true; _target_velocity.X += force.X; @@ -637,7 +637,7 @@ namespace OpenSim.Region.Physics.OdePlugin d.BodyAddForce(Body, force.X, force.Y, force.Z); //d.BodySetRotation(Body, ref m_StandUpRotation); //standupStraight(); - + } } @@ -655,16 +655,16 @@ namespace OpenSim.Region.Physics.OdePlugin { // no lock; for now it's only called from within Simulate() - // If the PID Controller isn't active then we set our force + // If the PID Controller isn't active then we set our force // calculating base velocity to the current position - + if (m_pidControllerActive == false) { _zeroPosition = d.BodyGetPosition(Body); } //PidStatus = true; - + PhysicsVector vec = new PhysicsVector(); d.Vector3 vel = d.BodyGetLinearVel(Body); float movementdivisor = 1f; @@ -798,13 +798,13 @@ namespace OpenSim.Region.Physics.OdePlugin _velocity.X = 0.0f; _velocity.Y = 0.0f; _velocity.Z = 0.0f; - + // Did we send out the 'stopped' message? if (!m_lastUpdateSent) { m_lastUpdateSent = true; //base.RequestPhysicsterseUpdate(); - + } } else @@ -815,7 +815,7 @@ namespace OpenSim.Region.Physics.OdePlugin _velocity.Y = (vec.Y); _velocity.Z = (vec.Z); - + if (_velocity.Z < -6 && !m_hackSentFall) { m_hackSentFall = true; @@ -849,7 +849,7 @@ namespace OpenSim.Region.Physics.OdePlugin d.GeomDestroy(Shell); _parent_scene.geom_name_map.Remove(Shell); - + //kill the body d.BodyDestroy(Body); } diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 37a8b77..f1886e4 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -111,7 +111,7 @@ namespace OpenSim.Region.Physics.OdePlugin private IntPtr _linkJointGroup = (IntPtr)0; private PhysicsActor _parent = null; private PhysicsActor m_taintparent = null; - + private bool iscolliding = false; private bool m_isphysical = false; private bool m_isSelected = false; @@ -202,7 +202,7 @@ namespace OpenSim.Region.Physics.OdePlugin m_taintadd = true; _parent_scene.AddPhysicsActorTaint(this); // don't do .add() here; old geoms get recycled with the same hash - + } public override int PhysicsActorType @@ -232,9 +232,9 @@ namespace OpenSim.Region.Physics.OdePlugin public override bool Selected { set { - // This only makes the object not collidable if the object + // This only makes the object not collidable if the object // is physical or the object is modified somehow *IN THE FUTURE* - // without this, if an avatar selects prim, they can walk right + // without this, if an avatar selects prim, they can walk right // through it while it's selected if ((m_isphysical && !_zeroFlag) || !value) @@ -262,7 +262,7 @@ namespace OpenSim.Region.Physics.OdePlugin d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags); } //m_log.Warn("Setting Geom to: " + prim_geom); - + } public void enableBodySoft() @@ -277,7 +277,7 @@ namespace OpenSim.Region.Physics.OdePlugin public void disableBodySoft() { m_disabled = true; - + if (m_isphysical) if (Body != (IntPtr)0) d.BodyDisable(Body); @@ -307,7 +307,7 @@ namespace OpenSim.Region.Physics.OdePlugin d.BodySetAutoDisableFlag(Body, true); d.BodySetAutoDisableSteps(Body, 20); - + m_interpenetrationcount = 0; m_collisionscore = 0; m_disabled = false; @@ -327,7 +327,7 @@ namespace OpenSim.Region.Physics.OdePlugin { float volume = 0; - // No material is passed to the physics engines yet.. soo.. + // No material is passed to the physics engines yet.. soo.. // we're using the m_density constant in the class definition @@ -340,7 +340,7 @@ namespace OpenSim.Region.Physics.OdePlugin volume = _size.X*_size.Y*_size.Z; - // If the user has 'hollowed out' + // If the user has 'hollowed out' // ProfileHollow is one of those 0 to 50000 values :P // we like percentages better.. so turning into a percentage @@ -415,7 +415,7 @@ namespace OpenSim.Region.Physics.OdePlugin // We don't know what the shape is yet, so use default volume = _size.X * _size.Y * _size.Z; } - // If the user has 'hollowed out' + // If the user has 'hollowed out' // ProfileHollow is one of those 0 to 50000 values :P // we like percentages better.. so turning into a percentage @@ -427,8 +427,8 @@ namespace OpenSim.Region.Physics.OdePlugin float hollowVolume = 0; switch (_pbs.HollowShape) { - - case HollowShape.Same: + + case HollowShape.Same: case HollowShape.Circle: // Hollow shape is a perfect cyllinder in respect to the cube's scale // Cyllinder hollow volume calculation @@ -447,7 +447,7 @@ namespace OpenSim.Region.Physics.OdePlugin hollowVolume = hollowsizex * hollowsizey * hollowsizez; break; - + case HollowShape.Triangle: // Equilateral Triangular Prism volume hollow calculation @@ -465,7 +465,7 @@ namespace OpenSim.Region.Physics.OdePlugin volume = volume - hollowVolume; } break; - + case ProfileShape.HalfCircle: if (_pbs.PathCurve == (byte)Extrusion.Curve1) { @@ -490,13 +490,13 @@ namespace OpenSim.Region.Physics.OdePlugin } break; case ProfileShape.EquilateralTriangle: - /* + /* v = (abs((xB*yA-xA*yB)+(xC*yB-xB*yC)+(xA*yC-xC*yA))/2) * h - + // seed mesh Vertex MM = new Vertex(-0.25f, -0.45f, 0.0f); Vertex PM = new Vertex(+0.5f, 0f, 0.0f); - Vertex PP = new Vertex(-0.25f, +0.45f, 0.0f); + Vertex PP = new Vertex(-0.25f, +0.45f, 0.0f); */ float xA = -0.25f * _size.X; float yA = -0.45f * _size.Y; @@ -509,7 +509,7 @@ namespace OpenSim.Region.Physics.OdePlugin volume = (float)((Math.Abs((xB * yA - xA * yB) + (xC * yB - xB * yC) + (xA * yC - xC * yA)) / 2) * _size.Z); - // If the user has 'hollowed out' + // If the user has 'hollowed out' // ProfileHollow is one of those 0 to 50000 values :P // we like percentages better.. so turning into a percentage float fhollowFactor = ((float)_pbs.ProfileHollow / 1.9f); @@ -521,7 +521,7 @@ namespace OpenSim.Region.Physics.OdePlugin float hollowVolume = 0; switch (_pbs.HollowShape) { - + case HollowShape.Same: case HollowShape.Triangle: // Equilateral Triangular Prism volume hollow calculation @@ -550,7 +550,7 @@ namespace OpenSim.Region.Physics.OdePlugin hollowVolume = ((float)((Math.PI * Math.Pow(hRadius, 2) * hLength)/2) * hollowAmount); break; - + default: hollowVolume = 0; break; @@ -560,7 +560,7 @@ namespace OpenSim.Region.Physics.OdePlugin break; default: - // we don't have all of the volume formulas yet so + // we don't have all of the volume formulas yet so // use the common volume formula for all volume = _size.X*_size.Y*_size.Z; break; @@ -568,7 +568,7 @@ namespace OpenSim.Region.Physics.OdePlugin // Calculate Path cut effect on volume // Not exact, in the triangle hollow example - // They should never be zero or less then zero.. + // They should never be zero or less then zero.. // we'll ignore it if it's less then zero // ProfileEnd and ProfileBegin are values @@ -672,11 +672,11 @@ namespace OpenSim.Region.Physics.OdePlugin public void setMesh(OdeScene parent_scene, IMesh mesh) { - // This sleeper is there to moderate how long it takes between + // This sleeper is there to moderate how long it takes between // setting up the mesh and pre-processing it when we get rapid fire mesh requests on a single object - + Thread.Sleep(10); - + //Kill Body so that mesh can re-make the geom if (IsPhysical && Body != (IntPtr) 0) { @@ -694,9 +694,9 @@ namespace OpenSim.Region.Physics.OdePlugin 3*sizeof (int)); d.GeomTriMeshDataPreprocess(_triMeshData); - + _parent_scene.waitForSpaceUnlock(m_targetSpace); - + try { if (prim_geom == (IntPtr)0) @@ -706,7 +706,7 @@ namespace OpenSim.Region.Physics.OdePlugin } catch (AccessViolationException) { - + m_log.Error("[PHYSICS]: MESH LOCKED"); return; } @@ -715,7 +715,7 @@ namespace OpenSim.Region.Physics.OdePlugin // Recreate the body m_interpenetrationcount = 0; m_collisionscore = 0; - + enableBody(); } @@ -724,7 +724,7 @@ namespace OpenSim.Region.Physics.OdePlugin public void ProcessTaints(float timestep) { - + if (m_taintadd) { changeadd(timestep); @@ -779,7 +779,7 @@ namespace OpenSim.Region.Physics.OdePlugin } private void changeAngularLock(float timestep) - { + { // do we have a Physical object? if (Body != IntPtr.Zero) { @@ -809,7 +809,7 @@ namespace OpenSim.Region.Physics.OdePlugin private void changelink(float timestep) { - + if (_parent == null && m_taintparent != null) { if (m_taintparent.PhysicsActorType == (int)ActorTypes.Prim) @@ -834,14 +834,14 @@ namespace OpenSim.Region.Physics.OdePlugin m_linkJoint = (IntPtr)0; } - + _parent = m_taintparent; } private void changeSelectedStatus(float timestep) { - + if (m_taintselected) { @@ -849,9 +849,9 @@ namespace OpenSim.Region.Physics.OdePlugin m_collisionCategories = CollisionCategories.Selected; m_collisionFlags = (CollisionCategories.Sensor | CollisionCategories.Space); - // We do the body disable soft twice because 'in theory' a collision could have happened + // We do the body disable soft twice because 'in theory' a collision could have happened // in between the disabling and the collision properties setting - // which would wake the physical body up from a soft disabling and potentially cause it to fall + // which would wake the physical body up from a soft disabling and potentially cause it to fall // through the ground. if (m_isphysical) @@ -873,9 +873,9 @@ namespace OpenSim.Region.Physics.OdePlugin } else { - + m_collisionCategories = CollisionCategories.Geom; - + if (m_isphysical) m_collisionCategories |= CollisionCategories.Body; @@ -898,10 +898,10 @@ namespace OpenSim.Region.Physics.OdePlugin enableBodySoft(); } - + } - + resetCollisionAccounting(); m_isSelected = m_taintselected; } @@ -918,21 +918,21 @@ namespace OpenSim.Region.Physics.OdePlugin m_taintselected = m_isSelected; m_taintsize = _size; - + m_taintshape = false; m_taintforce = false; - + m_taintdisable = false; m_taintVelocity = PhysicsVector.Zero; } public void changeadd(float timestep) { - - - + + + int[] iprimspaceArrItem = _parent_scene.calculateSpaceArrayItemFromPos(_position); IntPtr targetspace = _parent_scene.calculateSpaceForGeom(_position); @@ -941,7 +941,7 @@ namespace OpenSim.Region.Physics.OdePlugin m_targetSpace = targetspace; - + if (_mesh != null) { @@ -1010,7 +1010,7 @@ namespace OpenSim.Region.Physics.OdePlugin { m_log.Warn("[PHYSICS]: Unable to create physics proxy for object"); ode.dunlock(_parent_scene.world); - return; + return; } } } @@ -1060,7 +1060,7 @@ namespace OpenSim.Region.Physics.OdePlugin } - + _parent_scene.geom_name_map[prim_geom] = this.m_primName; _parent_scene.actor_name_map[prim_geom] = (PhysicsActor)this; @@ -1072,7 +1072,7 @@ namespace OpenSim.Region.Physics.OdePlugin } public void changemove(float timestep) { - + if (m_isphysical) @@ -1080,7 +1080,7 @@ namespace OpenSim.Region.Physics.OdePlugin // This is a fallback.. May no longer be necessary. if (Body == (IntPtr) 0) enableBody(); - //Prim auto disable after 20 frames, + //Prim auto disable after 20 frames, //if you move it, re-enable the prim manually. if (_parent != null) { @@ -1102,7 +1102,7 @@ namespace OpenSim.Region.Physics.OdePlugin } } d.BodyEnable(Body); - + } else { @@ -1122,10 +1122,10 @@ namespace OpenSim.Region.Physics.OdePlugin d.SpaceAdd(m_targetSpace, prim_geom); } } - + changeSelectedStatus(timestep); - + resetCollisionAccounting(); m_taintposition = _position; } @@ -1140,42 +1140,42 @@ namespace OpenSim.Region.Physics.OdePlugin { float PID_D = 2200.0f; //float PID_P = 900.0f; - - + + float m_mass = CalculateMass(); - + fz = 0f; //m_log.Info(m_collisionFlags.ToString()); - + if (m_buoyancy != 0) { - + if (m_buoyancy > 0) { fz = (((-1 * _parent_scene.gravityz) * m_buoyancy) * m_mass); - + //d.Vector3 l_velocity = d.BodyGetLinearVel(Body); //m_log.Info("Using Buoyancy: " + buoyancy + " G: " + (_parent_scene.gravityz * m_buoyancy) + "mass:" + m_mass + " Pos: " + Position.ToString()); } - else + else { fz = (-1 * (((-1 * _parent_scene.gravityz) * (-1 * m_buoyancy)) * m_mass)); } - + } if (m_usePID) { - // If we're using the PID controller, then we have no gravity + // If we're using the PID controller, then we have no gravity fz = (-1 * _parent_scene.gravityz) * this.Mass; // no lock; for now it's only called from within Simulate() - // If the PID Controller isn't active then we set our force + // If the PID Controller isn't active then we set our force // calculating base velocity to the current position if (Environment.OSVersion.Platform == PlatformID.Unix) { @@ -1189,7 +1189,7 @@ namespace OpenSim.Region.Physics.OdePlugin } PID_D = 35f; - + //PID_P = 1.0f; float PID_G = 25; @@ -1197,7 +1197,7 @@ namespace OpenSim.Region.Physics.OdePlugin { PID_G = PID_G / m_PIDTau; } - + if ((PID_G - m_PIDTau) <= 0) { @@ -1205,15 +1205,15 @@ namespace OpenSim.Region.Physics.OdePlugin } //PidStatus = true; - + PhysicsVector vec = new PhysicsVector(); d.Vector3 vel = d.BodyGetLinearVel(Body); - + d.Vector3 pos = d.BodyGetPosition(Body); - _target_velocity = + _target_velocity = new PhysicsVector( (m_PIDTarget.X - pos.X) * ((PID_G - m_PIDTau) * timestep), (m_PIDTarget.Y - pos.Y) * ((PID_G - m_PIDTau) * timestep), @@ -1222,18 +1222,18 @@ namespace OpenSim.Region.Physics.OdePlugin // if velocity is zero, use position control; otherwise, velocity control - + if (_target_velocity.IsIdentical(PhysicsVector.Zero,0.1f)) { // keep track of where we stopped. No more slippin' & slidin' - - + + // We only want to deactivate the PID Controller if we think we want to have our surrogate // react to the physics scene by moving it's position. // Avatar to Avatar collisions // Prim to avatar collisions - + //fx = (_target_velocity.X - vel.X) * (PID_D) + (_zeroPosition.X - pos.X) * (PID_P * 2); //fy = (_target_velocity.Y - vel.Y) * (PID_D) + (_zeroPosition.Y - pos.Y) * (PID_P * 2); //fz = fz + (_target_velocity.Z - vel.Z) * (PID_D) + (_zeroPosition.Z - pos.Z) * PID_P; @@ -1245,27 +1245,27 @@ namespace OpenSim.Region.Physics.OdePlugin } else { - + _zeroFlag = false; - + // We're flying and colliding with something fx = ((_target_velocity.X) - vel.X) * (PID_D); fy = ((_target_velocity.Y) - vel.Y) * (PID_D); - - - + + + // vec.Z = (_target_velocity.Z - vel.Z) * PID_D + (_zeroPosition.Z - pos.Z) * PID_P; fz = fz + ((_target_velocity.Z - vel.Z) * (PID_D) * m_mass); } - } + } fx *= m_mass; fy *= m_mass; //fz *= m_mass; - + //m_log.Info("[OBJPID]: X:" + fx.ToString() + " Y:" + fy.ToString() + " Z:" + fz.ToString()); if (fx != 0 || fy != 0 || fz != 0) { @@ -1285,7 +1285,7 @@ namespace OpenSim.Region.Physics.OdePlugin public void rotate(float timestep) { - + d.Quaternion myrot = new d.Quaternion(); myrot.W = _orientation.w; @@ -1299,7 +1299,7 @@ namespace OpenSim.Region.Physics.OdePlugin if (!m_angularlock.IsIdentical(new PhysicsVector(1, 1, 1), 0)) createAMotor(m_angularlock); } - + resetCollisionAccounting(); m_taintrot = _orientation; } @@ -1313,21 +1313,21 @@ namespace OpenSim.Region.Physics.OdePlugin public void changedisable(float timestep) { - + m_disabled = true; if (Body != (IntPtr)0) { d.BodyDisable(Body); Body = (IntPtr)0; } - + m_taintdisable = false; } public void changePhysicsStatus(float timestep) { - + if (m_isphysical == true) { @@ -1352,7 +1352,7 @@ namespace OpenSim.Region.Physics.OdePlugin public void changesize(float timestamp) { - + //if (!_parent_scene.geom_name_map.ContainsKey(prim_geom)) //{ // m_taintsize = _size; @@ -1369,7 +1369,7 @@ namespace OpenSim.Region.Physics.OdePlugin { // Cleanup meshing here } - //kill body to rebuild + //kill body to rebuild if (IsPhysical && Body != (IntPtr) 0) { disableBody(); @@ -1531,7 +1531,7 @@ namespace OpenSim.Region.Physics.OdePlugin { m_collisionFlags |= CollisionCategories.Water; } - else + else { m_collisionFlags &= ~CollisionCategories.Water; } @@ -1541,7 +1541,7 @@ namespace OpenSim.Region.Physics.OdePlugin public void changeshape(float timestamp) { - + string oldname = _parent_scene.geom_name_map[prim_geom]; // Cleanup of old prim geometry and Bodies @@ -1579,7 +1579,7 @@ namespace OpenSim.Region.Physics.OdePlugin // Re creates body on size. // EnableBody also does setMass() enableBody(); - + } } else @@ -1684,7 +1684,7 @@ namespace OpenSim.Region.Physics.OdePlugin d.BodyEnable(Body); } } - + _parent_scene.geom_name_map[prim_geom] = oldname; @@ -1698,7 +1698,7 @@ namespace OpenSim.Region.Physics.OdePlugin { if (!m_isSelected) { - + lock (m_forcelist) @@ -1728,7 +1728,7 @@ namespace OpenSim.Region.Physics.OdePlugin { if (!m_isSelected) { - + Thread.Sleep(20); if (IsPhysical) @@ -1737,8 +1737,8 @@ namespace OpenSim.Region.Physics.OdePlugin { d.BodySetLinearVel(Body, m_taintVelocity.X, m_taintVelocity.Y, m_taintVelocity.Z); } - } - + } + //resetCollisionAccounting(); } m_taintVelocity = PhysicsVector.Zero; @@ -1794,7 +1794,7 @@ namespace OpenSim.Region.Physics.OdePlugin { get { return _position; } - set { _position = value; + set { _position = value; //m_log.Info("[PHYSICS]: " + _position.ToString()); } } @@ -1838,7 +1838,7 @@ namespace OpenSim.Region.Physics.OdePlugin { get { - // Averate previous velocity with the new one so + // Averate previous velocity with the new one so // client object interpolation works a 'little' better PhysicsVector returnVelocity = new PhysicsVector(); returnVelocity.X = (m_lastVelocity.X + _velocity.X)/2; @@ -1849,7 +1849,7 @@ namespace OpenSim.Region.Physics.OdePlugin set { _velocity = value; - + m_taintVelocity = value; _parent_scene.AddPhysicsActorTaint(this); } @@ -1898,11 +1898,11 @@ namespace OpenSim.Region.Physics.OdePlugin if (_zeroFlag) return pv; m_lastUpdateSent = false; - + if (m_rotationalVelocity.IsIdentical(pv, 0.2f)) return pv; - return m_rotationalVelocity; + return m_rotationalVelocity; } set { m_rotationalVelocity = value; } } @@ -1948,7 +1948,7 @@ namespace OpenSim.Region.Physics.OdePlugin } public void UpdatePositionAndVelocity() - { + { // no lock; called from Simulate() -- if you call this from elsewhere, gotta lock or do Monitor.Enter/Exit! if (_parent != null) { @@ -1963,7 +1963,7 @@ namespace OpenSim.Region.Physics.OdePlugin d.Quaternion ori = d.BodyGetQuaternion(Body); d.Vector3 vel = d.BodyGetLinearVel(Body); d.Vector3 rotvel = d.BodyGetAngularVel(Body); - + PhysicsVector l_position = new PhysicsVector(); // kluge to keep things in bounds. ODE lets dead avatars drift away (they should be removed!) @@ -2000,16 +2000,16 @@ namespace OpenSim.Region.Physics.OdePlugin if (l_position.Z < 0) { - // This is so prim that get lost underground don't fall forever and suck up - // + // This is so prim that get lost underground don't fall forever and suck up + // // Sim resources and memory. - // Disables the prim's movement physics.... + // Disables the prim's movement physics.... // It's a hack and will generate a console message if it fails. //IsPhysical = false; if (_parent == null) base.RaiseOutOfBounds(_position); - + _acceleration.X = 0; _acceleration.Y = 0; _acceleration.Z = 0; @@ -2020,10 +2020,10 @@ namespace OpenSim.Region.Physics.OdePlugin m_rotationalVelocity.X = 0; m_rotationalVelocity.Y = 0; m_rotationalVelocity.Z = 0; - + if (_parent == null) base.RequestPhysicsterseUpdate(); - + m_throttleUpdates = false; throttleCounter = 0; _zeroFlag = true; @@ -2065,10 +2065,10 @@ namespace OpenSim.Region.Physics.OdePlugin m_throttleUpdates = false; throttleCounter = 0; m_rotationalVelocity = pv; - + if (_parent == null) base.RequestPhysicsterseUpdate(); - + m_lastUpdateSent = true; } } @@ -2087,11 +2087,11 @@ namespace OpenSim.Region.Physics.OdePlugin _velocity.X = vel.X; _velocity.Y = vel.Y; _velocity.Z = vel.Z; - + _acceleration = ((_velocity - m_lastVelocity) / 0.1f); _acceleration = new PhysicsVector(_velocity.X - m_lastVelocity.X / 0.1f, _velocity.Y - m_lastVelocity.Y / 0.1f, _velocity.Z - m_lastVelocity.Z / 0.1f); //m_log.Info("[PHYSICS]: V1: " + _velocity + " V2: " + m_lastVelocity + " Acceleration: " + _acceleration.ToString()); - + if (_velocity.IsIdentical(pv, 0.5f)) { m_rotationalVelocity = pv; @@ -2173,7 +2173,7 @@ namespace OpenSim.Region.Physics.OdePlugin { m_tensor = 5f; } - + float axisnum = 3; axisnum = (axisnum - (axis.X + axis.Y + axis.Z)); @@ -2222,7 +2222,7 @@ namespace OpenSim.Region.Physics.OdePlugin d.JointSetAMotorParam(Amotor, (int)dParam.HiStop, 0.000000000001f); d.JointSetAMotorParam(Amotor, (int)dParam.HiStop3, 0.000000000001f); d.JointSetAMotorParam(Amotor, (int)dParam.HiStop2, 0.000000000001f); - + d.JointSetAMotorParam(Amotor, (int)dParam.FudgeFactor, 0f); d.JointSetAMotorParam(Amotor, (int)dParam.FMax, m_tensor); } diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index d795e45..c663fb0 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -42,7 +42,7 @@ using OpenSim.Region.Physics.Manager; namespace OpenSim.Region.Physics.OdePlugin { /// - /// ODE plugin + /// ODE plugin /// public class OdePlugin : IPhysicsPlugin { @@ -51,7 +51,6 @@ namespace OpenSim.Region.Physics.OdePlugin private CollisionLocker ode; private OdeScene _mScene; - public OdePlugin() { ode = new CollisionLocker(); @@ -81,15 +80,13 @@ namespace OpenSim.Region.Physics.OdePlugin } } - - public enum StatusIndicators : int + public enum StatusIndicators : int { Generic = 0, Start = 1, End = 2 } - public struct sCollisionData { public uint ColliderLocalId; @@ -165,7 +162,6 @@ namespace OpenSim.Region.Physics.OdePlugin private float mAvatarObjectContactFriction = 75f; private float mAvatarObjectContactBounce = 0.1f; - private float avPIDD = 3200f; private float avPIDP = 1400f; private float avCapRadius = 0.37f; @@ -175,13 +171,12 @@ namespace OpenSim.Region.Physics.OdePlugin private float avMovementDivisorWalk = 1.3f; private float avMovementDivisorRun = 0.8f; - private float[] _heightmap; private float[] _watermap; private float[] _origheightmap; - + private d.NearCallback nearCallback; public d.TriCallback triCallback; public d.TriArrayCallback triArrayCallback; @@ -200,7 +195,6 @@ namespace OpenSim.Region.Physics.OdePlugin private d.Contact AvatarMovementTerrainContact; private d.Contact WaterContact; - //Ckrinke: Comment out until used. We declare it, initialize it, but do not use it //Ckrinke private int m_randomizeWater = 200; private int m_physicsiterations = 10; @@ -233,7 +227,6 @@ namespace OpenSim.Region.Physics.OdePlugin private IConfigSource m_config; - /// /// Initiailizes the scene /// Sets many properties that ODE requires to be stable @@ -245,44 +238,34 @@ namespace OpenSim.Region.Physics.OdePlugin nearCallback = near; triCallback = TriCallback; triArrayCallback = TriArrayCallback; - - - lock (OdeLock) { - - // Creat the world and the first space + // Create the world and the first space world = d.WorldCreate(); space = d.HashSpaceCreate(IntPtr.Zero); - + contactgroup = d.JointGroupCreate(0); //contactgroup - - - d.WorldSetAutoDisableFlag(world, false); - } // zero out a heightmap array float array (single dimention [flattened])) _heightmap = new float[514*514]; _watermap = new float[258 * 258]; - // Zero out the prim spaces array (we split our space into smaller spaces so + // Zero out the prim spaces array (we split our space into smaller spaces so // we can hit test less. - } - // Initialize the mesh plugin public override void Initialise(IMesher meshmerizer, IConfigSource config) { mesher = meshmerizer; m_config = config; // Defaults - + if (Environment.OSVersion.Platform == PlatformID.Unix) { avPIDD = 3200.0f; @@ -349,10 +332,7 @@ namespace OpenSim.Region.Physics.OdePlugin avPIDP = physicsconfig.GetFloat("av_pid_proportional_win", 900.0f); avStandupTensor = physicsconfig.GetFloat("av_capsule_standup_tensor_win", 550000f); } - - } - } staticPrimspace = new IntPtr[(int)(300 / metersInSpace), (int)(300 / metersInSpace)]; @@ -361,8 +341,8 @@ namespace OpenSim.Region.Physics.OdePlugin contact.surface.mu = nmAvatarObjectContactFriction; contact.surface.bounce = nmAvatarObjectContactBounce; - // Terrain contact friction and Bounce - // This is the *non* moving version. Use this when an avatar + // Terrain contact friction and Bounce + // This is the *non* moving version. Use this when an avatar // isn't moving to keep it in place better TerrainContact.surface.mode |= d.ContactFlags.SoftERP; TerrainContact.surface.mu = nmTerrainContactFriction; @@ -376,7 +356,7 @@ namespace OpenSim.Region.Physics.OdePlugin WaterContact.surface.soft_erp = 0.010f; // Prim contact friction and bounce - // THis is the *non* moving version of friction and bounce + // THis is the *non* moving version of friction and bounce // Use this when an avatar comes in contact with a prim // and is moving AvatarMovementprimContact.surface.mu = mAvatarObjectContactFriction; @@ -409,7 +389,6 @@ namespace OpenSim.Region.Physics.OdePlugin staticPrimspace[i, j] = IntPtr.Zero; } } - } internal void waitForSpaceUnlock(IntPtr space) @@ -439,17 +418,17 @@ namespace OpenSim.Region.Physics.OdePlugin private void near(IntPtr space, IntPtr g1, IntPtr g2) { // no lock here! It's invoked from within Simulate(), which is thread-locked - - // Test if we're collidng a geom with a space. + + // Test if we're colliding a geom with a space. // If so we have to drill down into the space recursively if (d.GeomIsSpace(g1) || d.GeomIsSpace(g2)) { if (g1 == (IntPtr)0 || g2 == (IntPtr)0) return; - // Separating static prim geometry spaces. - // We'll be calling near recursivly if one - // of them is a space to find all of the + // Separating static prim geometry spaces. + // We'll be calling near recursivly if one + // of them is a space to find all of the // contact points in the space try { @@ -462,13 +441,12 @@ namespace OpenSim.Region.Physics.OdePlugin } //Colliding a space or a geom with a space or a geom. so drill down - //Collide all geoms in each space.. + //Collide all geoms in each space.. //if (d.GeomIsSpace(g1)) d.SpaceCollide(g1, IntPtr.Zero, nearCallback); //if (d.GeomIsSpace(g2)) d.SpaceCollide(g2, IntPtr.Zero, nearCallback); return; } - if (g1 == (IntPtr)0 || g2 == (IntPtr)0) return; @@ -499,23 +477,17 @@ namespace OpenSim.Region.Physics.OdePlugin int count = 0; try { - // Colliding Geom To Geom // This portion of the function 'was' blatantly ripped off from BoxStack.cs - - - if (g1 == g2) return; // Can't collide with yourself if (b1 != IntPtr.Zero && b2 != IntPtr.Zero && d.AreConnectedExcluding(b1, b2, d.JointType.Contact)) return; - + lock (contacts) { - - count = d.Collide(g1, g2, contacts.GetLength(0), contacts, d.ContactGeom.SizeOf); } } @@ -527,7 +499,7 @@ namespace OpenSim.Region.Physics.OdePlugin } catch (AccessViolationException) { - + m_log.Warn("[PHYSICS]: Unable to collide test an object"); return; } @@ -539,6 +511,7 @@ namespace OpenSim.Region.Physics.OdePlugin { p1 = PANull; } + if (!actor_name_map.TryGetValue(g2, out p2)) { p2 = PANull; @@ -554,14 +527,10 @@ namespace OpenSim.Region.Physics.OdePlugin // If we're colliding with terrain, use 'TerrainContact' instead of contact. // allows us to have different settings - - // We only need to test p2 for 'jump crouch purposes' p2.IsColliding = true; //if ((framecount % m_returncollisions) == 0) - - switch (p1.PhysicsActorType) { @@ -588,41 +557,39 @@ namespace OpenSim.Region.Physics.OdePlugin { //This is disabled at the moment only because it needs more tweaking //It will eventually be uncommented - + if (contacts[i].depth >= 1.00f) { //m_log.Debug("[PHYSICS]: " + contacts[i].depth.ToString()); } - + //If you interpenetrate a prim with an agent if ((p2.PhysicsActorType == (int) ActorTypes.Agent && p1.PhysicsActorType == (int) ActorTypes.Prim) || (p1.PhysicsActorType == (int) ActorTypes.Agent && p2.PhysicsActorType == (int) ActorTypes.Prim)) { - - # region disabled code1 //contacts[i].depth = contacts[i].depth * 4.15f; /* if (p2.PhysicsActorType == (int) ActorTypes.Agent) - { + { p2.CollidingObj = true; contacts[i].depth = 0.003f; p2.Velocity = p2.Velocity + new PhysicsVector(0, 0, 2.5f); OdeCharacter character = (OdeCharacter) p2; character.SetPidStatus(true); contacts[i].pos = new d.Vector3(contacts[i].pos.X + (p1.Size.X / 2), contacts[i].pos.Y + (p1.Size.Y / 2), contacts[i].pos.Z + (p1.Size.Z / 2)); - + } else { - + //contacts[i].depth = 0.0000000f; } if (p1.PhysicsActorType == (int) ActorTypes.Agent) { - + p1.CollidingObj = true; contacts[i].depth = 0.003f; p1.Velocity = p1.Velocity + new PhysicsVector(0, 0, 2.5f); @@ -632,14 +599,12 @@ namespace OpenSim.Region.Physics.OdePlugin } else { - + //contacts[i].depth = 0.0000000f; } */ #endregion - } - // If you interpenetrate a prim with another prim if (p1.PhysicsActorType == (int) ActorTypes.Prim && p2.PhysicsActorType == (int) ActorTypes.Prim) @@ -649,7 +614,6 @@ namespace OpenSim.Region.Physics.OdePlugin //OdePrim op2 = (OdePrim)p2; //op1.m_collisionscore++; //op2.m_collisionscore++; - //if (op1.m_collisionscore > 8000 || op2.m_collisionscore > 8000) //{ @@ -658,11 +622,10 @@ namespace OpenSim.Region.Physics.OdePlugin //op2.m_taintdisable = true; //AddPhysicsActorTaint(p2); //} - + //if (contacts[i].depth >= 0.25f) //{ // Don't collide, one or both prim will expld. - //op1.m_interpenetrationcount++; //op2.m_interpenetrationcount++; @@ -678,17 +641,17 @@ namespace OpenSim.Region.Physics.OdePlugin //AddPhysicsActorTaint(p2); //} - //contacts[i].depth = contacts[i].depth / 8f; //contacts[i].normal = new d.Vector3(0, 0, 1); //} //if (op1.m_disabled || op2.m_disabled) //{ - //Manually disabled objects stay disabled + //Manually disabled objects stay disabled //contacts[i].depth = 0f; //} #endregion } + if (contacts[i].depth >= 1.00f) { //m_log.Info("[P]: " + contacts[i].depth.ToString()); @@ -713,6 +676,7 @@ namespace OpenSim.Region.Physics.OdePlugin else { } + if (p1.PhysicsActorType == (int) ActorTypes.Agent) { OdeCharacter character = (OdeCharacter)p1; @@ -738,7 +702,7 @@ namespace OpenSim.Region.Physics.OdePlugin if (contacts[i].depth >= 0f) { - // If we're collidng against terrain + // If we're colliding against terrain if (name1 == "Terrain" || name2 == "Terrain") { // If we're moving @@ -760,12 +724,11 @@ namespace OpenSim.Region.Physics.OdePlugin { if ((p2.PhysicsActorType == (int)ActorTypes.Prim)) { - } else { - } + //WaterContact.surface.soft_cfm = 0.0000f; //WaterContact.surface.soft_erp = 0.00000f; if (contacts[i].depth > 0.1f) @@ -775,7 +738,7 @@ namespace OpenSim.Region.Physics.OdePlugin //contacts[i].pos = new d.Vector3(0, 0, contacts[i].pos.Z - 5f); } WaterContact.geom = contacts[i]; - + joint = d.JointCreateContact(world, contactgroup, ref WaterContact); //m_log.Info("[PHYSICS]: Prim Water Contact" + contacts[i].depth); @@ -806,7 +769,7 @@ namespace OpenSim.Region.Physics.OdePlugin { // If there are more then 3 contact points, it's likely // that we've got a pile of objects - // + // // We don't want to send out hundreds of terse updates over and over again // so lets throttle them and send them again after it's somewhat sorted out. p2.ThrottleUpdates = true; @@ -814,7 +777,6 @@ namespace OpenSim.Region.Physics.OdePlugin //System.Console.WriteLine(count.ToString()); //System.Console.WriteLine("near: A collision was detected between {1} and {2}", 0, name1, name2); } - } private void collision_accounting_events(PhysicsActor p1, PhysicsActor p2, float collisiondepth) @@ -831,7 +793,7 @@ namespace OpenSim.Region.Physics.OdePlugin { case ActorTypes.Agent: cc2 = (OdeCharacter)p2; - + obj1LocalID = cc2.m_localID; switch ((ActorTypes)p1.PhysicsActorType) { @@ -840,7 +802,7 @@ namespace OpenSim.Region.Physics.OdePlugin obj2LocalID = cc1.m_localID; cc1.AddCollisionEvent(cc2.m_localID, collisiondepth); //ctype = (int)CollisionCategories.Character; - + //if (cc1.CollidingObj) //cStartStop = (int)StatusIndicators.Generic; //else @@ -858,7 +820,7 @@ namespace OpenSim.Region.Physics.OdePlugin //cStartStop = (int)StatusIndicators.Generic; //else //cStartStop = (int)StatusIndicators.Start; - + //returncollisions = true; break; @@ -869,14 +831,12 @@ namespace OpenSim.Region.Physics.OdePlugin //returncollisions = true; break; } - - cc2.AddCollisionEvent(obj2LocalID, collisiondepth); break; case ActorTypes.Prim: cp2 = (OdePrim)p2; - + obj1LocalID = cp2.m_localID; switch ((ActorTypes)p1.PhysicsActorType) { @@ -891,7 +851,7 @@ namespace OpenSim.Region.Physics.OdePlugin //else //cStartStop = (int)StatusIndicators.Start; //returncollisions = true; - + break; case ActorTypes.Prim: cp1 = (OdePrim)p1; @@ -903,7 +863,7 @@ namespace OpenSim.Region.Physics.OdePlugin //cStartStop = (int)StatusIndicators.Generic; //else //cStartStop = (int)StatusIndicators.Start; - + //returncollisions = true; break; @@ -911,11 +871,11 @@ namespace OpenSim.Region.Physics.OdePlugin case ActorTypes.Unknown: obj2LocalID = 0; //ctype = (int)CollisionCategories.Land; - + //returncollisions = true; break; } - + cp2.AddCollisionEvent(obj2LocalID, collisiondepth); break; } @@ -999,7 +959,7 @@ namespace OpenSim.Region.Physics.OdePlugin /// private void collision_optimized(float timeStep) { - + foreach (OdeCharacter chr in _characters) { // Reset the collision values to false @@ -1008,7 +968,7 @@ namespace OpenSim.Region.Physics.OdePlugin chr.IsColliding = false; chr.CollidingGround = false; chr.CollidingObj = false; - + // test the avatar's geometry for collision with the space // This will return near and the space that they are the closest to // And we'll run this again against the avatar and the space segment @@ -1029,15 +989,11 @@ namespace OpenSim.Region.Physics.OdePlugin //forcedZ = true; //} } - - lock (_activeprims) { - foreach (OdePrim chr in _activeprims) { - if (d.BodyIsEnabled(chr.Body) && (!chr.m_disabled)) { try @@ -1049,18 +1005,14 @@ namespace OpenSim.Region.Physics.OdePlugin else m_log.Debug("[PHYSICS]: unable to collide test active prim against space. The space was zero, the geom was zero or it was in the process of being removed"); } - } catch (AccessViolationException) { m_log.Warn("[PHYSICS]: Unable to space collide"); } - } - } } - } #endregion @@ -1077,7 +1029,6 @@ namespace OpenSim.Region.Physics.OdePlugin { if (!_collisionEventPrim.Contains(obj)) _collisionEventPrim.Add(obj); - } } @@ -1090,7 +1041,6 @@ namespace OpenSim.Region.Physics.OdePlugin } } - #region Add/Remove Entities public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size) @@ -1131,8 +1081,6 @@ namespace OpenSim.Region.Physics.OdePlugin rot.y = rotation.y; rot.z = rotation.z; - - OdePrim newPrim; lock (OdeLock) { @@ -1141,7 +1089,6 @@ namespace OpenSim.Region.Physics.OdePlugin _prims.Add(newPrim); } - return newPrim; } @@ -1178,11 +1125,9 @@ namespace OpenSim.Region.Physics.OdePlugin result = AddPrim(primName, position, size, rotation, mesh, pbs, isPhysical); - return result; } - public void remActivePrim(OdePrim deactivatePrim) { lock (_activeprims) @@ -1210,8 +1155,8 @@ namespace OpenSim.Region.Physics.OdePlugin /// This is called from within simulate but outside the locked portion /// We need to do our own locking here /// Essentially, we need to remove the prim from our space segment, whatever segment it's in. - /// - /// If there are no more prim in the segment, we need to empty (spacedestroy)the segment and reclaim memory + /// + /// If there are no more prim in the segment, we need to empty (spacedestroy)the segment and reclaim memory /// that the space was using. /// /// @@ -1226,7 +1171,6 @@ namespace OpenSim.Region.Physics.OdePlugin { prim.ResetTaints(); - if (prim.IsPhysical) { prim.disableBody(); @@ -1267,7 +1211,6 @@ namespace OpenSim.Region.Physics.OdePlugin { m_log.Warn("[PHYSICS]: Unable to remove prim from physics scene"); } - } catch (AccessViolationException) { @@ -1297,8 +1240,6 @@ namespace OpenSim.Region.Physics.OdePlugin //} //} } - - } } } @@ -1337,12 +1278,11 @@ namespace OpenSim.Region.Physics.OdePlugin /// a pointer to the new space it's in public IntPtr recalculateSpaceForGeom(IntPtr geom, PhysicsVector pos, IntPtr currentspace) { - - // Called from setting the Position and Size of an ODEPrim so + // Called from setting the Position and Size of an ODEPrim so // it's already in locked space. // we don't want to remove the main space - // we don't need to test physical here because this function should + // we don't need to test physical here because this function should // never be called if the prim is physical(active) // All physical prim end up in the root space @@ -1399,7 +1339,7 @@ namespace OpenSim.Region.Physics.OdePlugin waitForSpaceUnlock(space); d.SpaceRemove(space, currentspace); // free up memory used by the space. - + //d.SpaceDestroy(currentspace); resetSpaceArrayItemToZero(currentspace); } @@ -1418,7 +1358,6 @@ namespace OpenSim.Region.Physics.OdePlugin { if (d.SpaceQuery(currentspace, geom)) { - if (d.GeomIsSpace(currentspace)) { waitForSpaceUnlock(currentspace); @@ -1453,8 +1392,8 @@ namespace OpenSim.Region.Physics.OdePlugin } } - // The routines in the Position and Size sections do the 'inserting' into the space, - // so all we have to do is make sure that the space that we're putting the prim into + // The routines in the Position and Size sections do the 'inserting' into the space, + // so all we have to do is make sure that the space that we're putting the prim into // is in the 'main' space. int[] iprimspaceArrItem = calculateSpaceArrayItemFromPos(pos); IntPtr newspace = calculateSpaceForGeom(pos); @@ -1492,11 +1431,11 @@ namespace OpenSim.Region.Physics.OdePlugin public IntPtr calculateSpaceForGeom(PhysicsVector pos) { IntPtr locationbasedspace =IntPtr.Zero; - + int[] xyspace = calculateSpaceArrayItemFromPos(pos); //m_log.Info("[Physics]: Attempting to use arrayItem: " + xyspace[0].ToString() + "," + xyspace[1].ToString()); locationbasedspace = staticPrimspace[xyspace[0], xyspace[1]]; - + //locationbasedspace = space; return locationbasedspace; } @@ -1523,13 +1462,10 @@ namespace OpenSim.Region.Physics.OdePlugin if (returnint[1] < 0) returnint[1] = 0; - return returnint; } - #endregion - - + #endregion /// /// Routine to figure out if we need to mesh this prim with our mesher @@ -1564,7 +1500,6 @@ namespace OpenSim.Region.Physics.OdePlugin return false; } - /// /// Called after our prim properties are set Scale, position etc. /// We use this event queue like method to keep changes to the physical scene occuring in the threadlocked mutex @@ -1586,7 +1521,7 @@ namespace OpenSim.Region.Physics.OdePlugin /// /// This is our main simulate loop - /// It's thread locked by a Mutex in the scene. + /// It's thread locked by a Mutex in the scene. /// It holds Collisions, it instructs ODE to step through the physical reactions /// It moves the objects around in memory /// It calls the methods that report back to the object owners.. (scenepresence, SceneObjectGroup) @@ -1597,7 +1532,7 @@ namespace OpenSim.Region.Physics.OdePlugin { if (framecount >= int.MaxValue) framecount = 0; - + framecount++; float fps = 0; @@ -1605,12 +1540,11 @@ namespace OpenSim.Region.Physics.OdePlugin step_time += timeStep; - // If We're loaded down by something else, + // If We're loaded down by something else, // or debugging with the Visual Studio project on pause // skip a few frames to catch up gracefully. // without shooting the physicsactors all over the place - if (step_time >= m_SkipFramesAtms) { // Instead of trying to catch up, it'll do 5 physics frames only @@ -1623,7 +1557,7 @@ namespace OpenSim.Region.Physics.OdePlugin } lock (OdeLock) { - // Process 10 frames if the sim is running normal.. + // Process 10 frames if the sim is running normal.. // process 5 frames if the sim is running slow //try //{ @@ -1642,13 +1576,13 @@ namespace OpenSim.Region.Physics.OdePlugin //(step_time == 0.004f, there's 250 of those per second. Times the step time/step size step_time = 0.09375f; fps = (step_time/ODE_STEPSIZE) * 1000; - + while (step_time > 0.0f) { //lock (ode) //{ //if (!ode.lockquery()) - //{ + //{ // ode.dlock(world); try { @@ -1661,9 +1595,8 @@ namespace OpenSim.Region.Physics.OdePlugin } } - bool processedtaints = false; - + lock (_taintedPrim) { foreach (OdePrim prim in _taintedPrim) @@ -1679,10 +1612,9 @@ namespace OpenSim.Region.Physics.OdePlugin processedtaints = true; prim.m_collisionscore = 0; } - + if (processedtaints) _taintedPrim = new List(); - } lock (_activeprims) @@ -1696,7 +1628,6 @@ namespace OpenSim.Region.Physics.OdePlugin //if ((framecount % m_randomizeWater) == 0) // randomizeWater(waterlevel); - collision_optimized(timeStep); @@ -1718,7 +1649,6 @@ namespace OpenSim.Region.Physics.OdePlugin pobj.SendCollisions(); break; } - } } @@ -1726,13 +1656,13 @@ namespace OpenSim.Region.Physics.OdePlugin d.JointGroupEmpty(contactgroup); //ode.dunlock(world); - } + } catch (Exception e) { m_log.Error("[PHYSICS]: " + e.Message.ToString() + e.TargetSite.ToString()); ode.dunlock(world); } - + step_time -= ODE_STEPSIZE; i++; //} @@ -1765,7 +1695,6 @@ namespace OpenSim.Region.Physics.OdePlugin } } } - } return fps; } @@ -1780,7 +1709,7 @@ namespace OpenSim.Region.Physics.OdePlugin get { return (false); } } - #region ODE Specific Terrain Fixes + #region ODE Specific Terrain Fixes public float[] ResizeTerrain512NearestNeighbour(float[] heightMap) { float[] returnarr = new float[262144]; @@ -1800,7 +1729,7 @@ namespace OpenSim.Region.Physics.OdePlugin // This particular way is quick but it only works on a multiple of the original // The idea behind this method can be described with the following diagrams - // second pass and third pass happen in the same loop really.. just separated + // second pass and third pass happen in the same loop really.. just separated // them to show what this does. // First Pass @@ -1893,6 +1822,7 @@ namespace OpenSim.Region.Physics.OdePlugin return returnarr; } + public float[] ResizeTerrain512Interpolation(float[] heightMap) { float[] returnarr = new float[262144]; @@ -1912,7 +1842,7 @@ namespace OpenSim.Region.Physics.OdePlugin // This particular way is quick but it only works on a multiple of the original // The idea behind this method can be described with the following diagrams - // second pass and third pass happen in the same loop really.. just separated + // second pass and third pass happen in the same loop really.. just separated // them to show what this does. // First Pass @@ -2139,7 +2069,6 @@ namespace OpenSim.Region.Physics.OdePlugin // m_log.Info((baseheight - 0.1f) + ((float)fluidRandomizer.Next(1, 9) / 10f)); } - lock (OdeLock) { if (!(WaterGeom == (IntPtr)0)) @@ -2183,7 +2112,6 @@ namespace OpenSim.Region.Physics.OdePlugin { lock (OdeLock) { - foreach (OdePrim prm in _prims) { RemovePrim(prm); diff --git a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs index 9ca1b23..82ce144 100644 --- a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs +++ b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs @@ -171,12 +171,12 @@ namespace OpenSim.Region.Physics.POSPlugin { if (check_collision(c, _prims[i])) { - + return true; } } - + return false; } @@ -234,7 +234,7 @@ namespace OpenSim.Region.Physics.POSPlugin character.Position.Z += character._target_velocity.Z*timeStep; } - /// this is it -- the magic you've all been waiting for! Ladies and gentlemen -- + /// this is it -- the magic you've all been waiting for! Ladies and gentlemen -- /// Completely Bogus Collision Detection!!! /// better known as the CBCD algorithm diff --git a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs index afc3ff2..2c33b57 100644 --- a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs @@ -108,7 +108,7 @@ namespace OpenSim.Region.ScriptEngine.Common public void state(string state) { State = state; - + } public void Start(BuilIn_Commands LSL_Functions) @@ -125,9 +125,9 @@ namespace OpenSim.Region.ScriptEngine.Common ads.ConfigurationFile ); - // Display the name of the calling AppDomain and the name + // Display the name of the calling AppDomain and the name // of the second domain. - // NOTE: The application's thread has transitioned between + // NOTE: The application's thread has transitioned between // AppDomains. Console.WriteLine("Calling to '{0}'.", Thread.GetDomain().FriendlyName diff --git a/OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs b/OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs index 2e35b46..2887f1e 100644 --- a/OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs +++ b/OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs @@ -42,7 +42,7 @@ namespace OpenSim.Region.ScriptEngine.Common /// protected bool m_Running = true; /// - /// True indicates that the ScriptManager has stopped + /// True indicates that the ScriptManager has stopped /// this script. This prevents a script that has been /// stopped as part of deactivation from being /// resumed by a pending llSetScriptState request. diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index d73a47a..ab91424 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -57,7 +57,7 @@ namespace OpenSim.Region.ScriptEngine.Common internal uint m_localID; internal LLUUID m_itemID; internal bool throwErrorOnNotImplemented = true; - + public LSL_BuiltIn_Commands(ScriptEngineBase.ScriptEngine ScriptEngine, SceneObjectPart host, uint localID, LLUUID itemID) { m_ScriptEngine = ScriptEngine; @@ -93,7 +93,7 @@ namespace OpenSim.Region.ScriptEngine.Common try { int eventFlags = m_ScriptEngine.m_ScriptManager.GetStateEventFlags(m_localID, m_itemID); - m_host.SetScriptEvents(m_itemID, eventFlags); + m_host.SetScriptEvents(m_itemID, eventFlags); m_ScriptEngine.m_EventManager.state_entry(m_localID); } catch (AppDomainUnloadedException) @@ -186,7 +186,7 @@ namespace OpenSim.Region.ScriptEngine.Common World.EventManager.TriggerRequestChangeWaterHeight((float)height); } } - + //These are the implementations of the various ll-functions used by the LSL scripts. //starting out, we use the System.Math library for trig functions. - ckrinke 8-14-07 public double llSin(double f) @@ -331,9 +331,9 @@ namespace OpenSim.Region.ScriptEngine.Common // New and improved, now actually works as described. Prim rotates as expected as does llRot2Euler. /* From wiki: - The Euler angle vector (in radians) is converted to a rotation by doing the rotations around the 3 axes - in Z, Y, X order. So llEuler2Rot(<1.0, 2.0, 3.0> * DEG_TO_RAD) generates a rotation by taking the zero rotation, - a vector pointing along the X axis, first rotating it 3 degrees around the global Z axis, then rotating the resulting + The Euler angle vector (in radians) is converted to a rotation by doing the rotations around the 3 axes + in Z, Y, X order. So llEuler2Rot(<1.0, 2.0, 3.0> * DEG_TO_RAD) generates a rotation by taking the zero rotation, + a vector pointing along the X axis, first rotating it 3 degrees around the global Z axis, then rotating the resulting vector 2 degrees around the global Y axis, and finally rotating that 1 degree around the global X axis. */ @@ -349,24 +349,24 @@ namespace OpenSim.Region.ScriptEngine.Common double sinX = Math.Sin(v.x); double sinY = Math.Sin(v.y); double sinZ = Math.Sin(v.z); - - s = Math.Sqrt( cosY * cosZ - sinX * sinY * sinZ + cosX * cosZ + cosX * cosY + 1.0f) * 0.5f; + + s = Math.Sqrt(cosY * cosZ - sinX * sinY * sinZ + cosX * cosZ + cosX * cosY + 1.0f) * 0.5f; if (Math.Abs(s) < 0.00001) // null rotation { - x = 0.0f; + x = 0.0f; y = 1.0f; - z = 0.0f; + z = 0.0f; } else { - s_i = 1.0f / (4.0f * s); - x = - ( -sinX * cosY - cosX * sinY * sinZ - sinX * cosZ) * s_i; - y = - ( -cosX * sinY * cosZ + sinX * sinZ - sinY) * s_i; - z = - ( -cosY * sinZ - sinX * sinY * cosZ - cosX * sinZ) * s_i; + s_i = 1.0f / (4.0f * s); + x = - (-sinX * cosY - cosX * sinY * sinZ - sinX * cosZ) * s_i; + y = - (-cosX * sinY * cosZ + sinX * sinZ - sinY) * s_i; + z = - (-cosY * sinZ - sinX * sinY * cosZ - cosX * sinZ) * s_i; } return new LSL_Types.Quaternion(x, y, z, s); } - + public LSL_Types.Quaternion llAxes2Rot(LSL_Types.Vector3 fwd, LSL_Types.Vector3 left, LSL_Types.Vector3 up) { @@ -477,7 +477,7 @@ namespace OpenSim.Region.ScriptEngine.Common m_host.AddScriptLPS(1); LLUUID keyID = LLUUID.Zero; LLUUID.TryParse(id, out keyID); - + m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.SenseOnce(m_localID, m_itemID, name, keyID, type, range, arc, m_host); } @@ -625,7 +625,7 @@ namespace OpenSim.Region.ScriptEngine.Common return String.Empty; - + } public LSL_Types.LSLInteger llDetectedType(int number) @@ -644,7 +644,7 @@ namespace OpenSim.Region.ScriptEngine.Common mask |= 0x04; // passive non-moving else mask |= 0x02; // active moving - if (SensedObject is IScript) mask |= 0x08; // Scripted. It COULD have one hidden ... + if (SensedObject is IScript) mask |= 0x08; // Scripted. It COULD have one hidden ... return mask; } @@ -655,7 +655,7 @@ namespace OpenSim.Region.ScriptEngine.Common EntityBase SensedObject = entityDetectedKey(number); if (SensedObject == null) return new LSL_Types.Vector3(0, 0, 0); - + return new LSL_Types.Vector3(SensedObject.AbsolutePosition.X,SensedObject.AbsolutePosition.Y,SensedObject.AbsolutePosition.Z); } @@ -757,7 +757,7 @@ namespace OpenSim.Region.ScriptEngine.Common if ((status & BuiltIn_Commands_BaseClass.STATUS_ROTATE_X) == BuiltIn_Commands_BaseClass.STATUS_ROTATE_X) { statusrotationaxis |= BuiltIn_Commands_BaseClass.STATUS_ROTATE_X; - + } if ((status & BuiltIn_Commands_BaseClass.STATUS_ROTATE_Y) == BuiltIn_Commands_BaseClass.STATUS_ROTATE_Y) { @@ -824,9 +824,9 @@ namespace OpenSim.Region.ScriptEngine.Common if (m_host.GetDieAtEdge()) return 1; - else + else return 0; - + case BuiltIn_Commands_BaseClass.STATUS_RETURN_AT_EDGE: NotImplemented("llGetStatus - STATUS_RETURN_AT_EDGE"); return 0; @@ -1248,7 +1248,7 @@ namespace OpenSim.Region.ScriptEngine.Common { m_host.AddScriptLPS(1); return m_host.registerTargetWaypoint(new LLVector3((float)position.x, (float)position.y, (float)position.z), (float)range); - + } public void llTargetRemove(int number) @@ -1286,21 +1286,21 @@ namespace OpenSim.Region.ScriptEngine.Common { m_host.AddScriptLPS(1); //No energy force yet - + if (force.x > 20000) force.x = 20000; if (force.y > 20000) force.y = 20000; if (force.z > 20000) force.z = 20000; - + if (local == 1) { m_host.ApplyImpulse(new LLVector3((float)force.x, (float)force.y, (float)force.z), true); } else { - + m_host.ApplyImpulse(new LLVector3((float)force.x,(float)force.y,(float)force.z), false); } } @@ -1475,7 +1475,7 @@ namespace OpenSim.Region.ScriptEngine.Common } // If end is positive, then it directly // corresponds to the lengt of the substring - // needed (plus one of course). BUT, it + // needed (plus one of course). BUT, it // must be within bounds. if (end >= src.Length) { @@ -1493,15 +1493,15 @@ namespace OpenSim.Region.ScriptEngine.Common // Inverted substring (end < start) else { - // Implies both indices are below the - // lower bound. In the inverted case, that + // Implies both indices are below the + // lower bound. In the inverted case, that // means the entire string will be returned // unchanged. if (start < 0) { return src; } - // If both indices are greater than the upper + // If both indices are greater than the upper // bound the result may seem initially counter // intuitive. if (end >= src.Length) @@ -1536,7 +1536,7 @@ namespace OpenSim.Region.ScriptEngine.Common /// /// Delete substring removes the specified substring bounded - /// by the inclusive indices start and end. Indices may be + /// by the inclusive indices start and end. Indices may be /// negative (indicating end-relative) and may be inverted, /// i.e. end < start. /// @@ -1591,7 +1591,7 @@ namespace OpenSim.Region.ScriptEngine.Common { return String.Empty; } - + if (end > 0) { if (start < src.Length) @@ -1616,7 +1616,7 @@ namespace OpenSim.Region.ScriptEngine.Common } } } - + /// /// Insert string inserts the specified string identified by src /// at the index indicated by index. Index may be negative, in @@ -1655,13 +1655,13 @@ namespace OpenSim.Region.ScriptEngine.Common // The index is in bounds. // In this case the index refers to the index that will - // be assigned to the first character of the inserted string. + // be assigned to the first character of the inserted string. // So unlike the other string operations, we do not add one // to get the correct string length. return dest.Substring(0,index)+src+dest.Substring(index); } - + public string llToUpper(string src) { m_host.AddScriptLPS(1); @@ -1767,12 +1767,12 @@ namespace OpenSim.Region.ScriptEngine.Common return; // wiki says, if it's further away then 10m, silently fail. LLVector3 llvel = new LLVector3((float)vel.x, (float)vel.y, (float)vel.z); - + // need the magnitude later float velmag = (float)Util.GetMagnitude(llvel); - + SceneObjectGroup new_group = World.RezObject(inv.Value, llpos, new LLQuaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s), llvel, param); - + // If either of these are null, then there was an unknown error. if (new_group == null) continue; @@ -1844,7 +1844,7 @@ namespace OpenSim.Region.ScriptEngine.Common if (m_host.TaskInventory[InventorySelf()].PermsGranter != LLUUID.Zero) { ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[InventorySelf()].PermsGranter); - + if (presence != null) { if ((m_host.TaskInventory[InventorySelf()].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TAKE_CONTROLS) != 0) @@ -1871,7 +1871,7 @@ namespace OpenSim.Region.ScriptEngine.Common if (m_host.TaskInventory[InventorySelf()].PermsGranter != LLUUID.Zero) { ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[InventorySelf()].PermsGranter); - + if (presence != null) { if ((m_host.TaskInventory[InventorySelf()].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TAKE_CONTROLS) != 0) @@ -1924,7 +1924,7 @@ namespace OpenSim.Region.ScriptEngine.Common // InstantMessageModule.OnInstantMessage searches through a list of scenes for a client matching the toAgent, // but I don't think we have a list of scenes available from here. // (We also don't want to duplicate the code in OnInstantMessage if we can avoid it.) - + // user is a UUID // TODO: figure out values for client, fromSession, and imSessionID @@ -1991,7 +1991,7 @@ namespace OpenSim.Region.ScriptEngine.Common } } - + public void llSetHoverHeight(double height, int water, double tau) { @@ -2050,7 +2050,7 @@ namespace OpenSim.Region.ScriptEngine.Common if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION) != 0) { ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter); - + if (presence != null) { // Do NOT try to parse LLUUID, animations cannot be triggered by ID @@ -2087,7 +2087,7 @@ namespace OpenSim.Region.ScriptEngine.Common return; ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter); - + if (presence != null) { if (animID == LLUUID.Zero) @@ -2194,7 +2194,7 @@ namespace OpenSim.Region.ScriptEngine.Common } ScenePresence presence = World.GetScenePresence(agentID); - + if (presence != null) { string ownerName=resolveName(m_host.ParentGroup.RootPart.OwnerID); @@ -2467,7 +2467,7 @@ namespace OpenSim.Region.ScriptEngine.Common // These functions are supposed to be robust, // so get the state one step at a time. - + if ((item = ScriptByName(name)) != LLUUID.Zero) { if ((sm = m_ScriptEngine.m_ScriptManager) != null) @@ -2480,14 +2480,14 @@ namespace OpenSim.Region.ScriptEngine.Common } } } - } + } // Required by SL if (script == null) ShoutError("llSetScriptState: script "+name+" not found"); - // If we didn't find it, then it's safe to + // If we didn't find it, then it's safe to // assume it is not running. } @@ -2806,23 +2806,23 @@ namespace OpenSim.Region.ScriptEngine.Common /* The new / changed functions were tested with the following LSL script: - + default { state_entry() { rotation rot = llEuler2Rot(<0,70,0> * DEG_TO_RAD); - + llOwnerSay("to get here, we rotate over: "+ (string) llRot2Axis(rot)); llOwnerSay("and we rotate for: "+ (llRot2Angle(rot) * RAD_TO_DEG)); - + // convert back and forth between quaternion <-> vector and angle - + rotation newrot = llAxisAngle2Rot(llRot2Axis(rot),llRot2Angle(rot)); - + llOwnerSay("Old rotation was: "+(string) rot); llOwnerSay("re-converted rotation is: "+(string) newrot); - + llSetRot(rot); // to check the parameters in the prim } } @@ -2832,7 +2832,7 @@ namespace OpenSim.Region.ScriptEngine.Common // Xantor 29/apr/2008 // Returns rotation described by rotating angle radians about axis. - // q = cos(a/2) + i ( x * sin(a/2)) + j (y * sin(a/2)) + k ( z * sin(a/2)) + // q = cos(a/2) + i (x * sin(a/2)) + j (y * sin(a/2)) + k (z * sin(a/2)) public LSL_Types.Quaternion llAxisAngle2Rot(LSL_Types.Vector3 axis, double angle) { m_host.AddScriptLPS(1); @@ -2849,7 +2849,7 @@ namespace OpenSim.Region.ScriptEngine.Common // NotImplemented("llAxisAngle2Rot"); } - + // Xantor 29/apr/2008 // converts a Quaternion to X,Y,Z axis rotations public LSL_Types.Vector3 llRot2Axis(LSL_Types.Quaternion rot) @@ -3264,7 +3264,7 @@ namespace OpenSim.Region.ScriptEngine.Common /// /// The supplied string is scanned for commas /// and converted into a list. Commas are only - /// effective if they are encountered outside + /// effective if they are encountered outside /// of '<' '>' delimiters. Any whitespace /// before or after an element is trimmed. /// @@ -3314,7 +3314,7 @@ namespace OpenSim.Region.ScriptEngine.Common } /// - /// Randomizes the list, be arbitrarily reordering + /// Randomizes the list, be arbitrarily reordering /// sublists of stride elements. As the stride approaches /// the size of the list, the options become very /// limited. @@ -3323,7 +3323,7 @@ namespace OpenSim.Region.ScriptEngine.Common /// This could take a while for very large list /// sizes. /// - + public LSL_Types.list llListRandomize(LSL_Types.list src, int stride) { @@ -3344,7 +3344,7 @@ namespace OpenSim.Region.ScriptEngine.Common // Stride MUST be a factor of the list length // If not, then return the src list. This also // traps those cases where stride > length. - + if (src.Length != stride && src.Length%stride == 0) { chunkk = src.Length/stride; @@ -3384,7 +3384,7 @@ namespace OpenSim.Region.ScriptEngine.Common object[] array = new object[src.Length]; Array.Copy(src.Data, 0, array, 0, src.Length); result = new LSL_Types.list(array); - } + } return result; @@ -3394,10 +3394,10 @@ namespace OpenSim.Region.ScriptEngine.Common /// Elements in the source list starting with 0 and then /// every i+stride. If the stride is negative then the scan /// is backwards producing an inverted result. - /// Only those elements that are also in the specified + /// Only those elements that are also in the specified /// range are included in the result. /// - + public LSL_Types.list llList2ListStrided(LSL_Types.list src, int start, int end, int stride) { @@ -3415,7 +3415,7 @@ namespace OpenSim.Region.ScriptEngine.Common if (end < 0) end = src.Length+end; - // Out of bounds indices are OK, just trim them + // Out of bounds indices are OK, just trim them // accordingly if (start > src.Length) @@ -3429,7 +3429,7 @@ namespace OpenSim.Region.ScriptEngine.Common if (start != end) { - if (start <= end) + if (start <= end) { si[0] = start; ei[0] = end; @@ -3448,8 +3448,8 @@ namespace OpenSim.Region.ScriptEngine.Common // fall within the specified sub-range. The specified // range values are inclusive. // A negative stride reverses the direction of the - // scan producing an inverted list as a result. - + // scan producing an inverted list as a result. + if (stride == 0) stride = 1; @@ -3492,7 +3492,7 @@ namespace OpenSim.Region.ScriptEngine.Common public LSL_Types.list llListInsertList(LSL_Types.list dest, LSL_Types.list src, int index) { - + LSL_Types.list pref = null; LSL_Types.list suff = null; @@ -3539,7 +3539,7 @@ namespace OpenSim.Region.ScriptEngine.Common /// Returns the index of the first occurrence of test /// in src. /// - + public LSL_Types.LSLInteger llListFindList(LSL_Types.list src, LSL_Types.list test) { @@ -3568,7 +3568,7 @@ namespace OpenSim.Region.ScriptEngine.Common } } } - + return index; } @@ -3632,12 +3632,12 @@ namespace OpenSim.Region.ScriptEngine.Common if (LLUUID.TryParse(id,out key)) { ScenePresence presence = World.GetScenePresence(key); - + if (presence != null) { return presence.Name; } - + if (World.GetSceneObjectPart(key) != null) { return World.GetSceneObjectPart(key).Name; @@ -3646,18 +3646,18 @@ namespace OpenSim.Region.ScriptEngine.Common return String.Empty; } - + public void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate) { m_host.AddScriptLPS(1); Primitive.TextureAnimation pTexAnim = new Primitive.TextureAnimation(); pTexAnim.Flags =(uint) mode; - + //ALL_SIDES if (face == -1) face = 255; - + pTexAnim.Face = (uint)face; pTexAnim.Length = (float)length; pTexAnim.Rate = (float)rate; @@ -3688,7 +3688,7 @@ namespace OpenSim.Region.ScriptEngine.Common LSL_Types.list ret = new LSL_Types.list(); object[] delimiters = new object[separators.Length + spacers.Length]; separators.Data.CopyTo(delimiters, 0); - spacers.Data.CopyTo(delimiters, separators.Length); + spacers.Data.CopyTo(delimiters, separators.Length); bool dfound = false; do { @@ -3735,7 +3735,7 @@ namespace OpenSim.Region.ScriptEngine.Common public LSL_Types.LSLInteger llOverMyLand(string id) { - + m_host.AddScriptLPS(1); LLUUID key = new LLUUID(); if (LLUUID.TryParse(id,out key)) @@ -3790,14 +3790,14 @@ namespace OpenSim.Region.ScriptEngine.Common LLUUID key = new LLUUID(); if (LLUUID.TryParse(id, out key)) - { + { ScenePresence av = World.GetScenePresence(key); - + if (av != null) { if (llAvatarOnSitTarget() == id) { - // if the avatar is sitting on this object, then + // if the avatar is sitting on this object, then // we can unsit them. We don't want random scripts unsitting random people // Lets avoid the popcorn avatar scenario. av.StandUp(); @@ -3809,12 +3809,12 @@ namespace OpenSim.Region.ScriptEngine.Common // if the land is group owned and the object is group owned by the same group // or // if the object is owned by a person with estate access. - + ILandObject parcel = World.LandChannel.GetLandObject(av.AbsolutePosition.X, av.AbsolutePosition.Y); if (parcel != null) { - if (m_host.ObjectOwner == parcel.landData.ownerID || - (m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.landData.groupID + if (m_host.ObjectOwner == parcel.landData.ownerID || + (m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.landData.groupID && parcel.landData.isGroupOwned) || World.ExternalChecks.ExternalChecksCanBeGodLike(m_host.OwnerID)) { av.StandUp(); @@ -3822,7 +3822,7 @@ namespace OpenSim.Region.ScriptEngine.Common } } } - + } } @@ -3928,7 +3928,7 @@ namespace OpenSim.Region.ScriptEngine.Common m_host.AddScriptLPS(1); Primitive.ParticleSystem prules = new Primitive.ParticleSystem(); LSL_Types.Vector3 tempv = new LSL_Types.Vector3(); - + float tempf = 0; for (int i = 0; i < rules.Length; i += 2) @@ -3954,7 +3954,7 @@ namespace OpenSim.Region.ScriptEngine.Common case (int)BuiltIn_Commands_BaseClass.PSYS_PART_END_COLOR: tempv = (LSL_Types.Vector3)rules.Data[i + 1]; //prules.PartEndColor = new LLColor(tempv.x,tempv.y,tempv.z,1); - + prules.PartEndColor.R = (float)tempv.x; prules.PartEndColor.G = (float)tempv.y; prules.PartEndColor.B = (float)tempv.z; @@ -3996,7 +3996,7 @@ namespace OpenSim.Region.ScriptEngine.Common // Xantor 03-May-2008 // Wiki: PSYS_SRC_TEXTURE string inventory item name or key of the particle texture - // "" = default texture. + // "" = default texture. case (int)BuiltIn_Commands_BaseClass.PSYS_SRC_TEXTURE: LLUUID tkey = LLUUID.Zero; @@ -4007,11 +4007,11 @@ namespace OpenSim.Region.ScriptEngine.Common } // else try to locate the name in inventory of object. found returns key, // not found returns LLUUID.Zero which will translate to the default particle texture - else + else { prules.Texture = InventoryKey(rules.Data[i+1].ToString()); } - break; + break; case (int)BuiltIn_Commands_BaseClass.PSYS_SRC_BURST_RATE: tempf = Convert.ToSingle(rules.Data[i + 1].ToString()); @@ -4150,7 +4150,7 @@ namespace OpenSim.Region.ScriptEngine.Common m_host.AddScriptLPS(1); return m_host.GetAvatarOnSitTarget().ToString(); //LLUUID AVID = m_host.GetAvatarOnSitTarget(); - + //if (AVID != LLUUID.Zero) // return AVID.ToString(); //else @@ -4283,7 +4283,7 @@ namespace OpenSim.Region.ScriptEngine.Common // These functions are supposed to be robust, // so get the state one step at a time. - + if ((item = ScriptByName(name)) != LLUUID.Zero) if ((sm = m_ScriptEngine.m_ScriptManager) != null) sm.ResetScript(m_localID, item); @@ -4293,7 +4293,7 @@ namespace OpenSim.Region.ScriptEngine.Common if (script == null) ShoutError("llResetOtherScript: script "+name+" not found"); - // If we didn't find it, then it's safe to + // If we didn't find it, then it's safe to // assume it is not running. } @@ -4307,7 +4307,7 @@ namespace OpenSim.Region.ScriptEngine.Common // These functions are supposed to be robust, // so get the state one step at a time. - + if ((item = ScriptByName(name)) != LLUUID.Zero) { if ((sm = m_ScriptEngine.m_ScriptManager) != null) @@ -4324,7 +4324,7 @@ namespace OpenSim.Region.ScriptEngine.Common if (script == null) ShoutError("llGetScriptState: script "+name+" not found"); - // If we didn't find it, then it's safe to + // If we didn't find it, then it's safe to // assume it is not running. return 0; @@ -4586,7 +4586,7 @@ namespace OpenSim.Region.ScriptEngine.Common { return; } - + if (landowner != m_host.ObjectOwner) { return; @@ -4857,7 +4857,7 @@ namespace OpenSim.Region.ScriptEngine.Common case 21: // PRIM_FLEXIBLE PrimitiveBaseShape shape = m_host.Shape; - + if (shape.FlexiEntry) res.Add(new LSL_Types.LSLInteger(1)); // active else @@ -4885,7 +4885,7 @@ namespace OpenSim.Region.ScriptEngine.Common case 23: // PRIM_POINT_LIGHT: shape = m_host.Shape; - + if (shape.LightEntry) res.Add(new LSL_Types.LSLInteger(1)); // active else @@ -4932,12 +4932,12 @@ namespace OpenSim.Region.ScriptEngine.Common // // // Each point in a base-64 string represents - // a 6 bit value. A 32-bit integer can be + // a 6 bit value. A 32-bit integer can be // represented using 6 characters (with some - // redundancy). + // redundancy). // // - // LSL requires a base64 string to be 8 + // LSL requires a base64 string to be 8 // characters in length. LSL also uses '/' // rather than '-' (MIME compliant). // @@ -4948,7 +4948,7 @@ namespace OpenSim.Region.ScriptEngine.Common // // SL do not record any kind of exception for // these functions, so the string to integer - // conversion returns '0' if an invalid + // conversion returns '0' if an invalid // character is encountered during conversion. // // @@ -4962,13 +4962,13 @@ namespace OpenSim.Region.ScriptEngine.Common // // // - + // // Table for converting 6-bit integers into // base-64 characters // - private static readonly char[] i2ctable = + private static readonly char[] i2ctable = { 'A','B','C','D','E','F','G','H', 'I','J','K','L','M','N','O','P', @@ -4992,7 +4992,7 @@ namespace OpenSim.Region.ScriptEngine.Common { -1,-1,-1,-1,-1,-1,-1,-1, // 0x -1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1, // 1x + -1,-1,-1,-1,-1,-1,-1,-1, // 1x -1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1, // 2x -1,-1,-1,63,-1,-1,-1,64, @@ -5070,25 +5070,25 @@ namespace OpenSim.Region.ScriptEngine.Common // length strings return zero. // // - // Returns an integer representing the - // encoded value providedint he 1st 6 + // Returns an integer representing the + // encoded value providedint he 1st 6 // characters of the string. // // // This is coded to behave like LSL's // implementation (I think), based upon the // information available at the Wiki. - // If more than 8 characters are supplied, + // If more than 8 characters are supplied, // zero is returned. // If a NULL string is supplied, zero will // be returned. // If fewer than 6 characters are supplied, then - // the answer will reflect a partial + // the answer will reflect a partial // accumulation. // - // The 6-bit segments are - // extracted left-to-right in big-endian mode, - // which means that segment 6 only contains the + // The 6-bit segments are + // extracted left-to-right in big-endian mode, + // which means that segment 6 only contains the // two low-order bits of the 32 bit integer as // its high order 2 bits. A short string therefore // means loss of low-order information. E.g. @@ -5126,39 +5126,39 @@ namespace OpenSim.Region.ScriptEngine.Common return digit<0?(int)0:number; } number += --digit<<26; - + if ((digit=c2itable[str[1]])<=0) { return digit<0?(int)0:number; } number += --digit<<20; - + if ((digit=c2itable[str[2]])<=0) { return digit<0?(int)0:number; } number += --digit<<14; - + if ((digit=c2itable[str[3]])<=0) { return digit<0?(int)0:number; } number += --digit<<8; - + if ((digit=c2itable[str[4]])<=0) { return digit<0?(int)0:number; } number += --digit<<2; - + if ((digit=c2itable[str[5]])<=0) { return digit<0?(int)0:number; } number += --digit>>4; - + // ignore trailing padding - + return number; } @@ -5182,8 +5182,8 @@ namespace OpenSim.Region.ScriptEngine.Common // // Scan the string supplied in 'src' and - // tokenize it based upon two sets of - // tokenizers provided in two lists, + // tokenize it based upon two sets of + // tokenizers provided in two lists, // separators and spacers. // // @@ -5196,38 +5196,38 @@ namespace OpenSim.Region.ScriptEngine.Common // Both separators and spacers may be arbitrarily // long strings. i.e. ":::". // - // The function returns an ordered list + // The function returns an ordered list // representing the tokens found in the supplied // sources string. If two successive tokenizers // are encountered, then a NULL entry is added // to the list. // - // It is a precondition that the source and + // It is a precondition that the source and // toekizer lisst are non-null. If they are null, - // then a null pointer exception will be thrown + // then a null pointer exception will be thrown // while their lengths are being determined. // // A small amount of working memoryis required // of approximately 8*#tokenizers. // - // There are many ways in which this function - // can be implemented, this implementation is + // There are many ways in which this function + // can be implemented, this implementation is // fairly naive and assumes that when the // function is invooked with a short source // string and/or short lists of tokenizers, then // performance will not be an issue. // - // In order to minimize the perofrmance + // In order to minimize the perofrmance // effects of long strings, or large numbers // of tokeizers, the function skips as far as - // possible whenever a toekenizer is found, + // possible whenever a toekenizer is found, // and eliminates redundant tokenizers as soon // as is possible. // // The implementation tries to avoid any copying // of arrays or other objects. // - + public LSL_Types.list llParseStringKeepNulls(string src, LSL_Types.list separators, LSL_Types.list spacers) { int beginning = 0; @@ -5256,7 +5256,7 @@ namespace OpenSim.Region.ScriptEngine.Common active[i] = true; offset[mlen] = srclen; - + while (beginning < srclen) { @@ -5270,7 +5270,7 @@ namespace OpenSim.Region.ScriptEngine.Common { // scan all of the markers if ((offset[j] = src.IndexOf((string)separray[j],beginning)) == -1) - { + { // not present at all active[j] = false; } @@ -5278,7 +5278,7 @@ namespace OpenSim.Region.ScriptEngine.Common { // present and correct if (offset[j] < offset[best]) - { + { // closest so far best = j; if (offset[best] == beginning) @@ -5293,19 +5293,19 @@ namespace OpenSim.Region.ScriptEngine.Common if (offset[best] != beginning) { for (j = seplen; (j < mlen) && (offset[best] > beginning); j++) - { + { if (active[j]) { // scan all of the markers if ((offset[j] = src.IndexOf((string)spcarray[j-seplen],beginning)) == -1) - { + { // not present at all active[j] = false; } else { // present and correct if (offset[j] < offset[best]) - { + { // closest so far best = j; } @@ -5317,7 +5317,7 @@ namespace OpenSim.Region.ScriptEngine.Common // This is the normal exit from the scanning loop if (best == mlen) - { + { // no markers were found on this pass // so we're pretty much done tokens.Add(src.Substring(beginning, srclen-beginning)); @@ -5478,7 +5478,7 @@ namespace OpenSim.Region.ScriptEngine.Common //should be similar to : llInstantMessage(llGetOwner(),msg) // llGetOwner ==> m_host.ObjectOwner.ToString() llInstantMessage(m_host.ObjectOwner.ToString(),msg); - + //World.SimChat(Helpers.StringToField(msg), ChatTypeEnum.Owner, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID); //IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface(); //wComm.DeliverMessage(ChatTypeEnum.Owner, 0, m_host.Name, m_host.UUID, msg); @@ -5509,19 +5509,19 @@ namespace OpenSim.Region.ScriptEngine.Common /// /// illListReplaceList removes the sub-list defined by the inclusive indices - /// start and end and inserts the src list in its place. The inclusive + /// start and end and inserts the src list in its place. The inclusive /// nature of the indices means that at least one element must be deleted /// if the indices are within the bounds of the existing list. I.e. 2,2 /// will remove the element at index 2 and replace it with the source /// list. Both indices may be negative, with the usual interpretation. An - /// interesting case is where end is lower than start. As these indices + /// interesting case is where end is lower than start. As these indices /// bound the list to be removed, then 0->end, and start->lim are removed /// and the source list is added as a suffix. /// public LSL_Types.list llListReplaceList(LSL_Types.list dest, LSL_Types.list src, int start, int end) { - + LSL_Types.list pref = null; m_host.AddScriptLPS(1); @@ -5542,9 +5542,9 @@ namespace OpenSim.Region.ScriptEngine.Common // list. if (start <= end) { - // If greater than zero, then there is going to be a - // surviving prefix. Otherwise the inclusive nature - // of the indices mean that we're going to add the + // If greater than zero, then there is going to be a + // surviving prefix. Otherwise the inclusive nature + // of the indices mean that we're going to add the // source list as a prefix. if (start > 0) { @@ -5580,7 +5580,7 @@ namespace OpenSim.Region.ScriptEngine.Common } // Finally, if start > end, we strip away a prefix and // a suffix, to leave the list that sits ens - // and start, and then tag on the src list. AT least + // and start, and then tag on the src list. AT least // that's my interpretation. We can get sublist to do // this for us. Note that one, or both of the indices // might have been negative. @@ -6084,7 +6084,7 @@ namespace OpenSim.Region.ScriptEngine.Common if (LLUUID.TryParse(id, out key)) { ScenePresence av = World.GetScenePresence(key); - + if (av != null) { foreach (object o in args.Data) @@ -6103,7 +6103,7 @@ namespace OpenSim.Region.ScriptEngine.Common case "4": ret.Add(new LSL_Types.Quaternion((double)av.Rotation.x, (double)av.Rotation.y, (double)av.Rotation.z, (double)av.Rotation.w)); break; - case "5": + case "5": ret.Add(new LSL_Types.Vector3(av.Velocity.X,av.Velocity.Y,av.Velocity.Z)); break; case "6": diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs index e031c01..c8c51f8 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs @@ -493,7 +493,7 @@ namespace OpenSim.Region.ScriptEngine.Common // now, this makes the math easier int remove=end+1-start; - + ret=new Object[m_data.Length-remove]; if (ret.Length == 0) return new list(ret); @@ -519,7 +519,7 @@ namespace OpenSim.Region.ScriptEngine.Common // NOTE that either index may still be negative after // adding the length, so we must take additional // measures to protect against this. Note also that - // after normalisation the negative indices are no + // after normalisation the negative indices are no // longer relative to the end of the list. if (start < 0) @@ -533,7 +533,7 @@ namespace OpenSim.Region.ScriptEngine.Common } // The conventional case is start <= end - // NOTE that the case of an empty list is + // NOTE that the case of an empty list is // dealt with by the initial test. Start // less than end is taken to be the most // common case. @@ -553,7 +553,7 @@ namespace OpenSim.Region.ScriptEngine.Common { end = m_data.Length - 1; } - + // Sublist still starts before the beginning of the list if (start < 0) { @@ -561,7 +561,7 @@ namespace OpenSim.Region.ScriptEngine.Common } ret = new object[end - start + 1]; - + Array.Copy(m_data, start, ret, 0, end - start + 1); return new list(ret); @@ -580,7 +580,7 @@ namespace OpenSim.Region.ScriptEngine.Common { result = new list(); // If start is still negative, then the whole of - // the existing list is returned. This case is + // the existing list is returned. This case is // only admitted if end is also still negative. if (start < 0) { @@ -593,7 +593,7 @@ namespace OpenSim.Region.ScriptEngine.Common result = GetSublist(0,end); } - // If start is outside of list, then just return + // If start is outside of list, then just return // the prefix, whatever it is. if (start >= m_data.Length) { @@ -896,7 +896,7 @@ namespace OpenSim.Region.ScriptEngine.Common } } - #endregion + #endregion public string ToPrettyString() { @@ -962,7 +962,7 @@ namespace OpenSim.Region.ScriptEngine.Common } // - // BELOW IS WORK IN PROGRESS... IT WILL CHANGE, SO DON'T USE YET! :) + // BELOW IS WORK IN PROGRESS... IT WILL CHANGE, SO DON'T USE YET! :) // public struct StringTest @@ -1103,7 +1103,7 @@ namespace OpenSim.Region.ScriptEngine.Common } } - + static public implicit operator String(LSLString s) { @@ -1267,7 +1267,7 @@ namespace OpenSim.Region.ScriptEngine.Common i.value++; return i; } - + public static LSLInteger operator --(LSLInteger i) { diff --git a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs index 2b6f6d9..03d3a41 100644 --- a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs @@ -268,7 +268,7 @@ namespace OpenSim.Region.ScriptEngine.Common return 0; } } - + public double osTerrainGetHeight(int x, int y) { m_host.AddScriptLPS(1); @@ -448,7 +448,7 @@ namespace OpenSim.Region.ScriptEngine.Common } } - //Texture draw functions + //Texture draw functions public string osMovePen(string drawList, int x, int y) { m_host.AddScriptLPS(1); diff --git a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs index 2d58b57..aa9c8c7 100644 --- a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs +++ b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs @@ -60,7 +60,7 @@ namespace OpenSim.Region.ScriptEngine.Common string osSetPenSize(string drawList, int penSize); string osSetPenColour(string drawList, string colour); string osDrawImage(string drawList, int width, int height, string imageUrl); - void osSetStateEvents(int events); + void osSetStateEvents(int events); } } diff --git a/OpenSim/Region/ScriptEngine/Common/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Common/Properties/AssemblyInfo.cs index f438120..335d1a0 100644 --- a/OpenSim/Region/ScriptEngine/Common/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ScriptEngine/Common/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,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/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs index f3af621..2a0ed37 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs @@ -115,7 +115,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase Thread.Sleep(cmdHandlerThreadCycleSleepms); //lock (ScriptEngine.ScriptEngines) //{ - foreach (ScriptEngine se in new ArrayList(ScriptEngine.ScriptEngines)) + foreach (ScriptEngine se in new ArrayList(ScriptEngine.ScriptEngines)) { se.m_ASYNCLSLCommandManager.DoOneCmdHandlerPass(); } @@ -176,7 +176,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase #region Check llRemoteData channels - + #endregion #region Check llListeners diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs index 4311836..13c9d25 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs @@ -218,7 +218,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin objtype |= 0x04; // passive non-moving else objtype |= 0x02; // active moving - if (ent is IScript) objtype |= 0x08; // Scripted. It COULD have one hidden ... + if (ent is IScript) objtype |= 0x08; // Scripted. It COULD have one hidden ... if (((ts.type & objtype) != 0) || ((ts.type & objtype) == ts.type)) { diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs index 141e471..6f88e11 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs @@ -94,7 +94,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin } } - // Old method: Create new list + // Old method: Create new list //List NewTimers = new List(); //foreach (TimerClass ts in Timers) //{ diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs index 715e465..fc005ab 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs @@ -39,7 +39,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase /// public class MaintenanceThread : iScriptEngineFunctionModule { - + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); //public ScriptEngine m_ScriptEngine; @@ -238,6 +238,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase // get { return _PleaseShutdown; } // set { _PleaseShutdown = value; } //} - //private bool _PleaseShutdown = false; + //private bool _PleaseShutdown = false; } } diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs index a7ad50d..b0c6314 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs @@ -38,7 +38,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase /// /// This is the root object for ScriptEngine. Objects access each other trough this class. /// - /// + /// [Serializable] public abstract class ScriptEngine : IRegionModule, ScriptServerInterfaces.ScriptEngine, iScriptEngineFunctionModule { @@ -154,7 +154,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase #region IRegionModule public abstract void Initialise(Scene scene, IConfigSource config); - + public void PostInitialise() { } diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs index 2233913..c84975a 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs @@ -41,7 +41,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase /// Compiles them if necessary /// Execute functions for EventQueueManager (Sends them to script on other AppDomain for execution) /// - /// + /// // This class is as close as you get to the script without being inside script class. It handles all the dirty work for other classes. // * Keeps track of running scripts @@ -212,7 +212,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase if (LUQueue.Count > 0) { LUStruct item = LUQueue.Dequeue(); - + if (item.Action == LUType.Unload) { _StopScript(item.localID, item.itemID); @@ -224,7 +224,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase } } } - + #endregion #region Helper functions diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPServer.cs b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPServer.cs index 55a20e7..26892a2 100644 --- a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPServer.cs +++ b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPServer.cs @@ -33,7 +33,7 @@ using System.Net.Sockets; namespace OpenSim.Region.ScriptEngine.Common.TRPC { - public class TCPServer: TCPCommon.ServerInterface + public class TCPServer: TCPCommon.ServerInterface { public readonly int LocalPort; public TCPServer(int localPort) diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs b/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs index c293ecb..a310978 100644 --- a/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs +++ b/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs @@ -44,7 +44,7 @@ namespace OpenSim.Region.ScriptEngine.Common public delegate void ReceiveCommandDelegate(int ID, string Command, params object[] p); public event ReceiveCommandDelegate ReceiveCommand; Dictionary TypeDictionary = new Dictionary(); - Type[] Types = + Type[] Types = { typeof(String), typeof(Int16), diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs index 1d71182..f661162 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs @@ -39,9 +39,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL { public class Compiler { - private static readonly log4net.ILog m_log + private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - + // * Uses "LSL2Converter" to convert LSL to C# if necessary. // * Compiles C#-code into an assembly // * Returns assembly name ready for AppDomain load. @@ -278,8 +278,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL if (enableCommanderLSL == true && l == enumCompileType.cs) { - foreach (KeyValuePair com + foreach (KeyValuePair com in m_scriptEngine.World.GetCommanders()) { compileScript = com.Value.GenerateRuntimeAPI() + compileScript; @@ -305,7 +305,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL m_log.Debug("[ScriptEngine.DotNetEngine]: Preparing to compile the following LSL to C# translated code"); m_log.Debug(""); m_log.Debug(compileScript); - + return CompileFromDotNetText(compileScript, l); } @@ -322,7 +322,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL private static string CreateCSCompilerScript(string compileScript) { - + compileScript = String.Empty + "using OpenSim.Region.ScriptEngine.Common; using System.Collections.Generic;\r\n" + diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs index 2100900..1832864 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.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; @@ -32,17 +32,13 @@ using System.Text.RegularExpressions; namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL { - public class LSL2CSConverter { - - // Uses regex to convert LSL code to C# code. //private Regex rnw = new Regex(@"[a-zA-Z0-9_\-]", RegexOptions.Compiled); private Dictionary dataTypes = new Dictionary(); private Dictionary quotes = new Dictionary(); - public LSL2CSConverter() { @@ -72,7 +68,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL Script = Regex.Replace(Script, @"\r\n", "\n"); Script = Regex.Replace(Script, @"\n", "\r\n"); - // QUOTE REPLACEMENT // temporarily replace quotes so we can work our magic on the script without // always considering if we are inside our outside quotes's @@ -86,21 +81,16 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL bool last_was_escape = false; int quote_replaced_count = 0; - - string[] blocked = new string[] {"Axiom","Db4objects","libsecondlife","log4net","Microsoft", "Modified","Mono","MonoXnaCompactMaths","mscorlib","MySql", "NHibernate","Nini","nunit","Ode","OpenSim","PhysX_Wrapper_Dotnet", "PumaCode","RAIL","XMLRPC","System"}; - for (int p = 0; p < blocked.Length;p++) { - Match SecurityM = Regex.Match(Script, "[;}][^\"']+" + blocked[p].Replace(".", "\\.") + "\\.[^\"']", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); if (SecurityM.Success) throw new Exception("CS0103: 'The name '" + blocked[p] + "' does not exist in the current context'"); - } for (int p = 0; p < Script.Length; p++) @@ -166,7 +156,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL // END OF QUOTE REPLACEMENT // - // // PROCESS STATES // Remove state definitions and add state names to start of each event within state @@ -194,7 +183,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL // if level == 0, add to return if (ilevel == 1 && lastlevel == 0) { - // 0 => 1: Get last + // 0 => 1: Get last Match m = //Regex.Match(cache, @"(?![a-zA-Z_]+)\s*([a-zA-Z_]+)[^a-zA-Z_\(\)]*{", Regex.Match(cache, @"(?![a-zA-Z_]+)\s*(state\s+)?(?[a-zA-Z_][a-zA-Z_0-9]*)[^a-zA-Z_0-9\(\)]*{", @@ -253,7 +242,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL Script = ret; ret = String.Empty; - foreach (string key in dataTypes.Keys) { string val; @@ -291,7 +279,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL Regex.Replace(Script, @"\[([^\]]*)\]", @"new LSL_Types.list($1)", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); - // Replace (string) to .ToString() // Script = Regex.Replace(Script, @"\(string\)\s*([a-zA-Z0-9_.]+(\s*\([^\)]*\))?)", @"$1.ToString()", @@ -313,12 +300,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL Script = Script.Replace(key, "\"" + val + "\""); } - - //System.Console.WriteLine(Script); Return = String.Empty;// + //"using OpenSim.Region.ScriptEngine.Common; using System.Collections.Generic;"; - //Return += String.Empty + // "namespace SecondLife { "; @@ -328,13 +312,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL //Return += @"public Script() { } "; Return += Script; //Return += "} }\r\n"; - + quotes.Clear(); - + return Return; } - } - - } diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Properties/AssemblyInfo.cs index bce9cfc..799aa92 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/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/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs index ed2c0a3..55289d9 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs @@ -102,7 +102,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine // Fire the first start-event int eventFlags = m_scriptEngine.m_ScriptManager.GetStateEventFlags(localID, itemID); - m_host.SetScriptEvents(itemID, eventFlags); + m_host.SetScriptEvents(itemID, eventFlags); m_scriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "state_entry", EventQueueManager.llDetectNull, new object[] { }); } catch (Exception e) // LEGIT: User Scripting diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/Engine.cs b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/Engine.cs index 0208350..f53772e 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/Engine.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/Engine.cs @@ -168,7 +168,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO Common.SendToDebug("IL_CREATE_CONSTRUCTOR()"); //ConstructorBuilder constructor = typeBuilder.DefineConstructor( // MethodAttributes.Public, - // CallingConventions.Standard, + // CallingConventions.Standard, // new Type[0]); ConstructorBuilder constructor = typeBuilder.DefineConstructor( MethodAttributes.Public | @@ -192,8 +192,8 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO //// Create state object //FieldName = "State"; //FieldBuilder State_fb = typeBuilder.DefineField( - // FieldName, - // typeof(UInt32), + // FieldName, + // typeof(UInt32), // FieldAttributes.Public); //il.Emit(OpCodes.Ldarg_0); //il.Emit(OpCodes.Ldc_I4, 0); @@ -206,8 +206,8 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO //FieldName = "LSL_BuiltIns"; //FieldBuilder LSL_BuiltIns_fb = typeBuilder.DefineField( - // FieldName, - // objType1, + // FieldName, + // objType1, // FieldAttributes.Public); ////LSL_BuiltIn_Commands_TestImplementation _ti = new LSL_BuiltIn_Commands_TestImplementation(); diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_BaseClass_OPCODES.cs b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_BaseClass_OPCODES.cs index 1b73311..7805aa3 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_BaseClass_OPCODES.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_BaseClass_OPCODES.cs @@ -34,9 +34,9 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO // * // * These are internal "assembly" commands, // * basic operators like "ADD", "PUSH" and "POP" - // * + // * // * It also contains managed stack and keeps track of internal variables, etc. - // * + // * // */ diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Parser.cs b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Parser.cs index 06ae1e9..b2a2f25 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Parser.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Parser.cs @@ -69,14 +69,12 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO fs.Close(); } - /// /// Parse LSO file. /// public void Parse() { - // The LSO Format consist of 6 major blocks: header, statics, functions, states, heap, and stack. - + // The LSO Format consist of 6 major blocks: header, statics, functions, states, heap, and stack. // HEADER BLOCK Common.SendToDebug("Reading HEADER BLOCK at: 0"); @@ -156,7 +154,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO } Common.SendToDebug("Number of Static Blocks read: " + StaticBlockCount); - // FUNCTION BLOCK // Always right after STATIC BLOCK LSO_Struct.FunctionBlock myFunctionBlock = new LSO_Struct.FunctionBlock(); @@ -186,7 +183,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO } } - // STATE FRAME BLOCK // Always right after FUNCTION BLOCK Common.SendToDebug("Reading STATE BLOCK at: " + myHeader.SR); @@ -213,7 +209,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO } } - // STATE BLOCK // For each StateFrameBlock there is one StateBlock with multiple event handlers @@ -239,7 +234,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO // We need to count number of bits flagged in EventMask? - // for each bit in myStateFrameBlock.StatePointer[i].EventMask // ADDING TO ALL RIGHT NOW, SHOULD LIMIT TO ONLY THE ONES IN USE @@ -273,7 +267,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO } } - //// READ FUNCTION CODE CHUNKS //// Functions + Function start pos (GFR) //// TODO: Somehow be able to identify and reference this @@ -293,7 +286,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO { for (int i = 0; i < myStateFrameBlock.StateCount; i++) { - // TODO: Somehow organize events and functions so they can be found again, + // TODO: Somehow organize events and functions so they can be found again, // two level search ain't no good for (int ii = 0; ii < myStateFrameBlock.StatePointer[i].EventMask.Count - 1; ii++) { @@ -320,7 +313,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO } } - if (Common.IL_CreateFunctionList) IL_INSERT_FUNCTIONLIST(); } @@ -371,7 +363,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO //private byte[] br_read_smallendian(int len) //{ - // byte[] bytes = new byte[len]; + // byte[] bytes = new byte[len]; // br.Read(bytes,0, len); // return bytes; //} @@ -459,7 +451,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO Common.SendToDebug("Return type #" + myCodeChunk.ReturnType.ObjectType + ": " + ((LSO_Enums.Variable_Type_Codes) myCodeChunk.ReturnType.ObjectType).ToString()); - // TODO: How to determine number of codechunks -- does this method work? myCodeChunk.CodeChunkArguments = new List(); byte reader = br_read(1)[0]; @@ -492,7 +483,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO // End marker is 0x000 myCodeChunk.EndMarker = reader; - // // Emit: START OF METHOD (FUNCTION) // @@ -515,11 +505,9 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO Common.SendToDebug("CLR:" + eventname + ":ILGenerator il = methodBuilder.GetILGenerator();"); ILGenerator il = methodBuilder.GetILGenerator(); - if (Common.IL_UseTryCatch) IL_INSERT_TRY(il, eventname); - // Push Console.WriteLine command to stack ... Console.WriteLine("Hello World!"); //Common.SendToDebug("CLR:" + eventname + ":il.Emit(OpCodes.Call..."); //il.Emit(OpCodes.Call, typeof(Console).GetMethod @@ -534,7 +522,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO il.Emit(OpCodes.Ldarg, _ic); } - // // CALLING OPCODE PROCESSOR, one command at the time TO GENERATE IL // @@ -544,7 +531,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO FoundRet = LSL_PROCESS_OPCODE(il); } - if (Common.IL_UseTryCatch) IL_INSERT_END_TRY(il, eventname); @@ -558,17 +544,14 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO { Common.SendToDebug("Creating function list"); - string eventname = "GetFunctions"; Common.SendToDebug("Creating IL " + eventname); // Define a private String field. //FieldBuilder myField = myTypeBuilder.DefineField("EventList", typeof(String[]), FieldAttributes.Public); - //FieldBuilder mem = typeBuilder.DefineField("mem", typeof(Array), FieldAttributes.Private); - MethodBuilder methodBuilder = typeBuilder.DefineMethod(eventname, MethodAttributes.Public, typeof (string[]), @@ -579,7 +562,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO ILGenerator il = methodBuilder.GetILGenerator(); - // IL_INSERT_TRY(il, eventname); // // Push string to stack @@ -615,17 +597,14 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO //il.Emit(OpCodes.Call, typeof(LSL_BaseClass).GetMethod("AddFunction", new Type[] { typeof(string) })); } - // IL_INSERT_END_TRY(il, eventname); - il.Emit(OpCodes.Ldloc_0); // Load local variable 0 onto stack // il.Emit(OpCodes.Call, typeof(LSL_BaseClass).GetMethod("SetFunctionList", new Type[] { typeof(Array) })); il.Emit(OpCodes.Ret); // Return } - private void IL_INSERT_TRY(ILGenerator il, string eventname) { /* @@ -687,7 +666,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO { Common.SendToDebug("Found cached STATIC BLOCK"); - return StaticBlocks[pos]; } diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/LSOEngine/Properties/AssemblyInfo.cs index 78b44a0..5210ff0 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/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/Region/ScriptEngine/LSOEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs index 20d1a58..617d6f6 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs @@ -92,7 +92,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine // Fire the first start-event int eventFlags = m_scriptEngine.m_ScriptManager.GetStateEventFlags(localID, itemID); - m_host.SetScriptEvents(itemID, eventFlags); + m_host.SetScriptEvents(itemID, eventFlags); m_scriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "state_entry", EventQueueManager.llDetectNull, new object[] { }); } catch (Exception e) // LEGIT - User Script Compilation diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/RemoteServer/Properties/AssemblyInfo.cs index 70a84f1..77d9b10 100644 --- a/OpenSim/Region/ScriptEngine/RemoteServer/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ScriptEngine/RemoteServer/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/Region/ScriptEngine/RemoteServer/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs index c33cfd1..8754516 100644 --- a/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs @@ -39,7 +39,7 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer /// /// This is the root object for RemoteServer. Objects access each other trough this class. /// - /// + /// [Serializable] public class ScriptEngine : IRegionModule { diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/Properties/AssemblyInfo.cs b/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/Properties/AssemblyInfo.cs index c0fc890..0416779 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/Properties/AssemblyInfo.cs @@ -29,7 +29,7 @@ using System.Reflection; using System.Runtime.CompilerServices; 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. [assembly: AssemblyTitle("OpenSim.DataStore.DB4o")] @@ -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)] @@ -52,11 +52,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")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs index c917e1e..fa0d0b6 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs @@ -142,7 +142,7 @@ namespace OpenSim.DataStore.MSSQL public void RemoveObject(LLUUID obj, LLUUID regionUUID) { m_log.InfoFormat("[DATASTORE]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID); - + DataTable prims = ds.Tables["prims"]; DataTable shapes = ds.Tables["primshapes"]; @@ -332,7 +332,7 @@ namespace OpenSim.DataStore.MSSQL /*********************************************************************** * * Database Definition Functions - * + * * This should be db agnostic as we define them in ADO.NET terms * **********************************************************************/ @@ -460,7 +460,7 @@ namespace OpenSim.DataStore.MSSQL } /*********************************************************************** - * + * * Convert between ADO.NET <=> OpenSim Objects * * These should be database independant @@ -650,7 +650,7 @@ namespace OpenSim.DataStore.MSSQL s.ProfileHollow = Convert.ToUInt16(row["ProfileHollow"]); // text TODO: this isn't right] = but I'm not sure the right - // way to specify this as a blob atm + // way to specify this as a blob atm byte[] textureEntry = (byte[]) row["Texture"]; s.TextureEntry = textureEntry; @@ -695,7 +695,7 @@ namespace OpenSim.DataStore.MSSQL // way to specify this as a blob atm // And I couldn't work out how to save binary data either - // seems that the texture colum is being treated as a string in the Datarow + // seems that the texture colum is being treated as a string in the Datarow // if you do a .getType() on it, it returns string, while the other columns return correct type // MW[10-08-07] // Added following xml hack but not really ideal , also ExtraParams isn't currently part of the database @@ -738,7 +738,7 @@ namespace OpenSim.DataStore.MSSQL fillShapeRow(shapeRow, prim); } } - + // see IRegionDatastore public void StorePrimInventory(LLUUID primID, ICollection items) { @@ -868,7 +868,7 @@ namespace OpenSim.DataStore.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 diff --git a/OpenSim/TestSuite/PhysicsBot.cs b/OpenSim/TestSuite/PhysicsBot.cs index 3d6b54c..a7bbe80 100644 --- a/OpenSim/TestSuite/PhysicsBot.cs +++ b/OpenSim/TestSuite/PhysicsBot.cs @@ -54,13 +54,13 @@ namespace OpenSim.TestSuite protected Random somthing = new Random(Environment.TickCount);// We do stuff randomly here - + //New instance of a SecondLife client public SecondLife client = new SecondLife(); protected string[] talkarray; /// - /// + /// /// /// nini config for the bot public PhysicsBot(IConfig bsconfig) @@ -70,7 +70,7 @@ namespace OpenSim.TestSuite talkarray = readexcuses(); } - //We do our actions here. This is where one would + //We do our actions here. This is where one would //add additional steps and/or things the bot should do void m_action_Elapsed(object sender, ElapsedEventArgs e) diff --git a/OpenSim/TestSuite/Util.cs b/OpenSim/TestSuite/Util.cs index c82391b..5823af4 100644 --- a/OpenSim/TestSuite/Util.cs +++ b/OpenSim/TestSuite/Util.cs @@ -36,13 +36,13 @@ namespace OpenSim.TestSuite Pass = 1, Skip = 3 } - + private static String ResultToString(Result r) { if (r == Result.Pass) { return "PASS"; - } + } else if (r == Result.Fail) { return "FAIL"; @@ -51,30 +51,30 @@ namespace OpenSim.TestSuite { return "SKIP"; } - else + else { return "UNKNOWN"; } } - + private static void TestResult(Result r, String msg) { Console.WriteLine("[{0}]: {1}", ResultToString(r), msg); } - + public static void TestFail(String msg) { TestResult(Result.Fail, msg); } - + public static void TestPass(String msg) { TestResult(Result.Pass, msg); } - + public static void TestSkip(String msg) { - TestResult(Result.Skip, msg); + TestResult(Result.Skip, msg); } } } diff --git a/OpenSim/Tests/Common/DoubleToleranceConstraint.cs b/OpenSim/Tests/Common/DoubleToleranceConstraint.cs index a766549..c7a6ecc 100644 --- a/OpenSim/Tests/Common/DoubleToleranceConstraint.cs +++ b/OpenSim/Tests/Common/DoubleToleranceConstraint.cs @@ -39,9 +39,9 @@ namespace OpenSim.Tests.Common { _baseValue = baseValue; } - + /// - ///Test whether the constraint is satisfied by a given value + ///Test whether the constraint is satisfied by a given value /// ///The value to be tested /// @@ -70,7 +70,7 @@ namespace OpenSim.Tests.Common public override void WriteActualValueTo(MessageWriter writer) { - writer.WriteActualValue(_valueToBeTested); + writer.WriteActualValue(_valueToBeTested); } } } diff --git a/OpenSim/Tests/Common/VectorToleranceConstraint.cs b/OpenSim/Tests/Common/VectorToleranceConstraint.cs index 2b60db3..249fe09 100644 --- a/OpenSim/Tests/Common/VectorToleranceConstraint.cs +++ b/OpenSim/Tests/Common/VectorToleranceConstraint.cs @@ -42,7 +42,7 @@ namespace OpenSim.Tests.Common } /// - ///Test whether the constraint is satisfied by a given value + ///Test whether the constraint is satisfied by a given value /// ///The value to be tested /// diff --git a/OpenSim/Tests/Inventory/Properties/AssemblyInfo.cs b/OpenSim/Tests/Inventory/Properties/AssemblyInfo.cs index 76b30b7..eb4da1c 100644 --- a/OpenSim/Tests/Inventory/Properties/AssemblyInfo.cs +++ b/OpenSim/Tests/Inventory/Properties/AssemblyInfo.cs @@ -29,7 +29,7 @@ using System.Reflection; using System.Runtime.CompilerServices; 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. [assembly: AssemblyTitle("Inventory")] @@ -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)] @@ -52,11 +52,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")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Tests/UserServer/Stress/UserServerStressTest.cs b/OpenSim/Tests/UserServer/Stress/UserServerStressTest.cs index 711e8b4..99c7277 100644 --- a/OpenSim/Tests/UserServer/Stress/UserServerStressTest.cs +++ b/OpenSim/Tests/UserServer/Stress/UserServerStressTest.cs @@ -36,7 +36,7 @@ namespace OpenSim.Tests.UserServer.Stress public class UserServerStressTest { public static void Main(string[] args) - { + { XmlConfigurator.Configure(); Console.WriteLine("Aborting - not yet functional"); diff --git a/OpenSim/Tools/LaunchSLClient/LaunchSLClient/Properties/AssemblyInfo.cs b/OpenSim/Tools/LaunchSLClient/LaunchSLClient/Properties/AssemblyInfo.cs index 62af735..797580d 100644 --- a/OpenSim/Tools/LaunchSLClient/LaunchSLClient/Properties/AssemblyInfo.cs +++ b/OpenSim/Tools/LaunchSLClient/LaunchSLClient/Properties/AssemblyInfo.cs @@ -29,7 +29,7 @@ using System.Reflection; using System.Runtime.CompilerServices; 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. [assembly: AssemblyTitle("LaunchSLClient")] @@ -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)] @@ -52,7 +52,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/Tools/OpenSim.32BitLaunch/Properties/AssemblyInfo.cs b/OpenSim/Tools/OpenSim.32BitLaunch/Properties/AssemblyInfo.cs index 637fb09..74fedfa 100644 --- a/OpenSim/Tools/OpenSim.32BitLaunch/Properties/AssemblyInfo.cs +++ b/OpenSim/Tools/OpenSim.32BitLaunch/Properties/AssemblyInfo.cs @@ -29,7 +29,7 @@ using System.Reflection; using System.Runtime.CompilerServices; 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. [assembly: AssemblyTitle("OpenSim.32BitLaunch")] @@ -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)] @@ -52,11 +52,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.*")] [assembly: AssemblyVersion("1.0.0.0")] diff --git a/OpenSim/Tools/OpenSim.GUI/Main.Designer.cs b/OpenSim/Tools/OpenSim.GUI/Main.Designer.cs index e1481a2..af29bce 100644 --- a/OpenSim/Tools/OpenSim.GUI/Main.Designer.cs +++ b/OpenSim/Tools/OpenSim.GUI/Main.Designer.cs @@ -168,9 +168,9 @@ namespace OpenSim.GUI this.tabAssetServer.SuspendLayout(); this.tabGridServer.SuspendLayout(); this.SuspendLayout(); - // + // // menuStrip1 - // + // this.menuStrip1.AutoSize = false; this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.fileToolStripMenuItem}); @@ -179,36 +179,36 @@ namespace OpenSim.GUI this.menuStrip1.Size = new System.Drawing.Size(900, 20); this.menuStrip1.TabIndex = 7; this.menuStrip1.Text = "menuStrip1"; - // + // // fileToolStripMenuItem - // + // this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.exitToolStripMenuItem}); this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 16); this.fileToolStripMenuItem.Text = "File"; - // + // // exitToolStripMenuItem - // + // this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; this.exitToolStripMenuItem.Size = new System.Drawing.Size(130, 22); this.exitToolStripMenuItem.Text = "Exit Cleanly"; this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); - // + // // timer1 - // + // this.timer1.Enabled = true; - // + // // clientBox1 - // + // this.clientBox1.Location = new System.Drawing.Point(680, 27); this.clientBox1.Name = "clientBox1"; this.clientBox1.Size = new System.Drawing.Size(213, 20); this.clientBox1.TabIndex = 8; this.clientBox1.Text = "C://Secondlife//"; - // + // // btnStart - // + // this.btnStart.Location = new System.Drawing.Point(7, 366); this.btnStart.Name = "btnStart"; this.btnStart.Size = new System.Drawing.Size(80, 23); @@ -216,9 +216,9 @@ namespace OpenSim.GUI this.btnStart.Text = "Start"; this.btnStart.UseVisualStyleBackColor = true; this.btnStart.Click += new System.EventHandler(this.btnStart_Click); - // + // // btnStop - // + // this.btnStop.Location = new System.Drawing.Point(92, 366); this.btnStop.Name = "btnStop"; this.btnStop.Size = new System.Drawing.Size(80, 23); @@ -226,9 +226,9 @@ namespace OpenSim.GUI this.btnStop.Text = "Stop"; this.btnStop.UseVisualStyleBackColor = true; this.btnStop.Click += new System.EventHandler(this.btnStop_Click); - // + // // rbGridRegionMode - // + // this.rbGridRegionMode.AutoSize = true; this.rbGridRegionMode.Location = new System.Drawing.Point(96, 27); this.rbGridRegionMode.Name = "rbGridRegionMode"; @@ -237,9 +237,9 @@ namespace OpenSim.GUI this.rbGridRegionMode.Text = "Grid region"; this.rbGridRegionMode.UseVisualStyleBackColor = true; this.rbGridRegionMode.CheckedChanged += new System.EventHandler(this.rbGridRegionMode_CheckedChanged); - // + // // rbStandAloneMode - // + // this.rbStandAloneMode.AutoSize = true; this.rbStandAloneMode.Checked = true; this.rbStandAloneMode.Location = new System.Drawing.Point(8, 27); @@ -250,9 +250,9 @@ namespace OpenSim.GUI this.rbStandAloneMode.Text = "Stand alone"; this.rbStandAloneMode.UseVisualStyleBackColor = true; this.rbStandAloneMode.CheckedChanged += new System.EventHandler(this.rbStandAloneMode_CheckedChanged); - // + // // rbGridServer - // + // this.rbGridServer.AutoSize = true; this.rbGridServer.Location = new System.Drawing.Point(178, 27); this.rbGridServer.Name = "rbGridServer"; @@ -261,9 +261,9 @@ namespace OpenSim.GUI this.rbGridServer.Text = "Grid server"; this.rbGridServer.UseVisualStyleBackColor = true; this.rbGridServer.CheckedChanged += new System.EventHandler(this.rbGridServer_CheckedChanged); - // + // // Launch1 - // + // this.Launch1.Location = new System.Drawing.Point(264, 366); this.Launch1.Name = "Launch1"; this.Launch1.Size = new System.Drawing.Size(80, 23); @@ -271,9 +271,9 @@ namespace OpenSim.GUI this.Launch1.Text = "Client Launch"; this.Launch1.UseVisualStyleBackColor = true; this.Launch1.Click += new System.EventHandler(this.Launch1_Click); - // + // // gbLog - // + // this.gbLog.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); @@ -284,9 +284,9 @@ namespace OpenSim.GUI this.gbLog.TabIndex = 1; this.gbLog.TabStop = false; this.gbLog.Text = "Logs"; - // + // // tabLogs - // + // this.tabLogs.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); @@ -300,9 +300,9 @@ namespace OpenSim.GUI this.tabLogs.SelectedIndex = 0; this.tabLogs.Size = new System.Drawing.Size(333, 285); this.tabLogs.TabIndex = 0; - // + // // tabMainLog - // + // this.tabMainLog.Controls.Add(this.txtMainLog); this.tabMainLog.Location = new System.Drawing.Point(4, 22); this.tabMainLog.Name = "tabMainLog"; @@ -310,9 +310,9 @@ namespace OpenSim.GUI this.tabMainLog.TabIndex = 4; this.tabMainLog.Text = "Main log"; this.tabMainLog.UseVisualStyleBackColor = true; - // + // // txtMainLog - // + // this.txtMainLog.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); @@ -322,9 +322,9 @@ namespace OpenSim.GUI this.txtMainLog.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; this.txtMainLog.Size = new System.Drawing.Size(325, 259); this.txtMainLog.TabIndex = 1; - // + // // tabRegionServer - // + // this.tabRegionServer.Controls.Add(this.txtInputRegionServer); this.tabRegionServer.Controls.Add(this.label1); this.tabRegionServer.Controls.Add(this.txtOpenSim); @@ -335,25 +335,25 @@ namespace OpenSim.GUI this.tabRegionServer.TabIndex = 0; this.tabRegionServer.Text = "Region server"; this.tabRegionServer.UseVisualStyleBackColor = true; - // + // // txtInputRegionServer - // + // this.txtInputRegionServer.Location = new System.Drawing.Point(53, 239); this.txtInputRegionServer.Name = "txtInputRegionServer"; this.txtInputRegionServer.Size = new System.Drawing.Size(272, 20); this.txtInputRegionServer.TabIndex = 5; - // + // // label1 - // + // this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(0, 242); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(57, 13); this.label1.TabIndex = 4; this.label1.Text = "Command:"; - // + // // txtOpenSim - // + // this.txtOpenSim.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); @@ -363,9 +363,9 @@ namespace OpenSim.GUI this.txtOpenSim.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; this.txtOpenSim.Size = new System.Drawing.Size(325, 236); this.txtOpenSim.TabIndex = 0; - // + // // tabUserServer - // + // this.tabUserServer.Controls.Add(this.txtInputUserServer); this.tabUserServer.Controls.Add(this.label2); this.tabUserServer.Controls.Add(this.txtUserServer); @@ -376,25 +376,25 @@ namespace OpenSim.GUI this.tabUserServer.TabIndex = 1; this.tabUserServer.Text = "User server"; this.tabUserServer.UseVisualStyleBackColor = true; - // + // // txtInputUserServer - // + // this.txtInputUserServer.Location = new System.Drawing.Point(53, 239); this.txtInputUserServer.Name = "txtInputUserServer"; this.txtInputUserServer.Size = new System.Drawing.Size(272, 20); this.txtInputUserServer.TabIndex = 7; - // + // // label2 - // + // this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(0, 242); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(57, 13); this.label2.TabIndex = 6; this.label2.Text = "Command:"; - // + // // txtUserServer - // + // this.txtUserServer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); @@ -404,9 +404,9 @@ namespace OpenSim.GUI this.txtUserServer.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; this.txtUserServer.Size = new System.Drawing.Size(325, 236); this.txtUserServer.TabIndex = 1; - // + // // tabAssetServer - // + // this.tabAssetServer.Controls.Add(this.txtInputAssetServer); this.tabAssetServer.Controls.Add(this.label3); this.tabAssetServer.Controls.Add(this.txtAssetServer); @@ -416,25 +416,25 @@ namespace OpenSim.GUI this.tabAssetServer.TabIndex = 2; this.tabAssetServer.Text = "Asset server"; this.tabAssetServer.UseVisualStyleBackColor = true; - // + // // txtInputAssetServer - // + // this.txtInputAssetServer.Location = new System.Drawing.Point(53, 239); this.txtInputAssetServer.Name = "txtInputAssetServer"; this.txtInputAssetServer.Size = new System.Drawing.Size(272, 20); this.txtInputAssetServer.TabIndex = 7; - // + // // label3 - // + // this.label3.AutoSize = true; this.label3.Location = new System.Drawing.Point(0, 242); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(57, 13); this.label3.TabIndex = 6; this.label3.Text = "Command:"; - // + // // txtAssetServer - // + // this.txtAssetServer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); @@ -444,9 +444,9 @@ namespace OpenSim.GUI this.txtAssetServer.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; this.txtAssetServer.Size = new System.Drawing.Size(325, 236); this.txtAssetServer.TabIndex = 1; - // + // // tabGridServer - // + // this.tabGridServer.Controls.Add(this.txtInputGridServer); this.tabGridServer.Controls.Add(this.label4); this.tabGridServer.Controls.Add(this.txtGridServer); @@ -456,25 +456,25 @@ namespace OpenSim.GUI this.tabGridServer.TabIndex = 3; this.tabGridServer.Text = "Grid server"; this.tabGridServer.UseVisualStyleBackColor = true; - // + // // txtInputGridServer - // + // this.txtInputGridServer.Location = new System.Drawing.Point(53, 239); this.txtInputGridServer.Name = "txtInputGridServer"; this.txtInputGridServer.Size = new System.Drawing.Size(272, 20); this.txtInputGridServer.TabIndex = 7; - // + // // label4 - // + // this.label4.AutoSize = true; this.label4.Location = new System.Drawing.Point(0, 242); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(57, 13); this.label4.TabIndex = 6; this.label4.Text = "Command:"; - // + // // txtGridServer - // + // this.txtGridServer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); @@ -484,9 +484,9 @@ namespace OpenSim.GUI this.txtGridServer.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; this.txtGridServer.Size = new System.Drawing.Size(325, 236); this.txtGridServer.TabIndex = 1; - // + // // label5 - // + // this.label5.AutoSize = true; this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label5.Location = new System.Drawing.Point(460, 55); @@ -494,9 +494,9 @@ namespace OpenSim.GUI this.label5.Size = new System.Drawing.Size(205, 20); this.label5.TabIndex = 11; this.label5.Text = "Command Line Switches"; - // + // // noProbe1 - // + // this.noProbe1.AutoSize = true; this.noProbe1.Location = new System.Drawing.Point(359, 275); this.noProbe1.Name = "noProbe1"; @@ -505,18 +505,18 @@ namespace OpenSim.GUI this.noProbe1.Text = "-noprobe"; this.toolTip1.SetToolTip(this.noProbe1, "disable hardware probe"); this.noProbe1.UseVisualStyleBackColor = true; - // + // // label6 - // + // this.label6.AutoSize = true; this.label6.Location = new System.Drawing.Point(8, 415); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(0, 13); this.label6.TabIndex = 14; this.label6.Click += new System.EventHandler(this.label6_Click); - // + // // multiple1 - // + // this.multiple1.AutoSize = true; this.multiple1.Location = new System.Drawing.Point(359, 185); this.multiple1.Name = "multiple1"; @@ -525,9 +525,9 @@ namespace OpenSim.GUI this.multiple1.Text = "-multiple"; this.toolTip1.SetToolTip(this.multiple1, "allow multiple viewers"); this.multiple1.UseVisualStyleBackColor = true; - // + // // label7 - // + // this.label7.AutoSize = true; this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label7.Location = new System.Drawing.Point(8, 396); @@ -535,9 +535,9 @@ namespace OpenSim.GUI this.label7.Size = new System.Drawing.Size(338, 13); this.label7.TabIndex = 16; this.label7.Text = "Client Command Line String Used and Program Messages :"; - // + // // noMultiple1 - // + // this.noMultiple1.AutoSize = true; this.noMultiple1.Location = new System.Drawing.Point(359, 260); this.noMultiple1.Name = "noMultiple1"; @@ -546,9 +546,9 @@ namespace OpenSim.GUI this.noMultiple1.Text = "-nomultiple"; this.toolTip1.SetToolTip(this.noMultiple1, "block multiple viewers (secondlife.exe instances)"); this.noMultiple1.UseVisualStyleBackColor = true; - // + // // ignorepixeldepth1 - // + // this.ignorepixeldepth1.AutoSize = true; this.ignorepixeldepth1.Location = new System.Drawing.Point(359, 125); this.ignorepixeldepth1.Name = "ignorepixeldepth1"; @@ -557,9 +557,9 @@ namespace OpenSim.GUI this.ignorepixeldepth1.Text = "-ignorepixeldepth"; this.toolTip1.SetToolTip(this.ignorepixeldepth1, "ignore pixel depth settings"); this.ignorepixeldepth1.UseVisualStyleBackColor = true; - // + // // nothread1 - // + // this.nothread1.AutoSize = true; this.nothread1.Location = new System.Drawing.Point(359, 305); this.nothread1.Name = "nothread1"; @@ -568,9 +568,9 @@ namespace OpenSim.GUI this.nothread1.Text = "-nothread"; this.toolTip1.SetToolTip(this.nothread1, "run VFS (Virtual File System) in single thread"); this.nothread1.UseVisualStyleBackColor = true; - // + // // safe1 - // + // this.safe1.AutoSize = true; this.safe1.Location = new System.Drawing.Point(359, 365); this.safe1.Name = "safe1"; @@ -579,9 +579,9 @@ namespace OpenSim.GUI this.safe1.Text = "-safe"; this.toolTip1.SetToolTip(this.safe1, "reset preferences, run in safe mode"); this.safe1.UseVisualStyleBackColor = true; - // + // // noconsole1 - // + // this.noconsole1.AutoSize = true; this.noconsole1.Location = new System.Drawing.Point(359, 215); this.noconsole1.Name = "noconsole1"; @@ -590,9 +590,9 @@ namespace OpenSim.GUI this.noconsole1.Text = "-noconsole"; this.toolTip1.SetToolTip(this.noconsole1, "hide the console if not already hidden"); this.noconsole1.UseVisualStyleBackColor = true; - // + // // log1 - // + // this.log1.AutoSize = true; this.log1.Location = new System.Drawing.Point(359, 170); this.log1.Name = "log1"; @@ -601,9 +601,9 @@ namespace OpenSim.GUI this.log1.Text = "-log"; this.toolTip1.SetToolTip(this.log1, "--no info avail--"); this.log1.UseVisualStyleBackColor = true; - // + // // helperuri1 - // + // this.helperuri1.AutoSize = true; this.helperuri1.Location = new System.Drawing.Point(359, 110); this.helperuri1.Name = "helperuri1"; @@ -612,9 +612,9 @@ namespace OpenSim.GUI this.helperuri1.Text = "-helperuri"; this.toolTip1.SetToolTip(this.helperuri1, "--no info avail--"); this.helperuri1.UseVisualStyleBackColor = true; - // + // // autologin1 - // + // this.autologin1.AutoSize = true; this.autologin1.Location = new System.Drawing.Point(359, 65); this.autologin1.Name = "autologin1"; @@ -623,9 +623,9 @@ namespace OpenSim.GUI this.autologin1.Text = "--autologin"; this.toolTip1.SetToolTip(this.autologin1, "--no info avail--"); this.autologin1.UseVisualStyleBackColor = true; - // + // // dialog1 - // + // this.dialog1.AutoSize = true; this.dialog1.Location = new System.Drawing.Point(359, 95); this.dialog1.Name = "dialog1"; @@ -634,9 +634,9 @@ namespace OpenSim.GUI this.dialog1.Text = "-dialog"; this.toolTip1.SetToolTip(this.dialog1, "some arcane dialog box that is impossible to raise"); this.dialog1.UseVisualStyleBackColor = true; - // + // // previous1 - // + // this.previous1.AutoSize = true; this.previous1.Location = new System.Drawing.Point(359, 335); this.previous1.Name = "previous1"; @@ -645,9 +645,9 @@ namespace OpenSim.GUI this.previous1.Text = "-previous"; this.toolTip1.SetToolTip(this.previous1, "--no info avail--"); this.previous1.UseVisualStyleBackColor = true; - // + // // simple1 - // + // this.simple1.AutoSize = true; this.simple1.Location = new System.Drawing.Point(359, 380); this.simple1.Name = "simple1"; @@ -656,9 +656,9 @@ namespace OpenSim.GUI this.simple1.Text = "-simple"; this.toolTip1.SetToolTip(this.simple1, "--no info avail--"); this.simple1.UseVisualStyleBackColor = true; - // + // // noinvlib1 - // + // this.noinvlib1.AutoSize = true; this.noinvlib1.Location = new System.Drawing.Point(359, 245); this.noinvlib1.Name = "noinvlib1"; @@ -667,9 +667,9 @@ namespace OpenSim.GUI this.noinvlib1.Text = "-noinvlib"; this.toolTip1.SetToolTip(this.noinvlib1, "do not request inventory library"); this.noinvlib1.UseVisualStyleBackColor = true; - // + // // debugst1 - // + // this.debugst1.AutoSize = true; this.debugst1.Location = new System.Drawing.Point(359, 80); this.debugst1.Name = "debugst1"; @@ -678,9 +678,9 @@ namespace OpenSim.GUI this.debugst1.Text = "-debugst"; this.toolTip1.SetToolTip(this.debugst1, "debug mask"); this.debugst1.UseVisualStyleBackColor = true; - // + // // spanish1 - // + // this.spanish1.AutoSize = true; this.spanish1.Location = new System.Drawing.Point(359, 395); this.spanish1.Name = "spanish1"; @@ -689,9 +689,9 @@ namespace OpenSim.GUI this.spanish1.Text = "-spanish"; this.toolTip1.SetToolTip(this.spanish1, "activate (incomplete) Spanish UI translation"); this.spanish1.UseVisualStyleBackColor = true; - // + // // korean1 - // + // this.korean1.AutoSize = true; this.korean1.Location = new System.Drawing.Point(359, 140); this.korean1.Name = "korean1"; @@ -700,9 +700,9 @@ namespace OpenSim.GUI this.korean1.Text = "-korean"; this.toolTip1.SetToolTip(this.korean1, "activate (incomplete) Korean UI translation"); this.korean1.UseVisualStyleBackColor = true; - // + // // local1 - // + // this.local1.AutoSize = true; this.local1.Location = new System.Drawing.Point(359, 155); this.local1.Name = "local1"; @@ -711,9 +711,9 @@ namespace OpenSim.GUI this.local1.Text = "-local"; this.toolTip1.SetToolTip(this.local1, "run without simulator"); this.local1.UseVisualStyleBackColor = true; - // + // // purge1 - // + // this.purge1.AutoSize = true; this.purge1.Location = new System.Drawing.Point(359, 350); this.purge1.Name = "purge1"; @@ -722,9 +722,9 @@ namespace OpenSim.GUI this.purge1.Text = "-purge"; this.toolTip1.SetToolTip(this.purge1, "delete files in cache"); this.purge1.UseVisualStyleBackColor = true; - // + // // nofmod1 - // + // this.nofmod1.AutoSize = true; this.nofmod1.Location = new System.Drawing.Point(359, 230); this.nofmod1.Name = "nofmod1"; @@ -733,9 +733,9 @@ namespace OpenSim.GUI this.nofmod1.Text = "-nofmod"; this.toolTip1.SetToolTip(this.nofmod1, "FMOD is the API used to distort sound while moving"); this.nofmod1.UseVisualStyleBackColor = true; - // + // // noaudio1 - // + // this.noaudio1.AutoSize = true; this.noaudio1.Location = new System.Drawing.Point(359, 200); this.noaudio1.Name = "noaudio1"; @@ -744,9 +744,9 @@ namespace OpenSim.GUI this.noaudio1.Text = "-noaudio"; this.toolTip1.SetToolTip(this.noaudio1, "no audio, different from -nosound?"); this.noaudio1.UseVisualStyleBackColor = true; - // + // // nosound1 - // + // this.nosound1.AutoSize = true; this.nosound1.Location = new System.Drawing.Point(359, 290); this.nosound1.Name = "nosound1"; @@ -755,9 +755,9 @@ namespace OpenSim.GUI this.nosound1.Text = "-nosound"; this.toolTip1.SetToolTip(this.nosound1, "no sound, different from -noaudio?"); this.nosound1.UseVisualStyleBackColor = true; - // + // // url1 - // + // this.url1.AutoSize = true; this.url1.Location = new System.Drawing.Point(488, 245); this.url1.Name = "url1"; @@ -766,9 +766,9 @@ namespace OpenSim.GUI this.url1.Text = "-url"; this.toolTip1.SetToolTip(this.url1, "handles secondlife://sim/x/y/z URLs"); this.url1.UseVisualStyleBackColor = true; - // + // // port1 - // + // this.port1.AutoSize = true; this.port1.Location = new System.Drawing.Point(488, 171); this.port1.Name = "port1"; @@ -779,27 +779,27 @@ namespace OpenSim.GUI "me local home network. Values that may work: 13000 and 13001 (Valid numbers are " + "13000 to 13050)"); this.port1.UseVisualStyleBackColor = true; - // + // // simBox1 - // + // this.simBox1.Location = new System.Drawing.Point(549, 243); this.simBox1.Name = "simBox1"; this.simBox1.Size = new System.Drawing.Size(344, 20); this.simBox1.TabIndex = 66; this.simBox1.Text = "secondlife://lutra/127/128/60"; this.toolTip1.SetToolTip(this.simBox1, "type URL here"); - // + // // portBox1 - // + // this.portBox1.Location = new System.Drawing.Point(549, 169); this.portBox1.Name = "portBox1"; this.portBox1.Size = new System.Drawing.Size(58, 20); this.portBox1.TabIndex = 67; this.portBox1.Text = "13000"; this.toolTip1.SetToolTip(this.portBox1, "enter port number here"); - // + // // user1 - // + // this.user1.AutoSize = true; this.user1.Location = new System.Drawing.Point(488, 191); this.user1.Name = "user1"; @@ -809,9 +809,9 @@ namespace OpenSim.GUI this.user1.ThreeState = true; this.toolTip1.SetToolTip(this.user1, "specify user server in dotted quad"); this.user1.UseVisualStyleBackColor = true; - // + // // quitAfter1 - // + // this.quitAfter1.AutoSize = true; this.quitAfter1.Location = new System.Drawing.Point(680, 65); this.quitAfter1.Name = "quitAfter1"; @@ -820,9 +820,9 @@ namespace OpenSim.GUI this.quitAfter1.Text = "-quitafter"; this.toolTip1.SetToolTip(this.quitAfter1, "SL quits after elapsed time in seconds"); this.quitAfter1.UseVisualStyleBackColor = true; - // + // // techTag1 - // + // this.techTag1.AutoSize = true; this.techTag1.Location = new System.Drawing.Point(488, 211); this.techTag1.Name = "techTag1"; @@ -831,9 +831,9 @@ namespace OpenSim.GUI this.techTag1.Text = "-techtag"; this.toolTip1.SetToolTip(this.techTag1, "unknown (but requires a parameter)"); this.techTag1.UseVisualStyleBackColor = true; - // + // // yield1 - // + // this.yield1.AutoSize = true; this.yield1.Location = new System.Drawing.Point(488, 91); this.yield1.Name = "yield1"; @@ -842,9 +842,9 @@ namespace OpenSim.GUI this.yield1.Text = "-yield"; this.toolTip1.SetToolTip(this.yield1, "yield some idle time to local host (changed from - cooperative)"); this.yield1.UseVisualStyleBackColor = true; - // + // // logfile1 - // + // this.logfile1.AutoSize = true; this.logfile1.Location = new System.Drawing.Point(680, 125); this.logfile1.Name = "logfile1"; @@ -853,9 +853,9 @@ namespace OpenSim.GUI this.logfile1.Text = "-logfile"; this.toolTip1.SetToolTip(this.logfile1, "change the log filename"); this.logfile1.UseVisualStyleBackColor = true; - // + // // settings1 - // + // this.settings1.AutoSize = true; this.settings1.Location = new System.Drawing.Point(680, 95); this.settings1.Name = "settings1"; @@ -864,9 +864,9 @@ namespace OpenSim.GUI this.settings1.Text = "-settings"; this.toolTip1.SetToolTip(this.settings1, "specify configuration filename; default is \"settings.ini\""); this.settings1.UseVisualStyleBackColor = true; - // + // // outbw1 - // + // this.outbw1.AutoSize = true; this.outbw1.Location = new System.Drawing.Point(488, 111); this.outbw1.Name = "outbw1"; @@ -875,9 +875,9 @@ namespace OpenSim.GUI this.outbw1.Text = "-outbw"; this.toolTip1.SetToolTip(this.outbw1, "set outgoing bandwidth"); this.outbw1.UseVisualStyleBackColor = true; - // + // // inbw1 - // + // this.inbw1.AutoSize = true; this.inbw1.Location = new System.Drawing.Point(488, 131); this.inbw1.Name = "inbw1"; @@ -886,9 +886,9 @@ namespace OpenSim.GUI this.inbw1.Text = "-inbw"; this.toolTip1.SetToolTip(this.inbw1, "set incoming bandwidth"); this.inbw1.UseVisualStyleBackColor = true; - // + // // drop1 - // + // this.drop1.AutoSize = true; this.drop1.Location = new System.Drawing.Point(488, 151); this.drop1.Name = "drop1"; @@ -897,76 +897,76 @@ namespace OpenSim.GUI this.drop1.Text = "-drop"; this.toolTip1.SetToolTip(this.drop1, "drop number% of incoming network packets"); this.drop1.UseVisualStyleBackColor = true; - // + // // dropBox1 - // + // this.dropBox1.Location = new System.Drawing.Point(549, 149); this.dropBox1.Name = "dropBox1"; this.dropBox1.Size = new System.Drawing.Size(58, 20); this.dropBox1.TabIndex = 68; this.dropBox1.Text = "0"; this.toolTip1.SetToolTip(this.dropBox1, "enter percent of packets to drop"); - // + // // inbwBox1 - // + // this.inbwBox1.Location = new System.Drawing.Point(549, 129); this.inbwBox1.Name = "inbwBox1"; this.inbwBox1.Size = new System.Drawing.Size(57, 20); this.inbwBox1.TabIndex = 69; this.toolTip1.SetToolTip(this.inbwBox1, "enter incoming cap"); - // + // // outbwBox1 - // + // this.outbwBox1.Location = new System.Drawing.Point(549, 109); this.outbwBox1.Name = "outbwBox1"; this.outbwBox1.Size = new System.Drawing.Size(58, 20); this.outbwBox1.TabIndex = 70; this.toolTip1.SetToolTip(this.outbwBox1, "enter outgoing cap"); - // + // // settingsBox1 - // + // this.settingsBox1.Location = new System.Drawing.Point(741, 93); this.settingsBox1.Name = "settingsBox1"; this.settingsBox1.Size = new System.Drawing.Size(152, 20); this.settingsBox1.TabIndex = 71; this.settingsBox1.Text = "settings.ini"; this.toolTip1.SetToolTip(this.settingsBox1, "enter settings file name"); - // + // // logfileBox1 - // + // this.logfileBox1.Location = new System.Drawing.Point(733, 123); this.logfileBox1.Name = "logfileBox1"; this.logfileBox1.Size = new System.Drawing.Size(160, 20); this.logfileBox1.TabIndex = 72; this.logfileBox1.Text = "mylogfile.txt"; this.toolTip1.SetToolTip(this.logfileBox1, "enter log file name here"); - // + // // yieldBox1 - // + // this.yieldBox1.Location = new System.Drawing.Point(549, 89); this.yieldBox1.Name = "yieldBox1"; this.yieldBox1.Size = new System.Drawing.Size(58, 20); this.yieldBox1.TabIndex = 73; this.toolTip1.SetToolTip(this.yieldBox1, "enter time to yield in "); - // + // // techtagBox1 - // + // this.techtagBox1.Location = new System.Drawing.Point(549, 209); this.techtagBox1.Name = "techtagBox1"; this.techtagBox1.Size = new System.Drawing.Size(58, 20); this.techtagBox1.TabIndex = 74; this.toolTip1.SetToolTip(this.techtagBox1, "enter unknown param here"); - // + // // quitafterBox1 - // + // this.quitafterBox1.Location = new System.Drawing.Point(745, 63); this.quitafterBox1.Name = "quitafterBox1"; this.quitafterBox1.Size = new System.Drawing.Size(148, 20); this.quitafterBox1.TabIndex = 75; this.toolTip1.SetToolTip(this.quitafterBox1, "enter time in seconds"); - // + // // comboBox1 - // + // this.comboBox1.FormattingEnabled = true; this.comboBox1.Items.AddRange(new object[] { "agni", @@ -980,9 +980,9 @@ namespace OpenSim.GUI this.comboBox1.TabIndex = 76; this.comboBox1.Text = "agni"; this.toolTip1.SetToolTip(this.comboBox1, "select LL user server"); - // + // // loginuri1 - // + // this.loginuri1.AutoSize = true; this.loginuri1.Location = new System.Drawing.Point(488, 275); this.loginuri1.Name = "loginuri1"; @@ -991,18 +991,18 @@ namespace OpenSim.GUI this.loginuri1.Text = "-loginuri"; this.toolTip1.SetToolTip(this.loginuri1, "login server and CGI script to use"); this.loginuri1.UseVisualStyleBackColor = true; - // + // // loginuriBox1 - // + // this.loginuriBox1.Location = new System.Drawing.Point(549, 273); this.loginuriBox1.Name = "loginuriBox1"; this.loginuriBox1.Size = new System.Drawing.Size(344, 20); this.loginuriBox1.TabIndex = 78; this.loginuriBox1.Text = "localhost:9000"; this.toolTip1.SetToolTip(this.loginuriBox1, "enter login url here"); - // + // // set1 - // + // this.set1.AutoSize = true; this.set1.Location = new System.Drawing.Point(636, 185); this.set1.Name = "set1"; @@ -1012,18 +1012,18 @@ namespace OpenSim.GUI this.toolTip1.SetToolTip(this.set1, "specify value of a particular configuration variable; can be used multiple times " + "in a single command-line"); this.set1.UseVisualStyleBackColor = true; - // + // // setBox1 - // + // this.setBox1.Location = new System.Drawing.Point(680, 183); this.setBox1.Name = "setBox1"; this.setBox1.Size = new System.Drawing.Size(213, 20); this.setBox1.TabIndex = 80; this.setBox1.Text = "SystemLanguage en-us"; this.toolTip1.SetToolTip(this.setBox1, "enter params"); - // + // // errmask1 - // + // this.errmask1.AutoSize = true; this.errmask1.Location = new System.Drawing.Point(636, 154); this.errmask1.Name = "errmask1"; @@ -1032,9 +1032,9 @@ namespace OpenSim.GUI this.errmask1.Text = "-errmask"; this.toolTip1.SetToolTip(this.errmask1, "32-bit bitmask for error type mask"); this.errmask1.UseVisualStyleBackColor = true; - // + // // skin1 - // + // this.skin1.AutoSize = true; this.skin1.Location = new System.Drawing.Point(635, 215); this.skin1.Name = "skin1"; @@ -1043,9 +1043,9 @@ namespace OpenSim.GUI this.skin1.Text = "-skin"; this.toolTip1.SetToolTip(this.skin1, "load skins//skin.xml as the default UI appearance (incomplete)"); this.skin1.UseVisualStyleBackColor = true; - // + // // login1 - // + // this.login1.AutoSize = true; this.login1.Location = new System.Drawing.Point(457, 304); this.login1.Name = "login1"; @@ -1054,44 +1054,44 @@ namespace OpenSim.GUI this.login1.Text = "-login"; this.toolTip1.SetToolTip(this.login1, "log in as a user"); this.login1.UseVisualStyleBackColor = true; - // + // // errmaskBox1 - // + // this.errmaskBox1.Location = new System.Drawing.Point(704, 153); this.errmaskBox1.Name = "errmaskBox1"; this.errmaskBox1.Size = new System.Drawing.Size(189, 20); this.errmaskBox1.TabIndex = 84; this.toolTip1.SetToolTip(this.errmaskBox1, "32-bit bitmask for error type mask"); - // + // // skinBox1 - // + // this.skinBox1.Location = new System.Drawing.Point(679, 213); this.skinBox1.Name = "skinBox1"; this.skinBox1.Size = new System.Drawing.Size(214, 20); this.skinBox1.TabIndex = 85; this.skinBox1.Text = "C://Secondlife//"; this.toolTip1.SetToolTip(this.skinBox1, "enter directory where skin.xml is"); - // + // // firstBox1 - // + // this.firstBox1.Location = new System.Drawing.Point(549, 303); this.firstBox1.Name = "firstBox1"; this.firstBox1.Size = new System.Drawing.Size(80, 20); this.firstBox1.TabIndex = 86; this.firstBox1.Text = "Test"; this.toolTip1.SetToolTip(this.firstBox1, "firstname"); - // + // // lastBox1 - // + // this.lastBox1.Location = new System.Drawing.Point(668, 303); this.lastBox1.Name = "lastBox1"; this.lastBox1.Size = new System.Drawing.Size(80, 20); this.lastBox1.TabIndex = 92; this.lastBox1.Text = "User"; this.toolTip1.SetToolTip(this.lastBox1, "lastname"); - // + // // noutc1 - // + // this.noutc1.AutoSize = true; this.noutc1.Location = new System.Drawing.Point(359, 320); this.noutc1.Name = "noutc1"; @@ -1100,18 +1100,18 @@ namespace OpenSim.GUI this.noutc1.Text = "-noutc"; this.toolTip1.SetToolTip(this.noutc1, "logs in local time, not UTC"); this.noutc1.UseVisualStyleBackColor = true; - // + // // passBox1 - // + // this.passBox1.Location = new System.Drawing.Point(790, 303); this.passBox1.Name = "passBox1"; this.passBox1.Size = new System.Drawing.Size(103, 20); this.passBox1.TabIndex = 93; this.passBox1.Text = "test"; this.toolTip1.SetToolTip(this.passBox1, "password"); - // + // // raw1 - // + // this.raw1.AutoSize = true; this.raw1.Location = new System.Drawing.Point(457, 336); this.raw1.Name = "raw1"; @@ -1120,17 +1120,17 @@ namespace OpenSim.GUI this.raw1.Text = "Raw CMD :"; this.toolTip1.SetToolTip(this.raw1, "Raw CMD options, may crash everything"); this.raw1.UseVisualStyleBackColor = true; - // + // // rawBox1 - // + // this.rawBox1.Location = new System.Drawing.Point(549, 333); this.rawBox1.Name = "rawBox1"; this.rawBox1.Size = new System.Drawing.Size(344, 20); this.rawBox1.TabIndex = 95; this.toolTip1.SetToolTip(this.rawBox1, "Raw CMD options, may crash everything"); - // + // // clear1 - // + // this.clear1.Location = new System.Drawing.Point(178, 366); this.clear1.Name = "clear1"; this.clear1.Size = new System.Drawing.Size(80, 23); @@ -1139,18 +1139,18 @@ namespace OpenSim.GUI this.toolTip1.SetToolTip(this.clear1, "clear all switch boxes"); this.clear1.UseVisualStyleBackColor = true; this.clear1.Click += new System.EventHandler(this.clear1_Click); - // + // // nataddress1 - // + // this.nataddress1.Location = new System.Drawing.Point(457, 389); this.nataddress1.Name = "nataddress1"; this.nataddress1.Size = new System.Drawing.Size(436, 20); this.nataddress1.TabIndex = 58; this.nataddress1.Text = "UNUSED ATM"; this.nataddress1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // + // // label8 - // + // this.label8.AutoSize = true; this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label8.Location = new System.Drawing.Point(588, 360); @@ -1158,9 +1158,9 @@ namespace OpenSim.GUI this.label8.Size = new System.Drawing.Size(175, 20); this.label8.TabIndex = 59; this.label8.Text = "World/NAT Address :"; - // + // // label9 - // + // this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label9.Location = new System.Drawing.Point(633, 27); this.label9.Name = "label9"; @@ -1168,17 +1168,17 @@ namespace OpenSim.GUI this.label9.TabIndex = 60; this.label9.Text = "Path :"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // + // // exeBox1 - // + // this.exeBox1.Location = new System.Drawing.Point(530, 27); this.exeBox1.Name = "exeBox1"; this.exeBox1.Size = new System.Drawing.Size(100, 20); this.exeBox1.TabIndex = 61; this.exeBox1.Text = "Secondlife.exe"; - // + // // label10 - // + // this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label10.Location = new System.Drawing.Point(392, 27); this.label10.Name = "label10"; @@ -1186,36 +1186,36 @@ namespace OpenSim.GUI this.label10.TabIndex = 62; this.label10.Text = "Executable Name :"; this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // + // // label11 - // + // this.label11.AutoSize = true; this.label11.Location = new System.Drawing.Point(514, 306); this.label11.Name = "label11"; this.label11.Size = new System.Drawing.Size(32, 13); this.label11.TabIndex = 89; this.label11.Text = "First :"; - // + // // label12 - // + // this.label12.AutoSize = true; this.label12.Location = new System.Drawing.Point(632, 306); this.label12.Name = "label12"; this.label12.Size = new System.Drawing.Size(33, 13); this.label12.TabIndex = 90; this.label12.Text = "Last :"; - // + // // label13 - // + // this.label13.AutoSize = true; this.label13.Location = new System.Drawing.Point(751, 306); this.label13.Name = "label13"; this.label13.Size = new System.Drawing.Size(36, 13); this.label13.TabIndex = 91; this.label13.Text = "Pass :"; - // + // // Main - // + // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(900, 431); diff --git a/OpenSim/Tools/OpenSim.GUI/Properties/AssemblyInfo.cs b/OpenSim/Tools/OpenSim.GUI/Properties/AssemblyInfo.cs index b89119c..8d4b3f5 100644 --- a/OpenSim/Tools/OpenSim.GUI/Properties/AssemblyInfo.cs +++ b/OpenSim/Tools/OpenSim.GUI/Properties/AssemblyInfo.cs @@ -29,7 +29,7 @@ using System.Reflection; using System.Runtime.CompilerServices; 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. [assembly: AssemblyTitle("OpenSim.GUI")] @@ -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)] @@ -52,7 +52,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/Tools/OpenSim.GUI/frmConfiguration.Designer.cs b/OpenSim/Tools/OpenSim.GUI/frmConfiguration.Designer.cs index ee9282e..4665dd9 100644 --- a/OpenSim/Tools/OpenSim.GUI/frmConfiguration.Designer.cs +++ b/OpenSim/Tools/OpenSim.GUI/frmConfiguration.Designer.cs @@ -58,18 +58,18 @@ namespace OpenSim.GUI System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmConfiguration)); this.textBox1 = new System.Windows.Forms.TextBox(); this.SuspendLayout(); - // + // // textBox1 - // + // this.textBox1.Location = new System.Drawing.Point(12, 12); this.textBox1.Multiline = true; this.textBox1.Name = "textBox1"; this.textBox1.Size = new System.Drawing.Size(570, 190); this.textBox1.TabIndex = 0; this.textBox1.Text = resources.GetString("textBox1.Text"); - // + // // frmConfiguration - // + // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(664, 413); diff --git a/OpenSim/Tools/pCampBot/PhysicsBot.cs b/OpenSim/Tools/pCampBot/PhysicsBot.cs index 334f699..960be9b 100644 --- a/OpenSim/Tools/pCampBot/PhysicsBot.cs +++ b/OpenSim/Tools/pCampBot/PhysicsBot.cs @@ -59,7 +59,7 @@ namespace pCampBot protected string[] talkarray; /// - /// + /// /// /// nini config for the bot public PhysicsBot(IConfig bsconfig) @@ -69,7 +69,7 @@ namespace pCampBot talkarray = readexcuses(); } - //We do our actions here. This is where one would + //We do our actions here. This is where one would //add additional steps and/or things the bot should do void m_action_Elapsed(object sender, ElapsedEventArgs e) -- cgit v1.1