From f1f0bc23f4501ba99035283d3407ddad2b21b785 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Sun, 12 Sep 2010 13:43:49 -0400 Subject: [PATCH] Formatting cleanup. --- .../Rest/Inventory/RestAppearanceServices.cs | 4 +- OpenSim/Data/DBGuids.cs | 2 +- OpenSim/Data/MSSQL/MSSQLSimulationData.cs | 6 +- OpenSim/Data/Migration.cs | 14 +- OpenSim/Data/MySQL/MySQLInventoryData.cs | 2 +- OpenSim/Data/MySQL/MySQLSimulationData.cs | 22 +- OpenSim/Data/SQLite/SQLiteInventoryStore.cs | 6 +- OpenSim/Data/SQLite/SQLiteSimulationData.cs | 57 ++-- OpenSim/Data/Tests/BasicDataServiceTest.cs | 10 +- OpenSim/Framework/Capabilities/Caps.cs | 2 +- OpenSim/Framework/Console/CommandConsole.cs | 2 +- OpenSim/Framework/Console/LocalConsole.cs | 18 +- OpenSim/Framework/LandData.cs | 28 +- OpenSim/Framework/LandUpdateArgs.cs | 14 +- OpenSim/Framework/PrimitiveBaseShape.cs | 74 ++--- OpenSim/Framework/RegionInfo.cs | 28 +- .../Serialization/ArchiveConstants.cs | 20 +- .../Servers/HttpServer/BaseHttpServer.cs | 121 ++++---- OpenSim/Region/Application/Application.cs | 2 +- OpenSim/Region/Application/OpenSim.cs | 16 +- .../ClientStack/LindenUDP/LLClientView.cs | 261 +++++++++--------- .../Avatar/Attachments/AttachmentsModule.cs | 24 +- .../CoreModules/Avatar/Combat/CombatModule.cs | 4 +- .../CoreModules/Avatar/Gods/GodsModule.cs | 6 +- .../InstantMessage/MessageTransferModule.cs | 2 +- .../Archiver/InventoryArchiveReadRequest.cs | 18 +- .../Archiver/InventoryArchiveWriteRequest.cs | 10 +- .../Archiver/InventoryArchiverException.cs | 2 +- .../Archiver/InventoryArchiverModule.cs | 28 +- .../Archiver/Tests/InventoryArchiverTests.cs | 54 ++-- .../EventQueue/EventQueueGetModule.cs | 4 +- .../Framework/EventQueue/EventQueueHelper.cs | 18 +- .../InventoryAccess/InventoryAccessModule.cs | 2 +- .../Statistics/Logging/BinaryLoggingModule.cs | 12 +- .../Inventory/InventoryCache.cs | 2 +- .../LocalInventoryServiceConnector.cs | 2 +- .../RemoteXInventoryServiceConnector.cs | 2 +- .../World/Archiver/ArchiveHelpers.cs | 8 +- .../World/Land/LandManagementModule.cs | 111 ++++---- .../CoreModules/World/Land/LandObject.cs | 14 +- .../World/Media/Moap/MoapModule.cs | 98 +++---- .../World/Objects/BuySell/BuySellModule.cs | 14 +- .../World/Permissions/PermissionsModule.cs | 22 +- .../World/Terrain/TerrainModule.cs | 2 +- .../CoreModules/World/Wind/WindModule.cs | 2 +- .../World/WorldMap/MapImageModule.cs | 2 +- .../World/WorldMap/WorldMapModule.cs | 2 +- .../Interfaces/IAttachmentsModule.cs | 2 +- .../Framework/Interfaces/IGroupsModule.cs | 6 +- .../Interfaces/IInventoryArchiverModule.cs | 16 +- .../Framework/Interfaces/IMoapModule.cs | 2 +- .../Framework/Interfaces/IWorldMapModule.cs | 2 +- .../Region/Framework/Scenes/EventManager.cs | 12 +- .../Region/Framework/Scenes/Prioritizer.cs | 10 +- .../Framework/Scenes/Scene.Inventory.cs | 12 +- .../Framework/Scenes/Scene.PacketHandlers.cs | 2 +- .../Framework/Scenes/Scene.Permissions.cs | 2 +- OpenSim/Region/Framework/Scenes/Scene.cs | 18 +- OpenSim/Region/Framework/Scenes/SceneBase.cs | 2 +- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 6 +- .../Framework/Scenes/SceneObjectGroup.cs | 18 +- .../Framework/Scenes/SceneObjectPart.cs | 22 +- .../Scenes/SceneObjectPartInventory.cs | 2 +- .../Region/Framework/Scenes/ScenePresence.cs | 2 +- .../Region/Framework/Scenes/SceneViewer.cs | 4 +- .../Framework/Scenes/Tests/SceneGraphTests.cs | 4 +- .../Scenes/Tests/SceneObjectLinkingTests.cs | 18 +- .../Scenes/Tests/TaskInventoryTests.cs | 14 +- .../Avatar/XmlRpcGroups/GroupsModule.cs | 2 +- .../SimianGroupsServicesConnectorModule.cs | 39 ++- .../XmlRpcGroupsServicesConnectorModule.cs | 4 +- .../ContentManagementSystem/MetaEntity.cs | 2 +- .../Scripting/Minimodule/SOPObject.cs | 4 +- .../World/MoneyModule/SampleMoneyModule.cs | 2 +- .../RegionCombinerIndividualEventForwarder.cs | 4 +- .../RegionCombinerLargeLandChannel.cs | 6 +- .../Shared/Api/Implementation/LSL_Api.cs | 8 +- .../Shared/Api/Implementation/OSSL_Api.cs | 6 +- .../Implementation/Plugins/SensorRepeat.cs | 4 +- .../Region/ScriptEngine/XEngine/XEngine.cs | 2 +- OpenSim/Server/Base/ServerUtils.cs | 2 +- .../Hypergrid/GatekeeperServiceConnector.cs | 2 +- .../Inventory/XInventoryConnector.cs | 2 +- .../InventoryService/InventoryService.cs | 4 +- .../Services/LLLoginService/LLLoginService.cs | 2 +- .../UserAccountService/UserAccountService.cs | 20 +- .../Tests/Common/Mock/MockRegionDataPlugin.cs | 6 +- OpenSim/Tests/Common/Mock/TestScene.cs | 2 +- OpenSim/Tests/Common/Setup/AssetHelpers.cs | 4 +- .../Tests/Common/Setup/SceneSetupHelpers.cs | 37 ++- .../Common/Setup/UserInventoryTestUtils.cs | 4 +- .../Common/Setup/UserProfileTestUtils.cs | 8 +- 92 files changed, 754 insertions(+), 772 deletions(-) diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs index 4369216b26..8271d76b44 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs @@ -384,7 +384,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory // } // // rdata.Respond(String.Format("Appearance {0} : Normal completion", rdata.method)); -// +// // } /// @@ -449,7 +449,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory // rdata.userAppearance = new AvatarAppearance(); // rdata.userAppearance.Owner = old.Owner; // adata = new AvatarData(rdata.userAppearance); -// +// // Rest.AvatarServices.SetAvatar(rdata.userProfile.ID, adata); // // rdata.Complete(); diff --git a/OpenSim/Data/DBGuids.cs b/OpenSim/Data/DBGuids.cs index c40e8bbf21..ad1c19c6ee 100644 --- a/OpenSim/Data/DBGuids.cs +++ b/OpenSim/Data/DBGuids.cs @@ -44,7 +44,7 @@ namespace OpenSim.Data /// public static UUID FromDB(object id) { - if( (id == null) || (id == DBNull.Value)) + if ((id == null) || (id == DBNull.Value)) return UUID.Zero; if (id.GetType() == typeof(Guid)) diff --git a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs index ae105d594a..e4bfc28db8 100644 --- a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs +++ b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs @@ -1126,7 +1126,7 @@ VALUES prim.LinkNum = Convert.ToInt32(primRow["LinkNumber"]); if (!(primRow["MediaURL"] is System.DBNull)) - prim.MediaUrl = (string)primRow["MediaURL"]; + prim.MediaUrl = (string)primRow["MediaURL"]; return prim; } @@ -1180,7 +1180,7 @@ VALUES { } - if (!(shapeRow["Media"] is System.DBNull)) + if (!(shapeRow["Media"] is System.DBNull)) baseShape.Media = PrimitiveBaseShape.MediaList.FromXml((string)shapeRow["Media"]); return baseShape; @@ -1511,7 +1511,7 @@ VALUES parameters.Add(_Database.CreateParameter("PassTouches", 1)); else parameters.Add(_Database.CreateParameter("PassTouches", 0)); - parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum)); + parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum)); parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl)); return parameters.ToArray(); diff --git a/OpenSim/Data/Migration.cs b/OpenSim/Data/Migration.cs index 86531d92df..fc9a1429ec 100644 --- a/OpenSim/Data/Migration.cs +++ b/OpenSim/Data/Migration.cs @@ -122,7 +122,7 @@ namespace OpenSim.Data int ver = FindVersion(_conn, "migrations"); if (ver <= 0) // -1 = no table, 0 = no version record { - if( ver < 0 ) + if (ver < 0) ExecuteScript("create table migrations(name varchar(100), version int)"); InsertVersion("migrations", 1); } @@ -288,7 +288,7 @@ namespace OpenSim.Data SortedList migrations = new SortedList(); string[] names = _assem.GetManifestResourceNames(); - if( names.Length == 0 ) // should never happen + if (names.Length == 0) // should never happen return migrations; Array.Sort(names); // we want all the migrations ordered @@ -297,7 +297,7 @@ namespace OpenSim.Data Match m = null; string sFile = Array.FindLast(names, nm => { m = _match_new.Match(nm); return m.Success; }); // ; nm.StartsWith(sPrefix, StringComparison.InvariantCultureIgnoreCase - if( (m != null) && !String.IsNullOrEmpty(sFile) ) + if ((m != null) && !String.IsNullOrEmpty(sFile)) { /* The filename should be '.migrations[.NNN]' where NNN * is the last version number defined in the file. If the '.NNN' part is recognized, the code can skip @@ -312,7 +312,7 @@ namespace OpenSim.Data if (m.Groups.Count > 1 && int.TryParse(m.Groups[1].Value, out nLastVerFound)) { - if( nLastVerFound <= after ) + if (nLastVerFound <= after) goto scan_old_style; } @@ -329,7 +329,7 @@ namespace OpenSim.Data sb.Length = 0; } - if ( (nVersion > 0) && (nVersion > after) && (script.Count > 0) && !migrations.ContainsKey(nVersion)) // script to the versioned script list + if ((nVersion > 0) && (nVersion > after) && (script.Count > 0) && !migrations.ContainsKey(nVersion)) // script to the versioned script list { migrations[nVersion] = script.ToArray(); } @@ -345,7 +345,7 @@ namespace OpenSim.Data string sLine = resourceReader.ReadLine(); nLineNo++; - if( String.IsNullOrEmpty(sLine) || sLine.StartsWith("#") ) // ignore a comment or empty line + if (String.IsNullOrEmpty(sLine) || sLine.StartsWith("#")) // ignore a comment or empty line continue; if (sLine.Trim().Equals(":GO", StringComparison.InvariantCultureIgnoreCase)) @@ -392,7 +392,7 @@ scan_old_style: if (m.Success) { int version = int.Parse(m.Groups[1].ToString()); - if ( (version > after) && !migrations.ContainsKey(version) ) + if ((version > after) && !migrations.ContainsKey(version)) { using (Stream resource = _assem.GetManifestResourceStream(s)) { diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index 0aea30ffb9..2dca3eb6a9 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs @@ -286,7 +286,7 @@ namespace OpenSim.Data.MySQL InventoryItemBase item = new InventoryItemBase(); // TODO: this is to handle a case where NULLs creep in there, which we are not sure is endemic to the system, or legacy. It would be nice to live fix these. - // ( DBGuid.FromDB() reads db NULLs as well, returns UUID.Zero ) + // (DBGuid.FromDB() reads db NULLs as well, returns UUID.Zero) item.CreatorId = reader["creatorID"].ToString(); // Be a bit safer in parsing these because the diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index 36f73ef49d..8201cef7a5 100644 --- a/OpenSim/Data/MySQL/MySQLSimulationData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs @@ -680,7 +680,7 @@ namespace OpenSim.Data.MySQL "UserLocationX, UserLocationY, UserLocationZ, " + "UserLookAtX, UserLookAtY, UserLookAtZ, " + "AuthbuyerID, OtherCleanTime, MediaType, MediaDescription, " + - "MediaSize, MediaLoop, ObscureMusic, ObscureMedia) values (" + + "MediaSize, MediaLoop, ObscureMusic, ObscureMedia) values (" + "?UUID, ?RegionUUID, " + "?LocalLandID, ?Bitmap, ?Name, ?Description, " + "?OwnerUUID, ?IsGroupOwned, ?Area, ?AuctionID, " + @@ -691,7 +691,7 @@ namespace OpenSim.Data.MySQL "?UserLocationX, ?UserLocationY, ?UserLocationZ, " + "?UserLookAtX, ?UserLookAtY, ?UserLookAtZ, " + "?AuthbuyerID, ?OtherCleanTime, ?MediaType, ?MediaDescription, "+ - "CONCAT(?MediaWidth, ',', ?MediaHeight), ?MediaLoop, ?ObscureMusic, ?ObscureMedia)"; + "CONCAT(?MediaWidth, ',', ?MediaHeight), ?MediaLoop, ?ObscureMusic, ?ObscureMedia)"; FillLandCommand(cmd, parcel.LandData, parcel.RegionUUID); @@ -728,7 +728,7 @@ namespace OpenSim.Data.MySQL string command = "select * from `regionwindlight` where region_id = ?regionID"; - using(MySqlCommand cmd = new MySqlCommand(command)) + using (MySqlCommand cmd = new MySqlCommand(command)) { cmd.Connection = dbcon; @@ -1350,13 +1350,13 @@ namespace OpenSim.Data.MySQL m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name); } - newData.MediaDescription = (string) row["MediaDescription"]; - newData.MediaType = (string) row["MediaType"]; - newData.MediaWidth = Convert.ToInt32((((string) row["MediaSize"]).Split(','))[0]); - newData.MediaHeight = Convert.ToInt32((((string) row["MediaSize"]).Split(','))[1]); - newData.MediaLoop = Convert.ToBoolean(row["MediaLoop"]); - newData.ObscureMusic = Convert.ToBoolean(row["ObscureMusic"]); - newData.ObscureMedia = Convert.ToBoolean(row["ObscureMedia"]); + newData.MediaDescription = (string) row["MediaDescription"]; + newData.MediaType = (string) row["MediaType"]; + newData.MediaWidth = Convert.ToInt32((((string) row["MediaSize"]).Split(','))[0]); + newData.MediaHeight = Convert.ToInt32((((string) row["MediaSize"]).Split(','))[1]); + newData.MediaLoop = Convert.ToBoolean(row["MediaLoop"]); + newData.ObscureMusic = Convert.ToBoolean(row["ObscureMusic"]); + newData.ObscureMedia = Convert.ToBoolean(row["ObscureMedia"]); newData.ParcelAccessList = new List(); @@ -1724,7 +1724,7 @@ namespace OpenSim.Data.MySQL s.State = (byte)(int)row["State"]; - if (!(row["Media"] is System.DBNull)) + if (!(row["Media"] is System.DBNull)) s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); return s; diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs index ece2495c2b..ecf8e02c34 100644 --- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs +++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs @@ -731,12 +731,12 @@ namespace OpenSim.Data.SQLite **********************************************************************/ protected void CreateDataSetMapping(IDataAdapter da, string tableName) - { + { ITableMapping dbMapping = da.TableMappings.Add(tableName, tableName); foreach (DataColumn col in ds.Tables[tableName].Columns) - { + { dbMapping.ColumnMappings.Add(col.ColumnName, col.ColumnName); - } + } } /// diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs index 1820f78fac..74609613ea 100644 --- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs +++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs @@ -176,7 +176,7 @@ namespace OpenSim.Data.SQLite { m_log.Info("[SQLITE REGION DB]: Caught fill error on primitems table"); } - + try { terrainDa.Fill(ds.Tables["terrain"]); @@ -510,7 +510,7 @@ namespace OpenSim.Data.SQLite "[SQLITE REGION DB]: No shape found for prim in storage, so setting default box shape"); prim.Shape = PrimitiveBaseShape.Default; } - + createdObjects[new UUID(objID)].AddPart(prim); LoadItems(prim); } @@ -534,17 +534,17 @@ namespace OpenSim.Data.SQLite /// /// the prim private void LoadItems(SceneObjectPart prim) - { -// m_log.DebugFormat("[SQLITE REGION DB]: Loading inventory for {0} {1}", prim.Name, prim.UUID); - + { +// m_log.DebugFormat("[SQLITE REGION DB]: 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(); -// m_log.DebugFormat( -// "[SQLITE REGION DB]: Found {0} items for {1} {2}", dbItemRows.Length, prim.Name, prim.UUID); - +// m_log.DebugFormat( +// "[SQLITE REGION DB]: Found {0} items for {1} {2}", dbItemRows.Length, prim.Name, prim.UUID); + foreach (DataRow row in dbItemRows) { TaskInventoryItem item = buildItem(row); @@ -693,8 +693,6 @@ namespace OpenSim.Data.SQLite { landaccesslist.Rows.Remove(rowsToDelete[iter]); } - - } Commit(); } @@ -804,7 +802,7 @@ namespace OpenSim.Data.SQLite try { regionSettingsDa.Update(ds, "regionsettings"); - } + } catch (SqliteException SqlEx) { throw new Exception( @@ -974,7 +972,7 @@ namespace OpenSim.Data.SQLite createCol(prims, "CollisionSoundVolume", typeof(Double)); createCol(prims, "VolumeDetect", typeof(Int16)); - + createCol(prims, "MediaURL", typeof(String)); // Add in contraints @@ -1191,10 +1189,10 @@ namespace OpenSim.Data.SQLite private SceneObjectPart buildPrim(DataRow row) { // Code commented. Uncomment to test the unit test inline. - - // The unit test mentions this commented code for the purposes + + // The unit test mentions this commented code for the purposes // of debugging a unit test failure - + // SceneObjectGroup sog = new SceneObjectGroup(); // SceneObjectPart sop = new SceneObjectPart(); // sop.LocalId = 1; @@ -1211,7 +1209,7 @@ namespace OpenSim.Data.SQLite // TODO: this doesn't work yet because something more // interesting has to be done to actually get these values // back out. Not enough time to figure it out yet. - + SceneObjectPart prim = new SceneObjectPart(); prim.UUID = new UUID((String) row["UUID"]); // explicit conversion of integers is required, which sort @@ -1341,7 +1339,7 @@ namespace OpenSim.Data.SQLite if (Convert.ToInt16(row["VolumeDetect"]) != 0) prim.VolumeDetectActive = true; - + if (!(row["MediaURL"] is System.DBNull)) { //m_log.DebugFormat("[SQLITE]: MediaUrl type [{0}]", row["MediaURL"].GetType()); @@ -1680,7 +1678,7 @@ namespace OpenSim.Data.SQLite row["VolumeDetect"] = 1; else row["VolumeDetect"] = 0; - + row["MediaURL"] = prim.MediaUrl; } @@ -1758,12 +1756,12 @@ namespace OpenSim.Data.SQLite row["UserLookAtZ"] = land.UserLookAt.Z; row["AuthbuyerID"] = land.AuthBuyerID.ToString(); row["OtherCleanTime"] = land.OtherCleanTime; - row["MediaType"] = land.MediaType; - row["MediaDescription"] = land.MediaDescription; - row["MediaSize"] = land.MediaWidth.ToString() + "," + land.MediaHeight.ToString(); - row["MediaLoop"] = land.MediaLoop.ToString(); - row["ObscureMusic"] = land.ObscureMusic.ToString(); - row["ObscureMedia"] = land.ObscureMedia.ToString(); + row["MediaType"] = land.MediaType; + row["MediaDescription"] = land.MediaDescription; + row["MediaSize"] = land.MediaWidth.ToString() + "," + land.MediaHeight.ToString(); + row["MediaLoop"] = land.MediaLoop.ToString(); + row["ObscureMusic"] = land.ObscureMusic.ToString(); + row["ObscureMedia"] = land.ObscureMedia.ToString(); } /// @@ -1861,10 +1859,10 @@ namespace OpenSim.Data.SQLite s.TextureEntry = textureEntry; s.ExtraParams = (byte[]) row["ExtraParams"]; - + if (!(row["Media"] is System.DBNull)) s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); - + return s; } @@ -1908,7 +1906,7 @@ namespace OpenSim.Data.SQLite row["Texture"] = s.TextureEntry; row["ExtraParams"] = s.ExtraParams; - + if (s.Media != null) row["Media"] = s.Media.ToXml(); } @@ -2246,7 +2244,6 @@ namespace OpenSim.Data.SQLite delete.Parameters.Add(createSqliteParameter("AccessUUID", typeof(String))); da.DeleteCommand = delete; da.DeleteCommand.Connection = conn; - } private void setupRegionSettingsCommands(SqliteDataAdapter da, SqliteConnection conn) @@ -2318,7 +2315,7 @@ namespace OpenSim.Data.SQLite return DbType.String; } } - + static void PrintDataSet(DataSet ds) { // Print out any name and extended properties. diff --git a/OpenSim/Data/Tests/BasicDataServiceTest.cs b/OpenSim/Data/Tests/BasicDataServiceTest.cs index 272a2ca2e1..7d85f0c8eb 100644 --- a/OpenSim/Data/Tests/BasicDataServiceTest.cs +++ b/OpenSim/Data/Tests/BasicDataServiceTest.cs @@ -68,13 +68,13 @@ namespace OpenSim.Data.Tests { m_connStr = !String.IsNullOrEmpty(conn) ? conn : DefaultTestConns.Get(typeof(TConn)); - m_log = LogManager.GetLogger(this.GetType()); + m_log = LogManager.GetLogger(this.GetType()); OpenSim.Tests.Common.TestLogging.LogToConsole(); // TODO: Is that right? } /// /// To be overridden in derived classes. Do whatever init with the m_service, like setting the conn string to it. - /// You'd probably want to to cast the 'service' to a more specific type and store it in a member var. + /// You'd probably want to to cast the 'service' to a more specific type and store it in a member var. /// This framework takes care of disposing it, if it's disposable. /// /// The service being tested @@ -145,12 +145,12 @@ namespace OpenSim.Data.Tests { if (m_service != null) { - if( m_service is IDisposable) + if (m_service is IDisposable) ((IDisposable)m_service).Dispose(); m_service = null; } - if( !String.IsNullOrEmpty(m_file) && File.Exists(m_file) ) + if (!String.IsNullOrEmpty(m_file) && File.Exists(m_file)) File.Delete(m_file); } @@ -231,7 +231,7 @@ namespace OpenSim.Data.Tests lst += ", " + s; } - string sCond = stores.Length > 1 ? ("in (" + lst + ")") : ("=" + lst); + string sCond = stores.Length > 1 ? ("in (" + lst + ")") : ("=" + lst); try { ExecuteSql("DELETE FROM migrations where name " + sCond); diff --git a/OpenSim/Framework/Capabilities/Caps.cs b/OpenSim/Framework/Capabilities/Caps.cs index 8a339fedc9..6f32adfc7f 100644 --- a/OpenSim/Framework/Capabilities/Caps.cs +++ b/OpenSim/Framework/Capabilities/Caps.cs @@ -760,7 +760,7 @@ namespace OpenSim.Framework.Capabilities string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); BakedTextureUploader uploader = - new BakedTextureUploader( capsBase + uploaderPath, + new BakedTextureUploader(capsBase + uploaderPath, m_httpListener); uploader.OnUpLoad += BakedTextureUploaded; diff --git a/OpenSim/Framework/Console/CommandConsole.cs b/OpenSim/Framework/Console/CommandConsole.cs index b17dbc08de..52bcd5599b 100644 --- a/OpenSim/Framework/Console/CommandConsole.cs +++ b/OpenSim/Framework/Console/CommandConsole.cs @@ -151,7 +151,7 @@ namespace OpenSim.Framework.Console help.Add(commandInfo.descriptive_help); if (descriptiveHelp != string.Empty) - help.Add(string.Empty); + help.Add(string.Empty); } else { diff --git a/OpenSim/Framework/Console/LocalConsole.cs b/OpenSim/Framework/Console/LocalConsole.cs index c968031c11..6043094440 100644 --- a/OpenSim/Framework/Console/LocalConsole.cs +++ b/OpenSim/Framework/Console/LocalConsole.cs @@ -38,7 +38,7 @@ namespace OpenSim.Framework.Console { /// /// A console that uses cursor control and color - /// + /// public class LocalConsole : CommandConsole { // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -100,8 +100,8 @@ namespace OpenSim.Framework.Console private int SetCursorTop(int top) { // From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try - // to set a cursor row position with a currently invalid column, mono will throw an exception. - // Therefore, we need to make sure that the column position is valid first. + // to set a cursor row position with a currently invalid column, mono will throw an exception. + // Therefore, we need to make sure that the column position is valid first. int left = System.Console.CursorLeft; if (left < 0) @@ -121,7 +121,7 @@ namespace OpenSim.Framework.Console { top = 0; } - else + else { int bh = System.Console.BufferHeight; @@ -133,7 +133,7 @@ namespace OpenSim.Framework.Console System.Console.CursorTop = top; return top; - } + } /// /// Set the cursor column. @@ -145,12 +145,12 @@ namespace OpenSim.Framework.Console /// /// /// The new cursor column. - /// + /// private int SetCursorLeft(int left) { // From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try - // to set a cursor column position with a currently invalid row, mono will throw an exception. - // Therefore, we need to make sure that the row position is valid first. + // to set a cursor column position with a currently invalid row, mono will throw an exception. + // Therefore, we need to make sure that the row position is valid first. int top = System.Console.CursorTop; if (top < 0) @@ -214,7 +214,7 @@ namespace OpenSim.Framework.Console System.Console.Write("{0}", prompt); SetCursorTop(new_y); - SetCursorLeft(new_x); + SetCursorLeft(new_x); } } diff --git a/OpenSim/Framework/LandData.cs b/OpenSim/Framework/LandData.cs index 8d3266b944..accf52ec44 100644 --- a/OpenSim/Framework/LandData.cs +++ b/OpenSim/Framework/LandData.cs @@ -89,13 +89,13 @@ namespace OpenSim.Framework private Vector3 _userLocation = new Vector3(); private Vector3 _userLookAt = new Vector3(); private int _otherCleanTime = 0; - private string _mediaType = "none/none"; - private string _mediaDescription = ""; - private int _mediaHeight = 0; - private int _mediaWidth = 0; - private bool _mediaLoop = false; - private bool _obscureMusic = false; - private bool _obscureMedia = false; + private string _mediaType = "none/none"; + private string _mediaDescription = ""; + private int _mediaHeight = 0; + private int _mediaWidth = 0; + private bool _mediaLoop = false; + private bool _obscureMusic = false; + private bool _obscureMedia = false; /// /// Whether to obscure parcel media URL @@ -690,13 +690,13 @@ namespace OpenSim.Framework landData._userLocation = _userLocation; landData._userLookAt = _userLookAt; landData._otherCleanTime = _otherCleanTime; - landData._mediaType = _mediaType; - landData._mediaDescription = _mediaDescription; - landData._mediaWidth = _mediaWidth; - landData._mediaHeight = _mediaHeight; - landData._mediaLoop = _mediaLoop; - landData._obscureMusic = _obscureMusic; - landData._obscureMedia = _obscureMedia; + landData._mediaType = _mediaType; + landData._mediaDescription = _mediaDescription; + landData._mediaWidth = _mediaWidth; + landData._mediaHeight = _mediaHeight; + landData._mediaLoop = _mediaLoop; + landData._obscureMusic = _obscureMusic; + landData._obscureMedia = _obscureMedia; landData._parcelAccessList.Clear(); foreach (ParcelManager.ParcelAccessEntry entry in _parcelAccessList) diff --git a/OpenSim/Framework/LandUpdateArgs.cs b/OpenSim/Framework/LandUpdateArgs.cs index ed496a1455..7d6c4f2dab 100644 --- a/OpenSim/Framework/LandUpdateArgs.cs +++ b/OpenSim/Framework/LandUpdateArgs.cs @@ -49,12 +49,12 @@ namespace OpenSim.Framework public UUID SnapshotID; public Vector3 UserLocation; public Vector3 UserLookAt; - public string MediaType; - public string MediaDescription; - public int MediaHeight; - public int MediaWidth; - public bool MediaLoop; - public bool ObscureMusic; - public bool ObscureMedia; + public string MediaType; + public string MediaDescription; + public int MediaHeight; + public int MediaWidth; + public bool MediaLoop; + public bool ObscureMusic; + public bool ObscureMedia; } } diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs index 70a61cc622..0a81363b85 100644 --- a/OpenSim/Framework/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/PrimitiveBaseShape.cs @@ -175,7 +175,7 @@ namespace OpenSim.Framework } } } - + /// /// Entries to store media textures on each face /// @@ -1216,28 +1216,28 @@ namespace OpenSim.Framework prim.Properties.Permissions = new Permissions(); prim.Properties.SalePrice = 10; prim.Properties.SaleType = new SaleType(); - + return prim; } - + /// /// Encapsulates a list of media entries. /// - /// This class is necessary because we want to replace auto-serialization of MediaEntry with something more + /// This class is necessary because we want to replace auto-serialization of MediaEntry with something more /// OSD like and less vulnerable to change. public class MediaList : List, IXmlSerializable - { + { public const string MEDIA_TEXTURE_TYPE = "sl"; - + public MediaList() : base() {} public MediaList(IEnumerable collection) : base(collection) {} public MediaList(int capacity) : base(capacity) {} - + public XmlSchema GetSchema() { return null; } - + public string ToXml() { lock (this) @@ -1245,78 +1245,78 @@ namespace OpenSim.Framework using (StringWriter sw = new StringWriter()) { using (XmlTextWriter xtw = new XmlTextWriter(sw)) - { + { xtw.WriteStartElement("OSMedia"); xtw.WriteAttributeString("type", MEDIA_TEXTURE_TYPE); xtw.WriteAttributeString("version", "0.1"); - + OSDArray meArray = new OSDArray(); foreach (MediaEntry me in this) { OSD osd = (null == me ? new OSD() : me.GetOSD()); meArray.Add(osd); - } - + } + xtw.WriteStartElement("OSData"); xtw.WriteRaw(OSDParser.SerializeLLSDXmlString(meArray)); xtw.WriteEndElement(); - + xtw.WriteEndElement(); - - xtw.Flush(); + + xtw.Flush(); return sw.ToString(); } - } - } + } + } } - + public void WriteXml(XmlWriter writer) - { + { writer.WriteRaw(ToXml()); } - + public static MediaList FromXml(string rawXml) { MediaList ml = new MediaList(); ml.ReadXml(rawXml); return ml; } - + public void ReadXml(string rawXml) - { + { using (StringReader sr = new StringReader(rawXml)) { using (XmlTextReader xtr = new XmlTextReader(sr)) - { + { xtr.MoveToContent(); - + string type = xtr.GetAttribute("type"); //m_log.DebugFormat("[MOAP]: Loaded media texture entry with type {0}", type); - + if (type != MEDIA_TEXTURE_TYPE) - return; - - xtr.ReadStartElement("OSMedia"); - + return; + + xtr.ReadStartElement("OSMedia"); + OSDArray osdMeArray = (OSDArray)OSDParser.DeserializeLLSDXml(xtr.ReadInnerXml()); foreach (OSD osdMe in osdMeArray) { MediaEntry me = (osdMe is OSDMap ? MediaEntry.FromOSD(osdMe) : new MediaEntry()); Add(me); } - - xtr.ReadEndElement(); + + xtr.ReadEndElement(); } } - } - + } + public void ReadXml(XmlReader reader) { if (reader.IsEmptyElement) return; - + ReadXml(reader.ReadInnerXml()); - } + } } - } -} \ No newline at end of file + } +} diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index 12c58c3b76..08d5398a18 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs @@ -97,9 +97,9 @@ namespace OpenSim.Framework [Serializable] public class SimpleRegionInfo - { + { // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - + /// /// The port by which http communication occurs with the region (most noticeably, CAPS communication) /// @@ -344,7 +344,7 @@ namespace OpenSim.Framework public string proxyUrl = ""; public int ProxyOffset = 0; public string regionSecret = UUID.Random().ToString(); - + public string osSecret; public UUID lastMapUUID = UUID.Zero; @@ -699,7 +699,7 @@ namespace OpenSim.Framework RegionID = new UUID(regionUUID); originRegionID = RegionID; // What IS this?! - + RegionName = name; string location = config.GetString("Location", String.Empty); @@ -720,7 +720,7 @@ namespace OpenSim.Framework // Internal IP IPAddress address; - + if (config.Contains("InternalAddress")) { address = IPAddress.Parse(config.GetString("InternalAddress", String.Empty)); @@ -774,7 +774,7 @@ namespace OpenSim.Framework { m_externalHostName = Util.GetLocalHost().ToString(); m_log.InfoFormat( - "[REGIONINFO]: Resolving SYSTEMIP to {0} for external hostname of region {1}", + "[REGIONINFO]: Resolving SYSTEMIP to {0} for external hostname of region {1}", m_externalHostName, name); } else @@ -909,16 +909,16 @@ namespace OpenSim.Framework configMember.addConfigurationOption("nonphysical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Maximum size for nonphysical prims", m_nonphysPrimMax.ToString(), true); - + configMember.addConfigurationOption("physical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Maximum size for physical prims", m_physPrimMax.ToString(), true); - + configMember.addConfigurationOption("clamp_prim_size", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, "Clamp prims to max size", m_clampPrimSize.ToString(), true); - + configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Max objects this sim will hold", m_objectCapacity.ToString(), true); - + configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID, "Scope ID for this region", ScopeID.ToString(), true); @@ -956,16 +956,16 @@ namespace OpenSim.Framework configMember.addConfigurationOption("lastmap_refresh", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Last Map Refresh", Util.UnixTimeSinceEpoch().ToString(), true); - + configMember.addConfigurationOption("nonphysical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Maximum size for nonphysical prims", "0", true); - + configMember.addConfigurationOption("physical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Maximum size for physical prims", "0", true); - + configMember.addConfigurationOption("clamp_prim_size", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, "Clamp prims to max size", "false", true); - + configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Max objects this sim will hold", "0", true); diff --git a/OpenSim/Framework/Serialization/ArchiveConstants.cs b/OpenSim/Framework/Serialization/ArchiveConstants.cs index 3143e3bec7..7a9b33dc8c 100644 --- a/OpenSim/Framework/Serialization/ArchiveConstants.cs +++ b/OpenSim/Framework/Serialization/ArchiveConstants.cs @@ -157,9 +157,9 @@ namespace OpenSim.Framework.Serialization public static string CreateOarObjectFilename(string objectName, UUID uuid, Vector3 pos) { return string.Format( - OAR_OBJECT_FILENAME_TEMPLATE, objectName, + OAR_OBJECT_FILENAME_TEMPLATE, objectName, Math.Round(pos.X), Math.Round(pos.Y), Math.Round(pos.Z), - uuid); + uuid); } /// @@ -171,9 +171,9 @@ namespace OpenSim.Framework.Serialization /// public static string CreateOarObjectPath(string objectName, UUID uuid, Vector3 pos) { - return OBJECTS_PATH + CreateOarObjectFilename(objectName, uuid, pos); - } - + return OBJECTS_PATH + CreateOarObjectFilename(objectName, uuid, pos); + } + /// /// Extract a plain path from an IAR path /// @@ -184,18 +184,18 @@ namespace OpenSim.Framework.Serialization List plainDirs = new List(); string[] iarDirs = iarPath.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries); - + foreach (string iarDir in iarDirs) { if (!iarDir.Contains(ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR)) plainDirs.Add(iarDir); - + int i = iarDir.LastIndexOf(ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR); plainDirs.Add(iarDir.Remove(i)); } - - return string.Join("/", plainDirs.ToArray()); + + return string.Join("/", plainDirs.ToArray()); } } -} \ No newline at end of file +} diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index d20f8c9b25..452df38d31 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs @@ -51,7 +51,7 @@ namespace OpenSim.Framework.Servers.HttpServer { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private HttpServerLogWriter httpserverlog = new HttpServerLogWriter(); - + private volatile int NotSocketErrors = 0; public volatile bool HTTPDRunning = false; @@ -160,7 +160,7 @@ namespace OpenSim.Framework.Servers.HttpServer m_rpcHandlers[method] = handler; m_rpcHandlersKeepAlive[method] = keepAlive; // default } - + return true; } @@ -182,7 +182,7 @@ namespace OpenSim.Framework.Servers.HttpServer public bool AddHTTPHandler(string methodName, GenericHTTPMethod handler) { //m_log.DebugFormat("[BASE HTTP SERVER]: Registering {0}", methodName); - + lock (m_HTTPHandlers) { if (!m_HTTPHandlers.ContainsKey(methodName)) @@ -204,14 +204,14 @@ namespace OpenSim.Framework.Servers.HttpServer if (!m_pollHandlers.ContainsKey(methodName)) { m_pollHandlers.Add(methodName,args); - pollHandlerResult = true; + pollHandlerResult = true; } } - + if (pollHandlerResult) return AddHTTPHandler(methodName, handler); - return false; + return false; } // Note that the agent string is provided simply to differentiate @@ -257,51 +257,51 @@ namespace OpenSim.Framework.Servers.HttpServer { IHttpClientContext context = (IHttpClientContext)source; IHttpRequest request = args.Request; - + PollServiceEventArgs psEvArgs; - + if (TryGetPollServiceHTTPHandler(request.UriPath.ToString(), out psEvArgs)) { PollServiceHttpRequest psreq = new PollServiceHttpRequest(psEvArgs, context, request); - + if (psEvArgs.Request != null) { OSHttpRequest req = new OSHttpRequest(context, request); - + Stream requestStream = req.InputStream; - + Encoding encoding = Encoding.UTF8; StreamReader reader = new StreamReader(requestStream, encoding); - + string requestBody = reader.ReadToEnd(); - + Hashtable keysvals = new Hashtable(); Hashtable headervals = new Hashtable(); - + string[] querystringkeys = req.QueryString.AllKeys; string[] rHeaders = req.Headers.AllKeys; - + keysvals.Add("body", requestBody); keysvals.Add("uri", req.RawUrl); keysvals.Add("content-type", req.ContentType); keysvals.Add("http-method", req.HttpMethod); - + foreach (string queryname in querystringkeys) { keysvals.Add(queryname, req.QueryString[queryname]); } - + foreach (string headername in rHeaders) { headervals[headername] = req.Headers[headername]; } - + keysvals.Add("headers", headervals); keysvals.Add("querystringkeys", querystringkeys); - + psEvArgs.Request(psreq.RequestID, keysvals); } - + m_PollServiceManager.Enqueue(psreq); } else @@ -348,10 +348,10 @@ namespace OpenSim.Framework.Servers.HttpServer { try { -// m_log.Debug("[BASE HTTP SERVER]: Handling request to " + request.RawUrl); - +// m_log.Debug("[BASE HTTP SERVER]: Handling request to " + request.RawUrl); + Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", true); - + // This is the REST agent interface. We require an agent to properly identify // itself. If the REST handler recognizes the prefix it will attempt to // satisfy the request. If it is not recognizable, and no damage has occurred @@ -456,7 +456,7 @@ namespace OpenSim.Framework.Servers.HttpServer } request.InputStream.Close(); - + // HTTP IN support. The script engine taes it from here // Nothing to worry about for us. // @@ -540,7 +540,7 @@ namespace OpenSim.Framework.Servers.HttpServer HandleLLSDRequests(request, response); return; } - + // m_log.DebugFormat("[BASE HTTP SERVER]: Checking for HTTP Handler for request {0}", request.RawUrl); if (DoWeHaveAHTTPHandler(request.RawUrl)) { @@ -594,7 +594,7 @@ namespace OpenSim.Framework.Servers.HttpServer } } } - + if (String.IsNullOrEmpty(bestMatch)) { streamHandler = null; @@ -641,7 +641,7 @@ namespace OpenSim.Framework.Servers.HttpServer private bool TryGetHTTPHandler(string handlerKey, out GenericHTTPMethod HTTPHandler) { // m_log.DebugFormat("[BASE HTTP HANDLER]: Looking for HTTP handler for {0}", handlerKey); - + string bestMatch = null; lock (m_HTTPHandlers) @@ -727,14 +727,14 @@ namespace OpenSim.Framework.Servers.HttpServer { xmlRprcRequest.Params.Add(request.RemoteIPEndPoint); // Param[1] XmlRpcResponse xmlRpcResponse; - + XmlRpcMethod method; bool methodWasFound; lock (m_rpcHandlers) { methodWasFound = m_rpcHandlers.TryGetValue(methodName, out method); } - + if (methodWasFound) { xmlRprcRequest.Params.Add(request.Url); // Param[2] @@ -766,10 +766,10 @@ namespace OpenSim.Framework.Servers.HttpServer else { xmlRpcResponse = new XmlRpcResponse(); - + // Code set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php xmlRpcResponse.SetFault( - XmlRpcErrorCodes.SERVER_ERROR_METHOD, + XmlRpcErrorCodes.SERVER_ERROR_METHOD, String.Format("Requested method [{0}] not found", methodName)); } @@ -786,11 +786,11 @@ namespace OpenSim.Framework.Servers.HttpServer response.KeepAlive = false; m_log.ErrorFormat("[BASE HTTP SERVER]: Handler not found for http request {0}", request.RawUrl); - + response.SendChunked = false; response.ContentLength64 = buf.Length; response.ContentEncoding = Encoding.UTF8; - + try { response.OutputStream.Write(buf, 0, buf.Length); @@ -872,13 +872,13 @@ namespace OpenSim.Framework.Servers.HttpServer OSD llsdRequest = null; OSD llsdResponse = null; - + bool LegacyLLSDLoginLibOMV = (requestBody.Contains("passwd") && requestBody.Contains("mac") && requestBody.Contains("viewer_digest")); - + if (requestBody.Length == 0) // Get Request { - requestBody = "requestget"; + requestBody = "requestget"; } try { @@ -1090,7 +1090,7 @@ namespace OpenSim.Framework.Servers.HttpServer string bestMatch = null; //m_log.DebugFormat("[BASE HTTP HANDLER]: Checking if we have an HTTP handler for {0}", searchquery); - + lock (m_HTTPHandlers) { foreach (string pattern in m_HTTPHandlers.Keys) @@ -1156,7 +1156,7 @@ namespace OpenSim.Framework.Servers.HttpServer // You have to specifically register for '/' and to get it, you must specificaly request it // if (pattern == "/" && searchquery == "/" || pattern != "/") - bestMatch = pattern; + bestMatch = pattern; } } } @@ -1236,11 +1236,11 @@ namespace OpenSim.Framework.Servers.HttpServer } public void HandleHTTPRequest(OSHttpRequest request, OSHttpResponse response) - { + { // m_log.DebugFormat( -// "[BASE HTTP SERVER]: HandleHTTPRequest for request to {0}, method {1}", +// "[BASE HTTP SERVER]: HandleHTTPRequest for request to {0}, method {1}", // request.RawUrl, request.HttpMethod); - + switch (request.HttpMethod) { case "OPTIONS": @@ -1256,7 +1256,7 @@ namespace OpenSim.Framework.Servers.HttpServer private void HandleContentVerbs(OSHttpRequest request, OSHttpResponse response) { // m_log.DebugFormat("[BASE HTTP SERVER]: HandleContentVerbs for request to {0}", request.RawUrl); - + // 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. // @@ -1391,7 +1391,7 @@ namespace OpenSim.Framework.Servers.HttpServer // m_log.DebugFormat( // "[BASE HTTP HANDLER]: TryGetHTTPHandlerPathBased() looking for HTTP handler to match {0}", searchquery); - + lock (m_HTTPHandlers) { foreach (string pattern in m_HTTPHandlers.Keys) @@ -1452,7 +1452,7 @@ namespace OpenSim.Framework.Servers.HttpServer //Even though only one other part of the entire code uses HTTPHandlers, we shouldn't expect this //and should check for NullReferenceExceptions - + if (string.IsNullOrEmpty(contentType)) { contentType = "text/html"; @@ -1472,8 +1472,8 @@ namespace OpenSim.Framework.Servers.HttpServer byte[] buffer; - if (!(contentType.Contains("image") - || contentType.Contains("x-shockwave-flash") + if (!(contentType.Contains("image") + || contentType.Contains("x-shockwave-flash") || contentType.Contains("application/x-oar"))) { // Text @@ -1504,7 +1504,7 @@ namespace OpenSim.Framework.Servers.HttpServer { response.OutputStream.Flush(); response.Send(); - + //if (!response.KeepAlive && response.ReuseContext) // response.FreeContext(); } @@ -1611,11 +1611,11 @@ namespace OpenSim.Framework.Servers.HttpServer m_httpListener2 = CoolHTTPListener.Create(m_listenIPAddress, (int)m_port); m_httpListener2.ExceptionThrown += httpServerException; m_httpListener2.LogWriter = httpserverlog; - - // Uncomment this line in addition to those in HttpServerLogWriter + + // Uncomment this line in addition to those in HttpServerLogWriter // if you want more detailed trace information from the HttpServer //m_httpListener2.UseTraceLogs = true; - + //m_httpListener2.DisconnectHandler = httpServerDisconnectMonitor; } else @@ -1643,8 +1643,8 @@ namespace OpenSim.Framework.Servers.HttpServer { m_log.Error("[BASE HTTP SERVER]: Error - " + e.Message); m_log.Error("[BASE HTTP SERVER]: Tip: Do you have permission to listen on port " + m_port + ", " + m_sslport + "?"); - - // We want this exception to halt the entire server since in current configurations we aren't too + + // We want this exception to halt the entire server since in current configurations we aren't too // useful without inbound HTTP. throw e; } @@ -1656,7 +1656,7 @@ namespace OpenSim.Framework.Servers.HttpServer { case SocketError.NotSocket: NotSocketErrors++; - + break; } } @@ -1686,12 +1686,11 @@ namespace OpenSim.Framework.Servers.HttpServer m_httpListener2.LogWriter = null; m_httpListener2.RequestReceived -= OnRequest; m_httpListener2.Stop(); - } + } catch (NullReferenceException) { m_log.Warn("[BASE HTTP SERVER]: Null Reference when stopping HttpServer."); } - } public void RemoveStreamHandler(string httpMethod, string path) @@ -1712,7 +1711,7 @@ namespace OpenSim.Framework.Servers.HttpServer m_HTTPHandlers.Remove(path); return; } - + m_HTTPHandlers.Remove(GetHandlerKey(httpMethod, path)); } } @@ -1728,7 +1727,6 @@ namespace OpenSim.Framework.Servers.HttpServer } RemoveHTTPHandler(httpMethod, path); - } public bool RemoveAgentHandler(string agent, IHttpAgentHandler handler) @@ -1759,7 +1757,6 @@ namespace OpenSim.Framework.Servers.HttpServer } } - public bool RemoveLLSDHandler(string path, LLSDMethod handler) { try @@ -1833,7 +1830,7 @@ namespace OpenSim.Framework.Servers.HttpServer oresp = osresp; } } - + /// /// Relays HttpServer log messages to our own logging mechanism. /// @@ -1852,7 +1849,7 @@ namespace OpenSim.Framework.Servers.HttpServer { case LogPrio.Trace: m_log.DebugFormat("[{0}]: {1}", source, message); - break; + break; case LogPrio.Debug: m_log.DebugFormat("[{0}]: {1}", source, message); break; @@ -1872,8 +1869,8 @@ namespace OpenSim.Framework.Servers.HttpServer break; } */ - + return; } } -} \ No newline at end of file +} diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index b860cf6bc0..d120f03dc9 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs @@ -225,7 +225,7 @@ namespace OpenSim } } MainConsole.Instance = null; - } + } */ configSource.Alias.AddAlias("On", true); configSource.Alias.AddAlias("Off", false); diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 4f2d223bbc..c85ff824d2 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -152,7 +152,7 @@ namespace OpenSim RegisterConsoleCommands(); base.StartupSpecific(); - + MainServer.Instance.AddStreamHandler(new OpenSim.SimStatusHandler()); MainServer.Instance.AddStreamHandler(new OpenSim.XSimStatusHandler(this)); if (userStatsURI != String.Empty) @@ -192,7 +192,7 @@ namespace OpenSim // Hook up to the watchdog timer Watchdog.OnWatchdogTimeout += WatchdogTimeoutHandler; - PrintFileToConsole("startuplogo.txt"); + PrintFileToConsole("startuplogo.txt"); // For now, start at the 'root' level by default if (m_sceneManager.Scenes.Count == 1) // If there is only one region, select it @@ -218,8 +218,8 @@ namespace OpenSim m_console.Commands.AddCommand("region", false, "debug packet", "debug packet ", - "Turn on packet debugging", - "If level > 255 then all incoming and outgoing packets are logged.\n" + "Turn on packet debugging", + "If level > 255 then all incoming and outgoing packets are logged.\n" + "If level <= 255 then incoming AgentUpdate and outgoing SimStats and SimulatorViewerTimeMessage packets are not logged.\n" + "If level <= 200 then incoming RequestImage and outgoing ImagePacket, ImageData, LayerData and CoarseLocationUpdate packets are not logged.\n" + "If level <= 100 then incoming ViewerEffect and AgentAnimation and outgoing ViewerEffect and AvatarAnimation packets are not logged.\n" @@ -561,11 +561,11 @@ namespace OpenSim { regInfo = new RegionInfo(regionName, regionFile, false, ConfigSource.Source, regionName); } - + IScene scene; PopulateRegionEstateInfo(regInfo); - CreateRegion(regInfo, true, out scene); - regInfo.EstateSettings.Save(); + CreateRegion(regInfo, true, out scene); + regInfo.EstateSettings.Save(); } /// @@ -943,7 +943,7 @@ namespace OpenSim delegate(Scene scene) { MainConsole.Instance.Output(String.Format( - "Region Name: {0}, Region XLoc: {1}, Region YLoc: {2}, Region Port: {3}", + "Region Name: {0}, Region XLoc: {1}, Region YLoc: {2}, Region Port: {3}", scene.RegionInfo.RegionName, scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY, diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index a6315a9a1e..f35691acb5 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -63,7 +63,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// Debug packet level. See OpenSim.RegisterConsoleCommands() for more details. /// protected int m_debugPacketLevel = 0; - + #region Events public event GenericMessage OnGenericMessage; @@ -287,7 +287,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP public event MuteListEntryRemove OnRemoveMuteListEntry; public event GodlikeMessage onGodlikeMessage; public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate; - #endregion Events @@ -329,12 +328,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// ownerless phantom. /// /// All manipulation of this set has to occur under an m_entityUpdates.SyncRoot lock - /// + /// /// protected HashSet m_killRecord; - -// protected HashSet m_attachmentsSent; - + +// protected HashSet m_attachmentsSent; + private int m_moneyBalance; private int m_animationSequenceNumber = 1; private bool m_SendLogoutPacketWhenClosing = true; @@ -383,22 +382,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP public string ActiveGroupName { get { return m_activeGroupName; } } public ulong ActiveGroupPowers { get { return m_activeGroupPowers; } } public bool IsGroupMember(UUID groupID) { return m_groupPowers.ContainsKey(groupID); } - + /// /// First name of the agent/avatar represented by the client /// public string FirstName { get { return m_firstName; } } - + /// /// Last name of the agent/avatar represented by the client /// public string LastName { get { return m_lastName; } } - + /// /// Full name of the client (first name and last name) /// public string Name { get { return FirstName + " " + LastName; } } - + public uint CircuitCode { get { return m_circuitCode; } } public int MoneyBalance { get { return m_moneyBalance; } } public int NextAnimationSequenceNumber { get { return m_animationSequenceNumber++; } } @@ -440,7 +439,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_entityUpdates = new PriorityQueue(m_scene.Entities.Count); m_fullUpdateDataBlocksBuilder = new List(); m_killRecord = new HashSet(); -// m_attachmentsSent = new HashSet(); +// m_attachmentsSent = new HashSet(); m_assetService = m_scene.RequestModuleInterface(); m_GroupsModule = scene.RequestModuleInterface(); @@ -654,7 +653,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // Make sure that we see any exception caused by the asynchronous operation. m_log.Error( string.Format("[LLCLIENTVIEW]: Caught exception while processing {0}", packetObject.Pack), e); - } + } } #endregion Packet Handling @@ -865,7 +864,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP foreach (GroupActiveProposals Proposal in Proposals) { GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); - + GAPIRP.AgentData.AgentID = AgentId; GAPIRP.AgentData.GroupID = groupID; GAPIRP.TransactionData.TransactionID = transactionID; @@ -889,7 +888,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (Proposals.Length == 0) { GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); - + GAPIRP.AgentData.AgentID = AgentId; GAPIRP.AgentData.GroupID = groupID; GAPIRP.TransactionData.TransactionID = transactionID; @@ -944,7 +943,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (Votes.Length == 0) { GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket(); - + GVHIRP.AgentData.AgentID = AgentId; GVHIRP.AgentData.GroupID = groupID; GVHIRP.TransactionData.TransactionID = transactionID; @@ -968,7 +967,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP OutPacket(GVHIRP, ThrottleOutPacketType.Task); } } - + public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) { GroupAccountDetailsReplyPacket GADRP = new GroupAccountDetailsReplyPacket(); @@ -987,13 +986,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP GADRP.HistoryData[0] = History; OutPacket(GADRP, ThrottleOutPacketType.Task); } - + public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier) { GroupAccountSummaryReplyPacket GASRP = (GroupAccountSummaryReplyPacket)PacketPool.Instance.GetPacket( PacketType.GroupAccountSummaryReply); - + GASRP.AgentData = new GroupAccountSummaryReplyPacket.AgentDataBlock(); GASRP.AgentData.AgentID = sender.AgentId; GASRP.AgentData.GroupID = groupID; @@ -1020,13 +1019,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP GASRP.MoneyData.LightTaxEstimate = 0; OutPacket(GASRP, ThrottleOutPacketType.Task); } - + public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) { GroupAccountTransactionsReplyPacket GATRP = (GroupAccountTransactionsReplyPacket)PacketPool.Instance.GetPacket( PacketType.GroupAccountTransactionsReply); - + GATRP.AgentData = new GroupAccountTransactionsReplyPacket.AgentDataBlock(); GATRP.AgentData.AgentID = sender.AgentId; GATRP.AgentData.GroupID = groupID; @@ -1510,7 +1509,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP public void SendKillObject(ulong regionHandle, uint localID) { // m_log.DebugFormat("[CLIENT]: Sending KillObjectPacket to {0} for {1} in {2}", Name, localID, regionHandle); - + KillObjectPacket kill = (KillObjectPacket)PacketPool.Instance.GetPacket(PacketType.KillObject); // TODO: don't create new blocks if recycling an old packet kill.ObjectData = new KillObjectPacket.ObjectDataBlock[1]; @@ -3469,9 +3468,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP objupdate.ObjectData[0] = CreateAvatarUpdateBlock(presence); OutPacket(objupdate, ThrottleOutPacketType.Task); - + // We need to record the avatar local id since the root prim of an attachment points to this. -// m_attachmentsSent.Add(avatar.LocalId); +// m_attachmentsSent.Add(avatar.LocalId); } public void SendCoarseLocationUpdate(List users, List CoarseLocations) @@ -3519,7 +3518,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP #region Primitive Packet/Data Sending Methods /// - /// Generate one of the object update packets based on PrimUpdateFlags + /// Generate one of the object update packets based on PrimUpdateFlags /// and broadcast the packet to clients /// public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags) @@ -3527,7 +3526,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP double priority = m_prioritizer.GetUpdatePriority(this, entity); lock (m_entityUpdates.SyncRoot) - m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags), entity.LocalId); + m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags), entity.LocalId); } private void ProcessEntityUpdates(int maxUpdates) @@ -3544,20 +3543,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP EntityUpdate update; while (updatesThisCall < maxUpdates && m_entityUpdates.TryDequeue(out update)) { - // Please do not remove this unless you can demonstrate on the OpenSim mailing list that a client + // Please do not remove this unless you can demonstrate on the OpenSim mailing list that a client // will never receive an update after a prim kill. Even then, keeping the kill record may be a good // safety measure. // - // Receiving updates after kills results in undeleteable prims that persist until relog and + // Receiving updates after kills results in undeleteable prims that persist until relog and // currently occurs because prims can be deleted before all queued updates are sent. if (m_killRecord.Contains(update.Entity.LocalId)) { // m_log.WarnFormat( -// "[CLIENT]: Preventing full update for prim with local id {0} after client for user {1} told it was deleted", -// update.Entity.LocalId, Name); +// "[CLIENT]: Preventing full update for prim with local id {0} after client for user {1} told it was deleted", +// update.Entity.LocalId, Name); continue; } - + if (update.Entity is SceneObjectPart) { SceneObjectPart part = (SceneObjectPart)update.Entity; @@ -3642,28 +3641,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP // string text = sop.Text; // if (text.IndexOf("\n") >= 0) // text = text.Remove(text.IndexOf("\n")); -// +// // if (m_attachmentsSent.Contains(sop.ParentID)) // { //// m_log.DebugFormat( //// "[CLIENT]: Sending full info about attached prim {0} text {1}", //// sop.LocalId, text); -// +// // objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock(sop, this.m_agentId)); -// +// // m_attachmentsSent.Add(sop.LocalId); // } // else // { // m_log.DebugFormat( -// "[CLIENT]: Requeueing full update of prim {0} text {1} since we haven't sent its parent {2} yet", +// "[CLIENT]: Requeueing full update of prim {0} text {1} since we haven't sent its parent {2} yet", // sop.LocalId, text, sop.ParentID); -// -// m_entityUpdates.Enqueue(double.MaxValue, update, sop.LocalId); +// +// m_entityUpdates.Enqueue(double.MaxValue, update, sop.LocalId); // } // } // else -// { +// { objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock((SceneObjectPart)update.Entity, this.m_agentId)); // } } @@ -3977,7 +3976,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_propertiesPacketTimer.Stop(); return; } - + m_propertiesPacketTimer.Stop(); m_propertiesPacketTimer.Start(); } @@ -4208,7 +4207,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) { - ParcelPropertiesMessage updateMessage = new ParcelPropertiesMessage(); + ParcelPropertiesMessage updateMessage = new ParcelPropertiesMessage(); updateMessage.AABBMax = landData.AABBMax; updateMessage.AABBMin = landData.AABBMin; @@ -4252,7 +4251,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP updateMessage.PassHours = landData.PassHours; updateMessage.PassPrice = landData.PassPrice; updateMessage.PublicCount = 0; //TODO: Unimplemented - + updateMessage.RegionPushOverride = (regionFlags & (uint)RegionFlags.RestrictPushObject) > 0; updateMessage.RegionDenyAnonymous = (regionFlags & (uint)RegionFlags.DenyAnonymous) > 0; @@ -4282,13 +4281,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP updateMessage.UserLocation = landData.UserLocation; updateMessage.UserLookAt = landData.UserLookAt; - updateMessage.MediaType = landData.MediaType; - updateMessage.MediaDesc = landData.MediaDescription; - updateMessage.MediaWidth = landData.MediaWidth; - updateMessage.MediaHeight = landData.MediaHeight; - updateMessage.MediaLoop = landData.MediaLoop; - updateMessage.ObscureMusic = landData.ObscureMusic; - updateMessage.ObscureMedia = landData.ObscureMedia; + updateMessage.MediaType = landData.MediaType; + updateMessage.MediaDesc = landData.MediaDescription; + updateMessage.MediaWidth = landData.MediaWidth; + updateMessage.MediaHeight = landData.MediaHeight; + updateMessage.MediaLoop = landData.MediaLoop; + updateMessage.ObscureMusic = landData.ObscureMusic; + updateMessage.ObscureMedia = landData.ObscureMedia; try { @@ -4297,8 +4296,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP { eq.ParcelProperties(updateMessage, this.AgentId); } else { - m_log.Warn("No EQ Interface when sending parcel data."); - } + m_log.Warn("No EQ Interface when sending parcel data."); + } } catch (Exception ex) { @@ -4671,9 +4670,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP } // m_log.DebugFormat( -// "[LLCLIENTVIEW]: Constructing client update for part {0} {1} with flags {2}, localId {3}", +// "[LLCLIENTVIEW]: Constructing client update for part {0} {1} with flags {2}, localId {3}", // data.Name, update.FullID, flags, update.ID); - + update.UpdateFlags = (uint)flags; #endregion PrimFlags @@ -4806,11 +4805,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP AddLocalPacketHandler(PacketType.ObjectScale, HandleObjectScale); AddLocalPacketHandler(PacketType.ObjectRotation, HandleObjectRotation); AddLocalPacketHandler(PacketType.ObjectFlagUpdate, HandleObjectFlagUpdate); - + // Handle ObjectImage (TextureEntry) updates synchronously, since when updating multiple prim faces at once, // some clients will send out a separate ObjectImage packet for each face AddLocalPacketHandler(PacketType.ObjectImage, HandleObjectImage, false); - + AddLocalPacketHandler(PacketType.ObjectGrab, HandleObjectGrab, false); AddLocalPacketHandler(PacketType.ObjectGrabUpdate, HandleObjectGrabUpdate, false); AddLocalPacketHandler(PacketType.ObjectDeGrab, HandleObjectDeGrab); @@ -5065,12 +5064,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP return false; } - + private bool HandleParcelGodMarkAsContent(IClientAPI client, Packet Packet) { ParcelGodMarkAsContentPacket ParcelGodMarkAsContent = (ParcelGodMarkAsContentPacket)Packet; - + ParcelGodMark ParcelGodMarkAsContentHandler = OnParcelGodMark; if (ParcelGodMarkAsContentHandler != null) { @@ -5081,11 +5080,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleFreezeUser(IClientAPI client, Packet Packet) { FreezeUserPacket FreezeUser = (FreezeUserPacket)Packet; - + FreezeUserUpdate FreezeUserHandler = OnParcelFreezeUser; if (FreezeUserHandler != null) { @@ -5097,12 +5096,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleEjectUser(IClientAPI client, Packet Packet) { EjectUserPacket EjectUser = (EjectUserPacket)Packet; - + EjectUserUpdate EjectUserHandler = OnParcelEjectUser; if (EjectUserHandler != null) { @@ -5114,12 +5113,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleParcelBuyPass(IClientAPI client, Packet Packet) { ParcelBuyPassPacket ParcelBuyPass = (ParcelBuyPassPacket)Packet; - + ParcelBuyPass ParcelBuyPassHandler = OnParcelBuyPass; if (ParcelBuyPassHandler != null) { @@ -5130,7 +5129,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleParcelBuyRequest(IClientAPI sender, Packet Pack) { ParcelBuyPacket parcel = (ParcelBuyPacket)Pack; @@ -5352,7 +5351,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP ScriptDialogReplyPacket rdialog = (ScriptDialogReplyPacket)Pack; //m_log.DebugFormat("[CLIENT]: Received ScriptDialogReply from {0}", rdialog.Data.ObjectID); - + #region Packet Session and User Check if (m_checkPackets) { @@ -5498,12 +5497,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return true; } - + private bool HandleFindAgent(IClientAPI client, Packet Packet) { FindAgentPacket FindAgent = (FindAgentPacket)Packet; - + FindAgentUpdate FindAgentHandler = OnFindAgent; if (FindAgentHandler != null) { @@ -5512,12 +5511,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleTrackAgent(IClientAPI client, Packet Packet) { TrackAgentPacket TrackAgent = (TrackAgentPacket)Packet; - + TrackAgentUpdate TrackAgentHandler = OnTrackAgent; if (TrackAgentHandler != null) { @@ -5528,7 +5527,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandlerRezObject(IClientAPI sender, Packet Pack) { RezObjectPacket rezPacket = (RezObjectPacket)Pack; @@ -7184,19 +7183,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP UUID requestID = new UUID(transfer.TransferInfo.Params, 80); // m_log.DebugFormat( -// "[CLIENT]: Got request for asset {0} from item {1} in prim {2} by {3}", +// "[CLIENT]: Got request for asset {0} from item {1} in prim {2} by {3}", // requestID, itemID, taskID, Name); - + if (!(((Scene)m_scene).Permissions.BypassPermissions())) { if (taskID != UUID.Zero) // Prim { SceneObjectPart part = ((Scene)m_scene).GetSceneObjectPart(taskID); - + if (part == null) { m_log.WarnFormat( - "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but prim does not exist", + "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but prim does not exist", Name, requestID, itemID, taskID); return true; } @@ -7205,11 +7204,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (tii == null) { m_log.WarnFormat( - "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but item does not exist", - Name, requestID, itemID, taskID); + "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but item does not exist", + Name, requestID, itemID, taskID); return true; - } - + } + if (tii.Type == (int)AssetType.LSLText) { if (!((Scene)m_scene).Permissions.CanEditScript(itemID, taskID, AgentId)) @@ -7228,41 +7227,41 @@ namespace OpenSim.Region.ClientStack.LindenUDP { m_log.WarnFormat( "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but the prim is owned by {4}", - Name, requestID, itemID, taskID, part.OwnerID); + Name, requestID, itemID, taskID, part.OwnerID); return true; } - + if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) { m_log.WarnFormat( - "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but modify permissions are not set", - Name, requestID, itemID, taskID); + "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but modify permissions are not set", + Name, requestID, itemID, taskID); return true; } - + if (tii.OwnerID != AgentId) { m_log.WarnFormat( - "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but the item is owned by {4}", - Name, requestID, itemID, taskID, tii.OwnerID); + "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but the item is owned by {4}", + Name, requestID, itemID, taskID, tii.OwnerID); return true; } - + if (( - tii.CurrentPermissions & ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) + tii.CurrentPermissions & ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) != ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) { m_log.WarnFormat( - "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but item permissions are not modify/copy/transfer", - Name, requestID, itemID, taskID); + "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but item permissions are not modify/copy/transfer", + Name, requestID, itemID, taskID); return true; } - + if (tii.AssetID != requestID) { m_log.WarnFormat( - "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but this does not match item's asset {4}", - Name, requestID, itemID, taskID, tii.AssetID); + "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but this does not match item's asset {4}", + Name, requestID, itemID, taskID, tii.AssetID); return true; } } @@ -7866,7 +7865,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP newTaskItem, updatetask.UpdateData.LocalID); } } - } + } return true; } @@ -8861,7 +8860,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // return true; } - + private bool HandleRequestRegionInfo(IClientAPI sender, Packet Pack) { RequestRegionInfoPacket.AgentDataBlock mPacket = ((RequestRegionInfoPacket)Pack).AgentData; @@ -8882,7 +8881,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return true; } - + private bool HandleEstateCovenantRequest(IClientAPI sender, Packet Pack) { @@ -8919,7 +8918,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP return true; } - + private bool HandleGodUpdateRegionInfoUpdate(IClientAPI client, Packet Packet) { GodUpdateRegionInfoPacket GodUpdateRegionInfo = @@ -8939,7 +8938,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleSimWideDeletes(IClientAPI client, Packet Packet) { SimWideDeletesPacket SimWideDeletesRequest = @@ -8952,7 +8951,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleGodlikeMessage(IClientAPI client, Packet Packet) { GodlikeMessagePacket GodlikeMessage = @@ -8969,7 +8968,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleSaveStatePacket(IClientAPI client, Packet Packet) { StateSavePacket SaveStateMessage = @@ -8982,7 +8981,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleGodKickUser(IClientAPI sender, Packet Pack) { GodKickUserPacket gkupack = (GodKickUserPacket)Pack; @@ -9120,7 +9119,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return true; } - + #endregion Economy/Transaction Packets #region Script Packets @@ -9333,7 +9332,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return true; } - + private bool HandleUpdateMuteListEntry(IClientAPI client, Packet Packet) { UpdateMuteListEntryPacket UpdateMuteListEntry = @@ -9349,7 +9348,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleRemoveMuteListEntry(IClientAPI client, Packet Packet) { RemoveMuteListEntryPacket RemoveMuteListEntry = @@ -9365,7 +9364,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleUserReport(IClientAPI client, Packet Packet) { UserReportPacket UserReport = @@ -9390,7 +9389,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleSendPostcard(IClientAPI client, Packet packet) { // SendPostcardPacket SendPostcard = @@ -9672,7 +9671,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP return true; } - + private bool HandleGroupVoteHistoryRequest(IClientAPI client, Packet Packet) { GroupVoteHistoryRequestPacket GroupVoteHistoryRequest = @@ -9685,7 +9684,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleGroupActiveProposalsRequest(IClientAPI client, Packet Packet) { GroupActiveProposalsRequestPacket GroupActiveProposalsRequest = @@ -9698,7 +9697,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleGroupAccountDetailsRequest(IClientAPI client, Packet Packet) { GroupAccountDetailsRequestPacket GroupAccountDetailsRequest = @@ -9711,7 +9710,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleGroupAccountSummaryRequest(IClientAPI client, Packet Packet) { GroupAccountSummaryRequestPacket GroupAccountSummaryRequest = @@ -9724,7 +9723,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleGroupTransactionsDetailsRequest(IClientAPI client, Packet Packet) { GroupAccountTransactionsRequestPacket GroupAccountTransactionsRequest = @@ -9737,7 +9736,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleGroupTitlesRequest(IClientAPI sender, Packet Pack) { GroupTitlesRequestPacket groupTitlesRequest = @@ -11185,26 +11184,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (m_debugPacketLevel > 0) { bool outputPacket = true; - - if (m_debugPacketLevel <= 255 + + if (m_debugPacketLevel <= 255 && (packet.Type == PacketType.SimStats || packet.Type == PacketType.SimulatorViewerTimeMessage)) outputPacket = false; - - if (m_debugPacketLevel <= 200 - && - (packet.Type == PacketType.ImagePacket + + if (m_debugPacketLevel <= 200 + && (packet.Type == PacketType.ImagePacket || packet.Type == PacketType.ImageData || packet.Type == PacketType.LayerData - || packet.Type == PacketType.CoarseLocationUpdate)) + || packet.Type == PacketType.CoarseLocationUpdate)) outputPacket = false; - + if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.AvatarAnimation || packet.Type == PacketType.ViewerEffect)) - outputPacket = false; - + outputPacket = false; + if (outputPacket) m_log.DebugFormat("[CLIENT]: Packet OUT {0}", packet.Type); } - + m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting); } @@ -11279,16 +11277,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (m_debugPacketLevel > 0) { bool outputPacket = true; - + if (m_debugPacketLevel <= 255 && packet.Type == PacketType.AgentUpdate) outputPacket = false; - + if (m_debugPacketLevel <= 200 && packet.Type == PacketType.RequestImage) outputPacket = false; - + if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.ViewerEffect || packet.Type == PacketType.AgentAnimation)) outputPacket = false; - + if (outputPacket) m_log.DebugFormat("[CLIENT]: Packet IN {0}", packet.Type); } @@ -11551,12 +11549,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP UUID requestID = UUID.Zero; byte source = (byte)SourceType.Asset; - - if (transferRequest.TransferInfo.SourceType == (int)SourceType.Asset) + + if (transferRequest.TransferInfo.SourceType == (int)SourceType.Asset) { requestID = new UUID(transferRequest.TransferInfo.Params, 0); } - else if (transferRequest.TransferInfo.SourceType == (int)SourceType.SimInventoryItem) + else if (transferRequest.TransferInfo.SourceType == (int)SourceType.SimInventoryItem) { requestID = new UUID(transferRequest.TransferInfo.Params, 80); source = (byte)SourceType.SimInventoryItem; @@ -11802,7 +11800,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP public PacketMethod method; public bool Async; } - + public class AsyncPacketProcess { public bool result = false; @@ -11871,8 +11869,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP dialog.Data.FirstName = Util.StringToBytes256(ownerFirstName); dialog.Data.LastName = Util.StringToBytes256(ownerLastName); dialog.Data.Message = Util.StringToBytes256(message); - - + ScriptDialogPacket.ButtonsBlock[] buttons = new ScriptDialogPacket.ButtonsBlock[1]; buttons[0] = new ScriptDialogPacket.ButtonsBlock(); buttons[0].ButtonLabel = Util.StringToBytes256("!!llTextBox!!"); @@ -11886,7 +11883,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { ScenePresence presence = p as ScenePresence; // It turns out to get the agent to stop flying, you have to feed it stop flying velocities - // There's no explicit message to send the client to tell it to stop flying.. it relies on the + // There's no explicit message to send the client to tell it to stop flying.. it relies on the // velocity, collision plane and avatar height // Add 1/6 the avatar's height to it's position so it doesn't shoot into the air @@ -11903,7 +11900,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // attach a suitable collision plane regardless of the actual situation to force the LLClient to land. // Collision plane below the avatar's position a 6th of the avatar's height is suitable. - // Mind you, that this method doesn't get called if the avatar's velocity magnitude is greater then a + // Mind you, that this method doesn't get called if the avatar's velocity magnitude is greater then a // certain amount.. because the LLClient wouldn't land in that situation anyway. // why are we still testing for this really old height value default??? diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 7270304a2d..5604f490f2 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -48,8 +48,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments protected Scene m_scene = null; - public string Name { get { return "Attachments Module"; } } - public Type ReplaceableInterface { get { return null; } } + public string Name { get { return "Attachments Module"; } } + public Type ReplaceableInterface { get { return null; } } public void Initialise(IConfigSource source) {} @@ -80,7 +80,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments client.OnRezMultipleAttachmentsFromInv += RezMultipleAttachmentsFromInventory; client.OnObjectAttach += AttachObject; client.OnObjectDetach += DetachObject; - client.OnDetachAttachmentIntoInv += ShowDetachInUserInventory; + client.OnDetachAttachmentIntoInv += ShowDetachInUserInventory; } public void UnsubscribeFromClientEvents(IClientAPI client) @@ -89,7 +89,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments client.OnRezMultipleAttachmentsFromInv -= RezMultipleAttachmentsFromInventory; client.OnObjectAttach -= AttachObject; client.OnObjectDetach -= DetachObject; - client.OnDetachAttachmentIntoInv -= ShowDetachInUserInventory; + client.OnDetachAttachmentIntoInv -= ShowDetachInUserInventory; } /// @@ -173,12 +173,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments UUID itemID = UUID.Zero; if (sp != null) { - foreach(SceneObjectGroup grp in sp.GetAttachments(AttachmentPt)) + foreach (SceneObjectGroup grp in sp.GetAttachments(AttachmentPt)) { itemID = grp.GetFromItemID(); if (itemID != UUID.Zero) DetachSingleAttachmentToInv(itemID, remoteClient); - } + } } if (group.GetFromItemID() == UUID.Zero) @@ -225,7 +225,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments public UUID RezSingleAttachmentFromInventory( IClientAPI remoteClient, UUID itemID, uint AttachmentPt, bool updateInventoryStatus) - { + { SceneObjectGroup att = RezSingleAttachmentFromInventoryInternal(remoteClient, itemID, AttachmentPt); if (updateInventoryStatus) @@ -241,8 +241,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments if (null == att) return UUID.Zero; else - return att.UUID; - } + return att.UUID; + } protected SceneObjectGroup RezSingleAttachmentFromInventoryInternal( IClientAPI remoteClient, UUID itemID, uint AttachmentPt) @@ -298,7 +298,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments } return null; - } + } public UUID SetAttachmentInventoryStatus( SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt) @@ -473,7 +473,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments sog.RootPart.IsAttachment = false; sog.AbsolutePosition = sog.RootPart.AttachedPos; UpdateKnownItem(client, sog, sog.GetFromItemID(), sog.OwnerID); - sog.SetAttachmentPoint(attachmentPoint); + sog.SetAttachmentPoint(attachmentPoint); } /// @@ -600,7 +600,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments // In case it is later dropped again, don't let // it get cleaned up so.RootPart.RemFlag(PrimFlags.TemporaryOnRez); - so.HasGroupChanged = false; + so.HasGroupChanged = false; } } } diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs index 032e55a369..25322a17c0 100644 --- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs @@ -132,7 +132,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule try { deadAvatar.ControllingClient.SendAgentAlertMessage(deadAvatarMessage, true); - if(killingAvatar != null) + if (killingAvatar != null) killingAvatar.ControllingClient.SendAlertMessage("You fragged " + deadAvatar.Firstname + " " + deadAvatar.Lastname); } catch (InvalidOperationException) @@ -143,7 +143,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule } private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID) - { + { try { ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); diff --git a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs index 4b30b0d9ee..5ec64d5141 100644 --- a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs @@ -58,13 +58,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods public void SubscribeToClientEvents(IClientAPI client) { client.OnGodKickUser += KickUser; - client.OnRequestGodlikePowers += RequestGodlikePowers; - } + client.OnRequestGodlikePowers += RequestGodlikePowers; + } public void UnsubscribeFromClientEvents(IClientAPI client) { client.OnGodKickUser -= KickUser; - client.OnRequestGodlikePowers -= RequestGodlikePowers; + client.OnRequestGodlikePowers -= RequestGodlikePowers; } public void RequestGodlikePowers( diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs index 13bae2eac3..43bbf0d5ad 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs @@ -137,7 +137,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage { if (scene.Entities.ContainsKey(toAgentID) && scene.Entities[toAgentID] is ScenePresence) - { + { // m_log.DebugFormat( // "[INSTANT MESSAGE]: Looking for root agent {0} in {1}", // toAgentID.ToString(), scene.RegionInfo.RegionName); diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs index 52342ec357..c1df827069 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs @@ -179,14 +179,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver m_log.DebugFormat( "[INVENTORY ARCHIVER]: Successfully loaded {0} assets with {1} failures", successfulAssetRestores, failedAssetRestores); - m_log.InfoFormat("[INVENTORY ARCHIVER]: Successfully loaded {0} items", successfulItemRestores); + m_log.InfoFormat("[INVENTORY ARCHIVER]: Successfully loaded {0} items", successfulItemRestores); return loadedNodes; } finally { m_loadStream.Close(); - } + } } public void Close() @@ -201,7 +201,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver /// The item archive path to replicate /// The root folder for the inventory load /// - /// The folders that we have resolved so far for a given archive path. + /// The folders that we have resolved so far for a given archive path. /// This method will add more folders if necessary /// /// @@ -246,17 +246,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver /// The root folder for the inventory load /// /// - /// The folders that we have resolved so far for a given archive path. + /// The folders that we have resolved so far for a given archive path. /// /// /// The folder in the user's inventory that matches best the archive path given. If no such folder was found /// then the passed in root destination folder is returned. - /// + /// protected InventoryFolderBase ResolveDestinationFolder( - InventoryFolderBase rootDestFolder, - ref string archivePath, + InventoryFolderBase rootDestFolder, + ref string archivePath, Dictionary resolvedFolders) - { + { // string originalArchivePath = archivePath; while (archivePath.Length > 0) @@ -370,7 +370,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver if (0 == i) loadedNodes.Add(destFolder); - } + } } /// diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index 9908018d25..bae5a7a289 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs @@ -119,7 +119,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver protected void ReceivedAllAssets(ICollection assetsFoundUuids, ICollection assetsNotFoundUuids) { Exception reportedException = null; - bool succeeded = true; + bool succeeded = true; try { @@ -136,7 +136,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver finally { m_saveStream.Close(); - } + } m_module.TriggerInventoryArchiveSaved( m_id, succeeded, m_userInfo, m_invPath, m_saveStream, reportedException); @@ -270,7 +270,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver { // We couldn't find the path indicated string errorMessage = string.Format("Aborted save. Could not find inventory path {0}", m_invPath); - Exception e = new InventoryArchiverException(errorMessage); + Exception e = new InventoryArchiverException(errorMessage); m_module.TriggerInventoryArchiveSaved(m_id, false, m_userInfo, m_invPath, m_saveStream, e); throw e; } @@ -283,7 +283,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver "[INVENTORY ARCHIVER]: Found folder {0} {1} at {2}", inventoryFolder.Name, inventoryFolder.ID, - m_invPath == String.Empty ? InventoryFolderImpl.PATH_DELIMITER : m_invPath ); + m_invPath == String.Empty ? InventoryFolderImpl.PATH_DELIMITER : m_invPath); //recurse through all dirs getting dirs and files SaveInvFolder(inventoryFolder, ArchiveConstants.INVENTORY_PATH, !saveFolderContentsOnly); @@ -301,7 +301,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver //SaveUsers(); new AssetsRequest( - new AssetsArchiver(m_archiveWriter), m_assetUuids, m_scene.AssetService, ReceivedAllAssets).Execute(); + new AssetsArchiver(m_archiveWriter), m_assetUuids, m_scene.AssetService, ReceivedAllAssets).Execute(); } catch (Exception) { diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverException.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverException.cs index e07e2ca689..5fd1a7ee82 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverException.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverException.cs @@ -33,7 +33,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver /// Signals an inventory archiving problem /// public class InventoryArchiverException : Exception - { + { public InventoryArchiverException(string message) : base(message) {} public InventoryArchiverException(string message, Exception e) : base(message, e) {} } diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs index f03f2a1514..2eaca499b0 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs @@ -91,12 +91,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver scene.AddCommand( this, "load iar", - "load iar []", + "load iar []", //"load iar [--merge] []", "Load user inventory archive (IAR).", //"--merge is an option which merges the loaded IAR with existing inventory folders where possible, rather than always creating new ones" //+ " is user's first name." + Environment.NewLine - " is user's first name." + Environment.NewLine + " is user's first name." + Environment.NewLine + " is user's last name." + Environment.NewLine + " is the path inside the user's inventory where the IAR should be loaded." + Environment.NewLine + " is the user's password." + Environment.NewLine @@ -241,7 +241,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver if (CheckPresence(userInfo.PrincipalID)) { InventoryArchiveReadRequest request; - bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false); + bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false); try { @@ -286,10 +286,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver if (CheckPresence(userInfo.PrincipalID)) { InventoryArchiveReadRequest request; - bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false); + bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false); try - { + { request = new InventoryArchiveReadRequest(m_aScene, userInfo, invPath, loadPath, merge); } catch (EntryPointNotFoundException e) @@ -325,20 +325,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver protected void HandleLoadInvConsoleCommand(string module, string[] cmdparams) { try - { - m_log.Info("[INVENTORY ARCHIVER]: PLEASE NOTE THAT THIS FACILITY IS EXPERIMENTAL. BUG REPORTS WELCOME."); - - Dictionary options = new Dictionary(); + { + m_log.Info("[INVENTORY ARCHIVER]: PLEASE NOTE THAT THIS FACILITY IS EXPERIMENTAL. BUG REPORTS WELCOME."); + + Dictionary options = new Dictionary(); OptionSet optionSet = new OptionSet().Add("m|merge", delegate (string v) { options["merge"] = v != null; }); List mainParams = optionSet.Parse(cmdparams); - + if (mainParams.Count < 6) { m_log.Error( "[INVENTORY ARCHIVER]: usage is load iar [--merge] []"); return; - } + } string firstName = mainParams[2]; string lastName = mainParams[3]; @@ -353,7 +353,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver if (DearchiveInventory(firstName, lastName, invPath, pass, loadPath, options)) m_log.InfoFormat( "[INVENTORY ARCHIVER]: Loaded archive {0} for {1} {2}", - loadPath, firstName, lastName); + loadPath, firstName, lastName); } catch (InventoryArchiverException e) { @@ -390,7 +390,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver "[INVENTORY ARCHIVER]: Saving archive {0} using inventory path {1} for {2} {3}", savePath, invPath, firstName, lastName); - ArchiveInventory(id, firstName, lastName, invPath, pass, savePath, new Dictionary()); + ArchiveInventory(id, firstName, lastName, invPath, pass, savePath, new Dictionary()); } catch (InventoryArchiverException e) { @@ -398,7 +398,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver } lock (m_pendingConsoleSaves) - m_pendingConsoleSaves.Add(id); + m_pendingConsoleSaves.Add(id); } private void SaveInvConsoleCommandCompleted( diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index d66a1d0640..938886b2d3 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs @@ -58,18 +58,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests /// /// Stream of data representing a common IAR that can be reused in load tests. /// - protected MemoryStream m_iarStream; + protected MemoryStream m_iarStream; protected UserAccount m_ua1 = new UserAccount { PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000555"), FirstName = "Mr", - LastName = "Tiddles" }; + LastName = "Tiddles" }; protected UserAccount m_ua2 = new UserAccount { PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000666"), FirstName = "Lord", - LastName = "Lucan" }; + LastName = "Lucan" }; string m_item1Name = "b.lsl"; private void SaveCompleted( @@ -86,7 +86,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests } protected void ConstructDefaultIarForTestLoad() - { + { string archiveItemName = InventoryArchiveWriteRequest.CreateArchiveItemName(m_item1Name, UUID.Random()); MemoryStream archiveWriteStream = new MemoryStream(); @@ -104,7 +104,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests string item1FileName = string.Format("{0}{1}", ArchiveConstants.INVENTORY_PATH, archiveItemName); tar.WriteFile(item1FileName, UserInventoryItemSerializer.Serialize(item1)); - tar.Close(); + tar.Close(); m_iarStream = new MemoryStream(archiveWriteStream.ToArray()); } @@ -341,7 +341,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests // Assert.That(gotObject2File, Is.True, "No object2 file in archive"); // TODO: Test presence of more files and contents of files. - } + } /// /// Test that things work when the load path specified starts with a slash @@ -349,22 +349,22 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests [Test] public void TestLoadIarPathStartsWithSlash() { - TestHelper.InMethod(); + TestHelper.InMethod(); // log4net.Config.XmlConfigurator.Configure(); SerialiserModule serialiserModule = new SerialiserModule(); - InventoryArchiverModule archiverModule = new InventoryArchiverModule(true); - Scene scene = SceneSetupHelpers.SetupScene("inventory"); + InventoryArchiverModule archiverModule = new InventoryArchiverModule(true); + Scene scene = SceneSetupHelpers.SetupScene("inventory"); SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); - UserProfileTestUtils.CreateUserWithInventory(scene, m_ua1, "password"); + UserProfileTestUtils.CreateUserWithInventory(scene, m_ua1, "password"); archiverModule.DearchiveInventory(m_ua1.FirstName, m_ua1.LastName, "/Objects", "password", m_iarStream); InventoryItemBase foundItem1 = InventoryArchiveUtils.FindItemByPath( scene.InventoryService, m_ua1.PrincipalID, "/Objects/" + m_item1Name); - Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1 in TestLoadIarFolderStartsWithSlash()"); + Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1 in TestLoadIarFolderStartsWithSlash()"); } /// @@ -376,7 +376,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests [Test] public void TestLoadIarV0_1ExistingUsers() { - TestHelper.InMethod(); + TestHelper.InMethod(); //log4net.Config.XmlConfigurator.Configure(); SerialiserModule serialiserModule = new SerialiserModule(); @@ -386,9 +386,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests Scene scene = SceneSetupHelpers.SetupScene("inventory"); SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); - - UserProfileTestUtils.CreateUserWithInventory(scene, m_ua1, "meowfood"); - UserProfileTestUtils.CreateUserWithInventory(scene, m_ua2, "hampshire"); + + UserProfileTestUtils.CreateUserWithInventory(scene, m_ua1, "meowfood"); + UserProfileTestUtils.CreateUserWithInventory(scene, m_ua2, "hampshire"); archiverModule.DearchiveInventory(m_ua1.FirstName, m_ua1.LastName, "/", "meowfood", m_iarStream); @@ -450,7 +450,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests string userFirstName = "Jock"; string userLastName = "Stirrup"; UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020"); - UserProfileTestUtils.CreateUserWithInventory(scene, userFirstName, userLastName, userId, "meowfood"); + UserProfileTestUtils.CreateUserWithInventory(scene, userFirstName, userLastName, userId, "meowfood"); // Create asset SceneObjectGroup object1; @@ -524,7 +524,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests [Test] public void TestLoadIarV0_1AbsentUsers() { - TestHelper.InMethod(); + TestHelper.InMethod(); //log4net.Config.XmlConfigurator.Configure(); string userFirstName = "Charlie"; @@ -562,7 +562,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests Scene scene = SceneSetupHelpers.SetupScene("inventory"); SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); - UserProfileTestUtils.CreateUserWithInventory(scene, userFirstName, userLastName, userUuid, "meowfood"); + UserProfileTestUtils.CreateUserWithInventory(scene, userFirstName, userLastName, userUuid, "meowfood"); archiverModule.DearchiveInventory(userFirstName, userLastName, "/", "meowfood", archiveReadStream); @@ -680,8 +680,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests string folder2aArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2aName, UUID.Random()); string folder2bArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2bName, UUID.Random()); - string iarPath1 = string.Join("", new string[] { folder1ArchiveName, folder2aArchiveName }); - string iarPath2 = string.Join("", new string[] { folder1ArchiveName, folder2bArchiveName }); + string iarPath1 = string.Join("", new string[] { folder1ArchiveName, folder2aArchiveName }); + string iarPath2 = string.Join("", new string[] { folder1ArchiveName, folder2bArchiveName }); { // Test replication of path1 @@ -694,7 +694,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, ua1.PrincipalID, folder1Name); Assert.That(folder1Candidates.Count, Is.EqualTo(1)); - InventoryFolderBase folder1 = folder1Candidates[0]; + InventoryFolderBase folder1 = folder1Candidates[0]; List folder2aCandidates = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, folder2aName); Assert.That(folder2aCandidates.Count, Is.EqualTo(1)); @@ -715,11 +715,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests List folder2aCandidates = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, folder2aName); - Assert.That(folder2aCandidates.Count, Is.EqualTo(1)); + Assert.That(folder2aCandidates.Count, Is.EqualTo(1)); List folder2bCandidates = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, folder2bName); - Assert.That(folder2bCandidates.Count, Is.EqualTo(1)); + Assert.That(folder2bCandidates.Count, Is.EqualTo(1)); } } @@ -741,7 +741,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests InventoryFolderBase folder1 = UserInventoryTestUtils.CreateInventoryFolder( - scene.InventoryService, ua1.PrincipalID, folder1ExistingName); + scene.InventoryService, ua1.PrincipalID, folder1ExistingName); string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random()); string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random()); @@ -772,7 +772,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests List folder2PostCandidates = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1Post, "b"); Assert.That(folder2PostCandidates.Count, Is.EqualTo(1)); - } + } /// /// Test replication of a partly existing archive path to the user's inventory. This should create @@ -792,7 +792,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests InventoryFolderBase folder1 = UserInventoryTestUtils.CreateInventoryFolder( - scene.InventoryService, ua1.PrincipalID, folder1ExistingName); + scene.InventoryService, ua1.PrincipalID, folder1ExistingName); string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random()); string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random()); @@ -812,6 +812,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests List folder2PostCandidates = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1PostCandidates[0], "b"); Assert.That(folder2PostCandidates.Count, Is.EqualTo(1)); - } + } } } \ No newline at end of file diff --git a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs index 35b70de8ab..05fe3eee04 100644 --- a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs @@ -138,7 +138,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue { if (!queues.ContainsKey(agentId)) { - /* + /* m_log.DebugFormat( "[EVENTQUEUE]: Adding new queue for agent {0} in region {1}", agentId, m_scene.RegionInfo.RegionName); @@ -701,7 +701,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue public void ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage, UUID avatarID) { - OSD item = EventQueueHelper.ParcelProperties(parcelPropertiesMessage); + OSD item = EventQueueHelper.ParcelProperties(parcelPropertiesMessage); Enqueue(item, avatarID); } diff --git a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs index b62df18c10..0d7d16a2ba 100644 --- a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs +++ b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs @@ -55,7 +55,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue } // private static byte[] uintToByteArray(uint uIntValue) -// { +// { // byte[] result = new byte[4]; // Utils.UIntToBytesBig(uIntValue, result, 0); // return result; @@ -386,14 +386,14 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue return placesReply; } - public static OSD ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage) - { - OSDMap message = new OSDMap(); - message.Add("message", OSD.FromString("ParcelProperties")); - OSD message_body = parcelPropertiesMessage.Serialize(); - message.Add("body", message_body); - return message; - } + public static OSD ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage) + { + OSDMap message = new OSDMap(); + message.Add("message", OSD.FromString("ParcelProperties")); + OSD message_body = parcelPropertiesMessage.Serialize(); + message.Add("body", message_body); + return message; + } } } diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index d87f7f1d04..4c4eeff0e8 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs @@ -594,7 +594,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess rootPart.Name = item.Name; rootPart.Description = item.Description; - List partList = null; + List partList = null; lock (group.Children) partList = new List(group.Children.Values); diff --git a/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs b/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs index b75a7001b8..a75ff6234e 100644 --- a/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs @@ -49,8 +49,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments protected bool m_collectStats; protected Scene m_scene = null; - public string Name { get { return "Binary Statistics Logging Module"; } } - public Type ReplaceableInterface { get { return null; } } + public string Name { get { return "Binary Statistics Logging Module"; } } + public Type ReplaceableInterface { get { return null; } } public void Initialise(IConfigSource source) { @@ -79,7 +79,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments catch { // if it doesn't work, we don't collect anything - } + } } public void AddRegion(Scene scene) @@ -94,12 +94,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments public void RegionLoaded(Scene scene) { if (m_collectStats) - m_scene.StatsReporter.OnSendStatsResult += LogSimStats; + m_scene.StatsReporter.OnSendStatsResult += LogSimStats; } public void Close() { - } + } public class StatLogger { @@ -164,6 +164,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments } } return; - } + } } } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs index 4e2f6024cc..2322d7cb45 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs @@ -185,7 +185,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory return folders[type]; } - m_log.WarnFormat("[INVENTORY CACHE]: Could not find folder for system type {0} for {1}", type, userID); + m_log.WarnFormat("[INVENTORY CACHE]: Could not find folder for system type {0} for {1}", type, userID); return null; } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs index cbd9e05de7..ab6be50ec6 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs @@ -220,7 +220,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory { // m_log.DebugFormat( // "[LOCAL INVENTORY SERVICES CONNECTOR]: Adding inventory item {0} to user {1} folder {2}", -// item.Name, item.Owner, item.Folder); +// item.Name, item.Owner, item.Folder); return m_InventoryService.AddItem(item); } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs index 4ab69474a1..34205e3df8 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs @@ -227,7 +227,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory public bool AddItem(InventoryItemBase item) { if (item == null) - return false; + return false; return m_RemoteConnector.AddItem(item); } diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveHelpers.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveHelpers.cs index ddc3dd7644..c72acc332b 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveHelpers.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveHelpers.cs @@ -33,7 +33,7 @@ using OpenSim.Framework.Serialization; using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.CoreModules.World.Archiver -{ +{ /// /// Helper methods for archive manipulation /// @@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver public static string CreateObjectFilename(SceneObjectGroup sog) { return ArchiveConstants.CreateOarObjectFilename(sog.Name, sog.UUID, sog.AbsolutePosition); - } + } /// /// Create the path used to store an object in an OpenSim Archive. @@ -62,7 +62,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver public static string CreateObjectPath(SceneObjectGroup sog) { return ArchiveConstants.CreateOarObjectPath(sog.Name, sog.UUID, sog.AbsolutePosition); - } + } /// /// Resolve path to a working FileStream @@ -123,6 +123,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver // return new BufferedStream(file, (int) response.ContentLength); return new BufferedStream(file, 1000000); - } + } } } \ No newline at end of file diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index ea71fd9f59..634685ace0 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -72,12 +72,12 @@ namespace OpenSim.Region.CoreModules.World.Land #pragma warning restore 0429 /// - /// Local land ids at specified region co-ordinates (region size / 4) + /// Local land ids at specified region co-ordinates (region size / 4) /// private readonly int[,] m_landIDList = new int[landArrayMax, landArrayMax]; /// - /// Land objects keyed by local id + /// Land objects keyed by local id /// private readonly Dictionary m_landList = new Dictionary(); @@ -92,8 +92,8 @@ namespace OpenSim.Region.CoreModules.World.Land #region INonSharedRegionModule Members - public Type ReplaceableInterface - { + public Type ReplaceableInterface + { get { return null; } } @@ -192,7 +192,7 @@ namespace OpenSim.Region.CoreModules.World.Land Debug.WriteLine(string.Format("Stopping force position because {0} is close enough to position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); forcedPosition = null; } - //if we are far away, teleport + //if we are far away, teleport else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition.Value) > 3) { Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); @@ -321,8 +321,6 @@ namespace OpenSim.Region.CoreModules.World.Land } } - - private void ForceAvatarToPosition(ScenePresence avatar, Vector3? position) { if (m_scene.Permissions.IsGod(avatar.UUID)) return; @@ -336,7 +334,6 @@ namespace OpenSim.Region.CoreModules.World.Land { avatar.ControllingClient.SendAlertMessage( "You are not allowed on this parcel because the land owner has restricted access."); - } public void EventManagerOnAvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID) @@ -448,7 +445,7 @@ namespace OpenSim.Region.CoreModules.World.Land if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT && clientAvatar.sentMessageAboutRestrictedParcelFlyingDown) { - EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.LandData.LocalID, + EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.LandData.LocalID, m_scene.RegionInfo.RegionID); //They are going under the safety line! if (!parcel.IsBannedFromLand(clientAvatar.UUID)) @@ -652,7 +649,7 @@ namespace OpenSim.Region.CoreModules.World.Land if (x_float > Constants.RegionSize || x_float <= 0 || y_float > Constants.RegionSize || y_float <= 0) return null; - + try { x = Convert.ToInt32(Math.Floor(Convert.ToDouble(x_float) / 4.0)); @@ -667,7 +664,7 @@ namespace OpenSim.Region.CoreModules.World.Land { return null; } - + lock (m_landList) { // Corner case. If an autoreturn happens during sim startup @@ -687,7 +684,7 @@ namespace OpenSim.Region.CoreModules.World.Land // they happen every time at border crossings throw new Exception("Error: Parcel not found at point " + x + ", " + y); } - + lock (m_landIDList) { try @@ -741,7 +738,6 @@ namespace OpenSim.Region.CoreModules.World.Land public void EventManagerOnObjectBeingRemovedFromScene(SceneObjectGroup obj) { - lock (m_landList) { foreach (LandObject p in m_landList.Values) @@ -936,7 +932,7 @@ namespace OpenSim.Region.CoreModules.World.Land return; } } - + lock (m_landList) { foreach (ILandObject slaveLandObject in selectedLandObjects) @@ -1078,7 +1074,6 @@ namespace OpenSim.Region.CoreModules.World.Land temp.Add(currentParcel); } } - } } @@ -1121,7 +1116,7 @@ namespace OpenSim.Region.CoreModules.World.Land join(west, south, east, north, remote_client.AgentId); } - public void ClientOnParcelSelectObjects(int local_id, int request_type, + public void ClientOnParcelSelectObjects(int local_id, int request_type, List returnIDs, IClientAPI remote_client) { m_landList[local_id].SendForceObjectSelect(local_id, request_type, returnIDs, remote_client); @@ -1358,31 +1353,31 @@ namespace OpenSim.Region.CoreModules.World.Land { return RemoteParcelRequest(request, path, param, agentID, caps); })); - UUID parcelCapID = UUID.Random(); - caps.RegisterHandler("ParcelPropertiesUpdate", - new RestStreamHandler("POST", "/CAPS/" + parcelCapID, - delegate(string request, string path, string param, - OSHttpRequest httpRequest, OSHttpResponse httpResponse) - { - return ProcessPropertiesUpdate(request, path, param, agentID, caps); - })); + UUID parcelCapID = UUID.Random(); + caps.RegisterHandler("ParcelPropertiesUpdate", + new RestStreamHandler("POST", "/CAPS/" + parcelCapID, + delegate(string request, string path, string param, + OSHttpRequest httpRequest, OSHttpResponse httpResponse) + { + return ProcessPropertiesUpdate(request, path, param, agentID, caps); + })); } - private string ProcessPropertiesUpdate(string request, string path, string param, UUID agentID, Caps caps) - { - IClientAPI client; - if ( ! m_scene.TryGetClient(agentID, out client) ) { - m_log.WarnFormat("[LAND] unable to retrieve IClientAPI for {0}", agentID.ToString() ); - return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); - } - - ParcelPropertiesUpdateMessage properties = new ParcelPropertiesUpdateMessage(); - OpenMetaverse.StructuredData.OSDMap args = (OpenMetaverse.StructuredData.OSDMap) OSDParser.DeserializeLLSDXml(request); + private string ProcessPropertiesUpdate(string request, string path, string param, UUID agentID, Caps caps) + { + IClientAPI client; + if (! m_scene.TryGetClient(agentID, out client)) { + m_log.WarnFormat("[LAND] unable to retrieve IClientAPI for {0}", agentID.ToString()); + return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); + } - properties.Deserialize(args); - - LandUpdateArgs land_update = new LandUpdateArgs(); - int parcelID = properties.LocalID; - land_update.AuthBuyerID = properties.AuthBuyerID; + ParcelPropertiesUpdateMessage properties = new ParcelPropertiesUpdateMessage(); + OpenMetaverse.StructuredData.OSDMap args = (OpenMetaverse.StructuredData.OSDMap) OSDParser.DeserializeLLSDXml(request); + + properties.Deserialize(args); + + LandUpdateArgs land_update = new LandUpdateArgs(); + int parcelID = properties.LocalID; + land_update.AuthBuyerID = properties.AuthBuyerID; land_update.Category = properties.Category; land_update.Desc = properties.Desc; land_update.GroupID = properties.GroupID; @@ -1399,15 +1394,15 @@ namespace OpenSim.Region.CoreModules.World.Land land_update.SnapshotID = properties.SnapshotID; land_update.UserLocation = properties.UserLocation; land_update.UserLookAt = properties.UserLookAt; - land_update.MediaDescription = properties.MediaDesc; - land_update.MediaType = properties.MediaType; - land_update.MediaWidth = properties.MediaWidth; - land_update.MediaHeight = properties.MediaHeight; - land_update.MediaLoop = properties.MediaLoop; - land_update.ObscureMusic = properties.ObscureMusic; - land_update.ObscureMedia = properties.ObscureMedia; - - ILandObject land; + land_update.MediaDescription = properties.MediaDesc; + land_update.MediaType = properties.MediaType; + land_update.MediaWidth = properties.MediaWidth; + land_update.MediaHeight = properties.MediaHeight; + land_update.MediaLoop = properties.MediaLoop; + land_update.ObscureMusic = properties.ObscureMusic; + land_update.ObscureMedia = properties.ObscureMedia; + + ILandObject land; lock (m_landList) { m_landList.TryGetValue(parcelID, out land); @@ -1415,15 +1410,15 @@ namespace OpenSim.Region.CoreModules.World.Land if (land != null) { - land.UpdateLandProperties(land_update, client); + land.UpdateLandProperties(land_update, client); m_scene.EventManager.TriggerOnParcelPropertiesUpdateRequest(land_update, parcelID, client); - } + } else { - m_log.WarnFormat("[LAND] unable to find parcelID {0}", parcelID); - } + m_log.WarnFormat("[LAND] unable to find parcelID {0}", parcelID); + } return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); - } + } // we cheat here: As we don't have (and want) a grid-global parcel-store, we can't return the // "real" parcelID, because we wouldn't be able to map that to the region the parcel belongs to. // So, we create a "fake" parcelID by using the regionHandle (64 bit), and the local (integer) x @@ -1500,19 +1495,19 @@ namespace OpenSim.Region.CoreModules.World.Land if (parcelID == UUID.Zero) return; - ExtendedLandData data = - (ExtendedLandData)parcelInfoCache.Get(parcelID.ToString(), - delegate(string id) + ExtendedLandData data = + (ExtendedLandData)parcelInfoCache.Get(parcelID.ToString(), + delegate(string id) { UUID parcel = UUID.Zero; UUID.TryParse(id, out parcel); // assume we've got the parcelID we just computed in RemoteParcelRequest ExtendedLandData extLandData = new ExtendedLandData(); - Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle, + Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle, out extLandData.X, out extLandData.Y); m_log.DebugFormat("[LAND] got parcelinfo request for regionHandle {0}, x/y {1}/{2}", extLandData.RegionHandle, extLandData.X, extLandData.Y); - + // for this region or for somewhere else? if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle) { diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 499b60ccdb..d87352f849 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs @@ -229,13 +229,13 @@ namespace OpenSim.Region.CoreModules.World.Land newData.SnapshotID = args.SnapshotID; newData.UserLocation = args.UserLocation; newData.UserLookAt = args.UserLookAt; - newData.MediaType = args.MediaType; - newData.MediaDescription = args.MediaDescription; - newData.MediaWidth = args.MediaWidth; - newData.MediaHeight = args.MediaHeight; - newData.MediaLoop = args.MediaLoop; - newData.ObscureMusic = args.ObscureMusic; - newData.ObscureMedia = args.ObscureMedia; + newData.MediaType = args.MediaType; + newData.MediaDescription = args.MediaDescription; + newData.MediaWidth = args.MediaWidth; + newData.MediaHeight = args.MediaHeight; + newData.MediaLoop = args.MediaLoop; + newData.ObscureMusic = args.ObscureMusic; + newData.ObscureMedia = args.ObscureMedia; m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData); diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs index 82ad109a49..7c5d044347 100644 --- a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs +++ b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs @@ -54,11 +54,11 @@ namespace OpenSim.Region.CoreModules.Media.Moap { [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MoapModule")] public class MoapModule : INonSharedRegionModule, IMoapModule - { + { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public string Name { get { return "MoapModule"; } } - public Type ReplaceableInterface { get { return null; } } + public string Name { get { return "MoapModule"; } } + public Type ReplaceableInterface { get { return null; } } /// /// Is this module enabled? @@ -78,17 +78,17 @@ namespace OpenSim.Region.CoreModules.Media.Moap /// /// Track the ObjectMedia capabilities given to users keyed by agent. Lock m_omCapUsers to manipulate. /// - protected Dictionary m_omCapUrls = new Dictionary(); + protected Dictionary m_omCapUrls = new Dictionary(); /// /// Track the ObjectMediaUpdate capabilities given to users keyed by path - /// + /// protected Dictionary m_omuCapUsers = new Dictionary(); /// /// Track the ObjectMediaUpdate capabilities given to users keyed by agent. Lock m_omuCapUsers to manipulate - /// - protected Dictionary m_omuCapUrls = new Dictionary(); + /// + protected Dictionary m_omuCapUrls = new Dictionary(); public void Initialise(IConfigSource configSource) { @@ -129,7 +129,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap m_scene.EventManager.OnRegisterCaps -= OnRegisterCaps; m_scene.EventManager.OnDeregisterCaps -= OnDeregisterCaps; m_scene.EventManager.OnSceneObjectPartCopy -= OnSceneObjectPartCopy; - } + } public void OnRegisterCaps(UUID agentID, Caps caps) { @@ -159,7 +159,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap caps.RegisterHandler( "ObjectMediaNavigate", new RestStreamHandler("POST", omuCapUrl, HandleObjectMediaNavigateMessage)); } - } + } public void OnDeregisterCaps(UUID agentID, Caps caps) { @@ -179,7 +179,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap } protected void OnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original, bool userExposed) - { + { if (original.Shape.Media != null) { PrimitiveBaseShape.MediaList dupeMedia = new PrimitiveBaseShape.MediaList(); @@ -195,7 +195,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap } copy.Shape.Media = dupeMedia; - } + } } public MediaEntry GetMediaEntry(SceneObjectPart part, int face) @@ -211,9 +211,9 @@ namespace OpenSim.Region.CoreModules.Media.Moap me = null; } else - { + { lock (media) - me = media[face]; + me = media[face]; // TODO: Really need a proper copy constructor down in libopenmetaverse if (me != null) @@ -227,17 +227,17 @@ namespace OpenSim.Region.CoreModules.Media.Moap public void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me) { - CheckFaceParam(part, face); + CheckFaceParam(part, face); if (null == part.Shape.Media) part.Shape.Media = new PrimitiveBaseShape.MediaList(new MediaEntry[part.GetNumberOfSides()]); - lock (part.Shape.Media) + lock (part.Shape.Media) part.Shape.Media[face] = me; - UpdateMediaUrl(part, UUID.Zero); + UpdateMediaUrl(part, UUID.Zero); part.ScheduleFullUpdate(); - part.TriggerScriptChangedEvent(Changed.MEDIA); + part.TriggerScriptChangedEvent(Changed.MEDIA); } public void ClearMediaEntry(SceneObjectPart part, int face) @@ -256,7 +256,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap /// protected string HandleObjectMediaMessage( string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) - { + { // m_log.DebugFormat("[MOAP]: Got ObjectMedia path [{0}], raw request [{1}]", path, request); OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request); @@ -266,12 +266,12 @@ namespace OpenSim.Region.CoreModules.Media.Moap if (omm.Request is ObjectMediaRequest) return HandleObjectMediaRequest(omm.Request as ObjectMediaRequest); else if (omm.Request is ObjectMediaUpdate) - return HandleObjectMediaUpdate(path, omm.Request as ObjectMediaUpdate); + return HandleObjectMediaUpdate(path, omm.Request as ObjectMediaUpdate); throw new Exception( string.Format( "[MOAP]: ObjectMediaMessage has unrecognized ObjectMediaBlock of {0}", - omm.Request.GetType())); + omm.Request.GetType())); } /// @@ -279,7 +279,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap /// /// /// - protected string HandleObjectMediaRequest(ObjectMediaRequest omr) + protected string HandleObjectMediaRequest(ObjectMediaRequest omr) { UUID primId = omr.PrimID; @@ -318,7 +318,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap /// Path on which this request was made /// /param> /// - protected string HandleObjectMediaUpdate(string path, ObjectMediaUpdate omu) + protected string HandleObjectMediaUpdate(string path, ObjectMediaUpdate omu) { UUID primId = omu.PrimID; @@ -330,9 +330,9 @@ namespace OpenSim.Region.CoreModules.Media.Moap "[MOAP]: Received an UPDATE ObjectMediaRequest for prim {0} but this doesn't exist in region {1}", primId, m_scene.RegionInfo.RegionName); return string.Empty; - } + } -// m_log.DebugFormat("[MOAP]: Received {0} media entries for prim {1}", omu.FaceMedia.Length, primId); +// m_log.DebugFormat("[MOAP]: Received {0} media entries for prim {1}", omu.FaceMedia.Length, primId); // for (int i = 0; i < omu.FaceMedia.Length; i++) // { @@ -374,14 +374,14 @@ namespace OpenSim.Region.CoreModules.Media.Moap part.Shape.Textures = te; // m_log.DebugFormat( // "[MOAP]: Media flags for face {0} is {1}", -// i, part.Shape.Textures.FaceTextures[i].MediaFlags); +// i, part.Shape.Textures.FaceTextures[i].MediaFlags); } } } else - { + { // We need to go through the media textures one at a time to make sure that we have permission - // to change them + // to change them // FIXME: Race condition here since some other texture entry manipulator may overwrite/get // overwritten. Unfortunately, PrimitiveBaseShape does not allow us to change texture entry @@ -391,18 +391,18 @@ namespace OpenSim.Region.CoreModules.Media.Moap lock (media) { for (int i = 0; i < media.Count; i++) - { + { if (m_scene.Permissions.CanControlPrimMedia(agentId, part.UUID, i)) - { + { media[i] = omu.FaceMedia[i]; // When a face is cleared this is done by setting the MediaFlags in the TextureEntry via a normal // texture update, so we don't need to worry about clearing MediaFlags here. if (null == media[i]) - continue; + continue; Primitive.TextureEntryFace face = te.CreateFace((uint)i); - face.MediaFlags = true; + face.MediaFlags = true; // m_log.DebugFormat( // "[MOAP]: Media flags for face {0} is {1}", @@ -414,11 +414,11 @@ namespace OpenSim.Region.CoreModules.Media.Moap part.Shape.Textures = te; -// for (int i2 = 0; i2 < part.Shape.Textures.FaceTextures.Length; i2++) -// m_log.DebugFormat("[MOAP]: FaceTexture[{0}] is {1}", i2, part.Shape.Textures.FaceTextures[i2]); +// for (int i2 = 0; i2 < part.Shape.Textures.FaceTextures.Length; i2++) +// m_log.DebugFormat("[MOAP]: FaceTexture[{0}] is {1}", i2, part.Shape.Textures.FaceTextures[i2]); } - UpdateMediaUrl(part, agentId); + UpdateMediaUrl(part, agentId); // Arguably, we could avoid sending a full update to the avatar that just changed the texture. part.ScheduleFullUpdate(); @@ -439,16 +439,16 @@ namespace OpenSim.Region.CoreModules.Media.Moap /// protected string HandleObjectMediaNavigateMessage( string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) - { + { // m_log.DebugFormat("[MOAP]: Got ObjectMediaNavigate request [{0}]", request); OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request); ObjectMediaNavigateMessage omn = new ObjectMediaNavigateMessage(); - omn.Deserialize(osd); + omn.Deserialize(osd); UUID primId = omn.PrimID; - SceneObjectPart part = m_scene.GetSceneObjectPart(primId); + SceneObjectPart part = m_scene.GetSceneObjectPart(primId); if (null == part) { @@ -456,12 +456,12 @@ namespace OpenSim.Region.CoreModules.Media.Moap "[MOAP]: Received an ObjectMediaNavigateMessage for prim {0} but this doesn't exist in region {1}", primId, m_scene.RegionInfo.RegionName); return string.Empty; - } + } UUID agentId = default(UUID); lock (m_omuCapUsers) - agentId = m_omuCapUsers[path]; + agentId = m_omuCapUsers[path]; if (!m_scene.Permissions.CanInteractWithPrimMedia(agentId, part.UUID, omn.Face)) return string.Empty; @@ -484,7 +484,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap return string.Empty; if (me.EnableWhiteList) - { + { if (!CheckUrlAgainstWhitelist(omn.URL, me.WhiteList)) { // m_log.DebugFormat( @@ -493,18 +493,18 @@ namespace OpenSim.Region.CoreModules.Media.Moap return string.Empty; } - } + } me.CurrentURL = omn.URL; UpdateMediaUrl(part, agentId); - part.ScheduleFullUpdate(); + part.ScheduleFullUpdate(); part.TriggerScriptChangedEvent(Changed.MEDIA); return OSDParser.SerializeLLSDXmlString(new OSD()); - } + } /// /// Check that the face number is valid for the given prim. @@ -519,7 +519,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap int maxFaces = part.GetNumberOfSides() - 1; if (face > maxFaces) throw new ArgumentException( - string.Format("Face argument was {0} but max is {1}", face, maxFaces)); + string.Format("Face argument was {0} but max is {1}", face, maxFaces)); } /// @@ -542,9 +542,9 @@ namespace OpenSim.Region.CoreModules.Media.Moap string rawVersion = part.MediaUrl.Substring(5, 10); int version = int.Parse(rawVersion); part.MediaUrl = string.Format("x-mv:{0:D10}/{1}", ++version, updateId); - } + } -// m_log.DebugFormat("[MOAP]: Storing media url [{0}] in prim {1} {2}", part.MediaUrl, part.Name, part.UUID); +// m_log.DebugFormat("[MOAP]: Storing media url [{0}] in prim {1} {2}", part.MediaUrl, part.Name, part.UUID); } /// @@ -554,7 +554,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap /// /// true if the url matches an entry on the whitelist, false otherwise protected bool CheckUrlAgainstWhitelist(string rawUrl, string[] whitelist) - { + { Uri url = new Uri(rawUrl); foreach (string origWlUrl in whitelist) @@ -575,7 +575,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap if (url.Host.Contains(wlUrl)) { // m_log.DebugFormat("[MOAP]: Whitelist URL {0} matches {1}", origWlUrl, rawUrl); - return true; + return true; } } else @@ -588,7 +588,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap return true; } } - } + } return false; } diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs index 12750c5e2c..db50339fec 100644 --- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs @@ -49,8 +49,8 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell protected Scene m_scene = null; protected IDialogModule m_dialogModule; - public string Name { get { return "Object BuySell Module"; } } - public Type ReplaceableInterface { get { return null; } } + public string Name { get { return "Object BuySell Module"; } } + public Type ReplaceableInterface { get { return null; } } public void Initialise(IConfigSource source) {} @@ -78,8 +78,8 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell public void SubscribeToClientEvents(IClientAPI client) { - client.OnObjectSaleInfo += ObjectSaleInfo; - } + client.OnObjectSaleInfo += ObjectSaleInfo; + } protected void ObjectSaleInfo( IClientAPI client, UUID agentID, UUID sessionID, uint localID, byte saleType, int salePrice) @@ -99,7 +99,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell part.ParentGroup.HasGroupChanged = true; part.GetProperties(client); - } + } public bool BuyObject(IClientAPI remoteClient, UUID categoryID, uint localID, byte saleType) { @@ -225,7 +225,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell } else { - if (m_dialogModule != null) + if (m_dialogModule != null) m_dialogModule.SendAlertToUser(remoteClient, "Cannot buy now. Your inventory is unavailable"); return false; } @@ -261,6 +261,6 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell } return true; - } + } } } \ No newline at end of file diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index bc54997a0a..573a22a377 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs @@ -397,13 +397,13 @@ namespace OpenSim.Region.CoreModules.World.Permissions m_groupsModule = m_scene.RequestModuleInterface(); if (m_groupsModule == null) - m_log.Warn("[PERMISSIONS]: Groups module not found, group permissions will not work"); + m_log.Warn("[PERMISSIONS]: Groups module not found, group permissions will not work"); m_moapModule = m_scene.RequestModuleInterface(); // This log line will be commented out when no longer required for debugging // if (m_moapModule == null) -// m_log.Warn("[PERMISSIONS]: Media on a prim module not found, media on a prim permissions will not work"); +// m_log.Warn("[PERMISSIONS]: Media on a prim module not found, media on a prim permissions will not work"); } public void Close() @@ -1906,7 +1906,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions } private bool CanControlPrimMedia(UUID agentID, UUID primID, int face) - { + { // m_log.DebugFormat( // "[PERMISSONS]: Performing CanControlPrimMedia check with agentID {0}, primID {1}, face {2}", // agentID, primID, face); @@ -1918,7 +1918,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions if (null == part) return false; - MediaEntry me = m_moapModule.GetMediaEntry(part, face); + MediaEntry me = m_moapModule.GetMediaEntry(part, face); // If there is no existing media entry then it can be controlled (in this context, created). if (null == me) @@ -1929,7 +1929,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions // agentID, primID, face, me.ControlPermissions); return GenericPrimMediaPermission(part, agentID, me.ControlPermissions); - } + } private bool CanInteractWithPrimMedia(UUID agentID, UUID primID, int face) { @@ -1952,15 +1952,15 @@ namespace OpenSim.Region.CoreModules.World.Permissions // m_log.DebugFormat( // "[PERMISSIONS]: Checking CanInteractWithPrimMedia for {0} on {1} face {2} with interact permissions {3}", -// agentID, primID, face, me.InteractPermissions); +// agentID, primID, face, me.InteractPermissions); return GenericPrimMediaPermission(part, agentID, me.InteractPermissions); - } + } private bool GenericPrimMediaPermission(SceneObjectPart part, UUID agentID, MediaPermission perms) { // if (IsAdministrator(agentID)) -// return true; +// return true; if ((perms & MediaPermission.Anyone) == MediaPermission.Anyone) return true; @@ -1969,15 +1969,15 @@ namespace OpenSim.Region.CoreModules.World.Permissions { if (agentID == part.OwnerID) return true; - } + } if ((perms & MediaPermission.Group) == MediaPermission.Group) { if (IsGroupMember(part.GroupID, agentID, 0)) return true; - } + } - return false; + return false; } } } \ No newline at end of file diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs index cb801111f9..25d73c2c0f 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs @@ -814,7 +814,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain { //m_log.Debug("Terrain packet unacked, resending patch: " + patchX + " , " + patchY); client.SendLayerData(patchX, patchY, m_scene.Heightmap.GetFloatsSerialised()); - } + } private void StoreUndoState() { diff --git a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs index 9736b73adf..6bac5559e9 100644 --- a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs +++ b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs @@ -425,7 +425,7 @@ namespace OpenSim.Region.CoreModules { if (m_ready) { - if(m_scene.GetRootAgentCount() > 0) + if (m_scene.GetRootAgentCount() > 0) { // Ask wind plugin to generate a LL wind array to be cached locally // Try not to update this too often, as it may involve array copies diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs index 1d9c2bdc07..1bd1371c53 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs @@ -228,7 +228,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap SceneObjectGroup mapdot = (SceneObjectGroup)obj; Color mapdotspot = Color.Gray; // Default color when prim color is white - // Loop over prim in group + // Loop over prim in group List partList = null; lock (mapdot.Children) partList = new List(mapdot.Children.Values); diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index f036d85910..fbc8a50350 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs @@ -307,7 +307,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap lock (m_rootAgents) { m_rootAgents.Remove(AgentId); - if(m_rootAgents.Count == 0) + if (m_rootAgents.Count == 0) StopThread(); } } diff --git a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs index 05c1e009fc..1140b9b8dc 100644 --- a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs @@ -55,7 +55,7 @@ namespace OpenSim.Region.Framework.Interfaces /// /// /// - /// true if the object was successfully attached, false otherwise + /// true if the object was successfully attached, false otherwise bool AttachObject( IClientAPI remoteClient, SceneObjectGroup grp, uint AttachmentPt, bool silent); diff --git a/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs b/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs index 2c091e753f..4c501f669b 100644 --- a/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs @@ -65,7 +65,7 @@ namespace OpenSim.Region.Framework.Interfaces /// Get a group /// /// ID of the group - /// The group's data. Null if there is no such group. + /// The group's data. Null if there is no such group. GroupRecord GetGroupRecord(UUID GroupID); void ActivateGroup(IClientAPI remoteClient, UUID groupID); @@ -74,14 +74,14 @@ namespace OpenSim.Region.Framework.Interfaces List GroupRoleDataRequest(IClientAPI remoteClient, UUID groupID); List GroupRoleMembersRequest(IClientAPI remoteClient, UUID groupID); GroupProfileData GroupProfileRequest(IClientAPI remoteClient, UUID groupID); - GroupMembershipData[] GetMembershipData(UUID UserID); + GroupMembershipData[] GetMembershipData(UUID UserID); GroupMembershipData GetMembershipData(UUID GroupID, UUID UserID); void UpdateGroupInfo(IClientAPI remoteClient, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish); void SetGroupAcceptNotices(IClientAPI remoteClient, UUID groupID, bool acceptNotices, bool listInProfile); - void GroupTitleUpdate(IClientAPI remoteClient, UUID GroupID, UUID TitleRoleID); + void GroupTitleUpdate(IClientAPI remoteClient, UUID GroupID, UUID TitleRoleID); GroupNoticeData[] GroupNoticesListRequest(IClientAPI remoteClient, UUID GroupID); string GetGroupTitle(UUID avatarID); diff --git a/OpenSim/Region/Framework/Interfaces/IInventoryArchiverModule.cs b/OpenSim/Region/Framework/Interfaces/IInventoryArchiverModule.cs index 01066e6ab1..ddf7565945 100644 --- a/OpenSim/Region/Framework/Interfaces/IInventoryArchiverModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IInventoryArchiverModule.cs @@ -43,14 +43,14 @@ namespace OpenSim.Region.Framework.Interfaces /// Contains the exception generated if the save did not succeed public delegate void InventoryArchiveSaved( Guid id, bool succeeded, UserAccount userInfo, string invPath, Stream saveStream, Exception reportedException); - + public interface IInventoryArchiverModule { /// /// Fired when an archive inventory save has been completed. /// event InventoryArchiveSaved OnInventoryArchiveSaved; - + /// /// Dearchive a user's inventory folder from the given stream /// @@ -60,7 +60,7 @@ namespace OpenSim.Region.Framework.Interfaces /// The stream from which the inventory archive will be loaded /// true if the first stage of the operation succeeded, false otherwise bool DearchiveInventory(string firstName, string lastName, string invPath, string pass, Stream loadStream); - + /// /// Dearchive a user's inventory folder from the given stream /// @@ -72,8 +72,8 @@ namespace OpenSim.Region.Framework.Interfaces /// the loaded IAR with existing folders where possible. /// true if the first stage of the operation succeeded, false otherwise bool DearchiveInventory( - string firstName, string lastName, string invPath, string pass, Stream loadStream, - Dictionary options); + string firstName, string lastName, string invPath, string pass, Stream loadStream, + Dictionary options); /// /// Archive a user's inventory folder to the given stream @@ -85,7 +85,7 @@ namespace OpenSim.Region.Framework.Interfaces /// The stream to which the inventory archive will be saved /// true if the first stage of the operation succeeded, false otherwise bool ArchiveInventory(Guid id, string firstName, string lastName, string invPath, string pass, Stream saveStream); - + /// /// Archive a user's inventory folder to the given stream /// @@ -97,7 +97,7 @@ namespace OpenSim.Region.Framework.Interfaces /// Archiving options. Currently, there are none. /// true if the first stage of the operation succeeded, false otherwise bool ArchiveInventory( - Guid id, string firstName, string lastName, string invPath, string pass, Stream saveStream, - Dictionary options); + Guid id, string firstName, string lastName, string invPath, string pass, Stream saveStream, + Dictionary options); } } diff --git a/OpenSim/Region/Framework/Interfaces/IMoapModule.cs b/OpenSim/Region/Framework/Interfaces/IMoapModule.cs index 24b6860742..1d3d240b04 100644 --- a/OpenSim/Region/Framework/Interfaces/IMoapModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IMoapModule.cs @@ -63,5 +63,5 @@ namespace OpenSim.Region.Framework.Interfaces /// /// /param> void ClearMediaEntry(SceneObjectPart part, int face); - } + } } \ No newline at end of file diff --git a/OpenSim/Region/Framework/Interfaces/IWorldMapModule.cs b/OpenSim/Region/Framework/Interfaces/IWorldMapModule.cs index d6e31f4503..65c57a6eb8 100644 --- a/OpenSim/Region/Framework/Interfaces/IWorldMapModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IWorldMapModule.cs @@ -31,7 +31,7 @@ namespace OpenSim.Region.Framework.Interfaces { /// /// Generate a map tile for the scene. a terrain texture for this scene - /// + /// void GenerateMaptile(); } } diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 6b2e03ec75..ff4595e6d3 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs @@ -332,7 +332,7 @@ namespace OpenSim.Region.Framework.Scenes /// If the object is being attached, then the avatarID will be present. If the object is being detached then /// the avatarID is UUID.Zero (I know, this doesn't make much sense but now it's historical). public delegate void Attach(uint localID, UUID itemID, UUID avatarID); - public event Attach OnAttach; + public event Attach OnAttach; /// /// Called immediately after an object is loaded from storage. @@ -344,7 +344,7 @@ namespace OpenSim.Region.Framework.Scenes /// Called immediately before an object is saved to storage. /// /// - /// The scene object being persisted. + /// The scene object being persisted. /// This is actually a copy of the original scene object so changes made here will be saved to storage but will not be kept in memory. /// /// @@ -363,7 +363,7 @@ namespace OpenSim.Region.Framework.Scenes public delegate void SceneObjectPartCopyDelegate(SceneObjectPart copy, SceneObjectPart original, bool userExposed); public delegate void RegionUp(GridRegion region); - public event RegionUp OnRegionUp; + public event RegionUp OnRegionUp; public class MoneyTransferArgs : EventArgs { @@ -2063,7 +2063,7 @@ namespace OpenSim.Region.Framework.Scenes } } } - } + } public void TriggerOnSceneObjectPreSave(SceneObjectGroup persistingSo, SceneObjectGroup originalSo) { @@ -2105,7 +2105,7 @@ namespace OpenSim.Region.Framework.Scenes } } } - } + } public void TriggerOnParcelPropertiesUpdateRequest(LandUpdateArgs args, int local_id, IClientAPI remote_client) @@ -2127,6 +2127,6 @@ namespace OpenSim.Region.Framework.Scenes } } } - } + } } } diff --git a/OpenSim/Region/Framework/Scenes/Prioritizer.cs b/OpenSim/Region/Framework/Scenes/Prioritizer.cs index 581b11c4a1..19f8180780 100644 --- a/OpenSim/Region/Framework/Scenes/Prioritizer.cs +++ b/OpenSim/Region/Framework/Scenes/Prioritizer.cs @@ -62,7 +62,7 @@ namespace OpenSim.Region.Framework.Scenes /// /// This is added to the priority of all child prims, to make sure that the root prim update is sent to the - /// viewer before child prim updates. + /// viewer before child prim updates. /// The adjustment is added to child prims and subtracted from root prims, so the gap ends up /// being double. We do it both ways so that there is a still a priority delta even if the priority is already /// double.MinValue or double.MaxValue. @@ -150,9 +150,9 @@ namespace OpenSim.Region.Framework.Scenes if (entity is SceneObjectPart) { // Can't use Scene.GetGroupByPrim() here, since the entity may have been delete from the scene - // before its scheduled update was triggered + // before its scheduled update was triggered //entityPos = m_scene.GetGroupByPrim(entity.LocalId).AbsolutePosition; - entityPos = ((SceneObjectPart)entity).ParentGroup.AbsolutePosition; + entityPos = ((SceneObjectPart)entity).ParentGroup.AbsolutePosition; } else { @@ -177,11 +177,11 @@ namespace OpenSim.Region.Framework.Scenes // Use group position for child prims Vector3 entityPos = entity.AbsolutePosition; if (entity is SceneObjectPart) - { + { // Can't use Scene.GetGroupByPrim() here, since the entity may have been delete from the scene // before its scheduled update was triggered //entityPos = m_scene.GetGroupByPrim(entity.LocalId).AbsolutePosition; - entityPos = ((SceneObjectPart)entity).ParentGroup.AbsolutePosition; + entityPos = ((SceneObjectPart)entity).ParentGroup.AbsolutePosition; } else { diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index a439eb9f1f..838c6480b3 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -145,7 +145,7 @@ namespace OpenSim.Region.Framework.Scenes item.Owner, item.Name, item.ID); return false; - } + } } /// @@ -253,7 +253,7 @@ namespace OpenSim.Region.Framework.Scenes // Update item with new asset item.AssetID = asset.FullID; if (group.UpdateInventoryItem(item)) - remoteClient.SendAgentAlertMessage("Script saved", false); + remoteClient.SendAgentAlertMessage("Script saved", false); part.GetProperties(remoteClient); @@ -1975,7 +1975,7 @@ namespace OpenSim.Region.Framework.Scenes return null; if (!Permissions.CanRezObject(group.PrimCount, item.OwnerID, pos)) - return null; + return null; if (!Permissions.BypassPermissions()) { @@ -2053,7 +2053,7 @@ namespace OpenSim.Region.Framework.Scenes List partList = null; lock (sog.Children) - partList = new List(sog.Children.Values); + partList = new List(sog.Children.Values); foreach (SceneObjectPart child in partList) child.Inventory.ChangeInventoryOwner(ownerID); @@ -2068,7 +2068,7 @@ namespace OpenSim.Region.Framework.Scenes List partList = null; lock (sog.Children) - partList = new List(sog.Children.Values); + partList = new List(sog.Children.Values); foreach (SceneObjectPart child in partList) { @@ -2078,7 +2078,7 @@ namespace OpenSim.Region.Framework.Scenes sog.SetOwnerId(groupID); sog.ApplyNextOwnerPermissions(); - } + } } foreach (uint localID in localIDs) diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index 2f69476664..7788e43c18 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs @@ -164,7 +164,7 @@ namespace OpenSim.Region.Framework.Scenes List partList = null; lock (sog.Children) - partList = new List(sog.Children.Values); + partList = new List(sog.Children.Values); foreach (SceneObjectPart part in partList) { diff --git a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs index 4e80bf2e32..06890a02e1 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs @@ -997,6 +997,6 @@ namespace OpenSim.Region.Framework.Scenes } } return true; - } + } } } \ No newline at end of file diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 46b84bb442..f8877e49f2 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -1916,7 +1916,7 @@ namespace OpenSim.Region.Framework.Scenes sceneObject.ScheduleGroupForFullUpdate(); return sceneObject; - } + } /// /// Add an object into the scene that has come from storage @@ -2009,7 +2009,7 @@ namespace OpenSim.Region.Framework.Scenes /// public bool AddNewSceneObject( SceneObjectGroup sceneObject, bool attachToBackup, Vector3 pos, Quaternion rot, Vector3 vel) - { + { return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, pos, rot, vel); } @@ -2102,12 +2102,12 @@ namespace OpenSim.Region.Framework.Scenes // group has recently been delinked from another group but that this change has not been persisted // to the DB. ForceSceneObjectBackup(so); - so.DetachFromBackup(); + so.DetachFromBackup(); m_storageManager.DataStore.RemoveObject(so.UUID, m_regInfo.RegionID); } // We need to keep track of this state in case this group is still queued for further backup. - so.IsDeleted = true; + so.IsDeleted = true; return true; } @@ -2394,7 +2394,7 @@ namespace OpenSim.Region.Framework.Scenes ScenePresence sp = GetScenePresence(userID); if (sp != null && AttachmentsModule != null) { - uint attPt = (uint)sp.Appearance.GetAttachpoint(itemID); + uint attPt = (uint)sp.Appearance.GetAttachpoint(itemID); AttachmentsModule.RezSingleAttachmentFromInventory(sp.ControllingClient, itemID, attPt); } @@ -2437,7 +2437,7 @@ namespace OpenSim.Region.Framework.Scenes sceneObject.RootPart.AddFlag(PrimFlags.Phantom); // Don't sent a full update here because this will cause full updates to be sent twice for - // attachments on region crossings, resulting in viewer glitches. + // attachments on region crossings, resulting in viewer glitches. AddRestoredSceneObject(sceneObject, false, false, false); // Handle attachment special case @@ -2681,7 +2681,7 @@ namespace OpenSim.Region.Framework.Scenes } public virtual void SubscribeToClientPrimEvents(IClientAPI client) - { + { client.OnUpdatePrimGroupPosition += m_sceneGraph.UpdatePrimPosition; client.OnUpdatePrimSinglePosition += m_sceneGraph.UpdatePrimSinglePosition; client.OnUpdatePrimGroupRotation += m_sceneGraph.UpdatePrimRotation; @@ -2717,7 +2717,7 @@ namespace OpenSim.Region.Framework.Scenes client.OnUndo += m_sceneGraph.HandleUndo; client.OnRedo += m_sceneGraph.HandleRedo; client.OnObjectDescription += m_sceneGraph.PrimDescription; - client.OnObjectDrop += m_sceneGraph.DropObject; + client.OnObjectDrop += m_sceneGraph.DropObject; client.OnObjectIncludeInSearch += m_sceneGraph.MakeObjectSearchable; client.OnObjectOwner += ObjectOwner; } @@ -3669,7 +3669,7 @@ namespace OpenSim.Region.Framework.Scenes public virtual void AgentCrossing(UUID agentID, Vector3 position, bool isFlying) { ScenePresence presence = GetScenePresence(agentID); - if(presence != null) + if (presence != null) { try { diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs index f8591ba8ad..c71aefadee 100644 --- a/OpenSim/Region/Framework/Scenes/SceneBase.cs +++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs @@ -521,7 +521,7 @@ namespace OpenSim.Region.Framework.Scenes /// /// /// - /// + /// public void AddCommand( object mod, string command, string shorthelp, string longhelp, string descriptivehelp, CommandDelegate callback) { diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index f779a6dbaa..5ac8ff5fef 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -298,7 +298,7 @@ namespace OpenSim.Region.Framework.Scenes /// Position of the object /// Rotation of the object /// Velocity of the object. This parameter only has an effect if the object is physical - /// + /// public bool AddNewSceneObject( SceneObjectGroup sceneObject, bool attachToBackup, Vector3 pos, Quaternion rot, Vector3 vel) { @@ -322,7 +322,7 @@ namespace OpenSim.Region.Framework.Scenes } return true; - } + } /// /// Add an object to the scene. This will both update the scene, and send information about the @@ -1284,7 +1284,7 @@ namespace OpenSim.Region.Framework.Scenes SceneObjectGroup group = GetGroupByPrim(localID); if (group != null) - { + { if (group.IsAttachment || (group.RootPart.Shape.PCode == 9 && group.RootPart.Shape.State != 0)) { if (m_parentScene.AttachmentsModule != null) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 4024328afb..4caa4397a9 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -677,7 +677,7 @@ namespace OpenSim.Region.Framework.Scenes minY = 256f; minZ = 8192f; - lock(m_parts) + lock (m_parts) { foreach (SceneObjectPart part in m_parts.Values) { @@ -1005,7 +1005,7 @@ namespace OpenSim.Region.Framework.Scenes AbsolutePosition = detachedpos; m_rootPart.AttachedAvatar = UUID.Zero; - //Anakin Lohner bug #3839 + //Anakin Lohner bug #3839 lock (m_parts) { foreach (SceneObjectPart p in m_parts.Values) @@ -1226,7 +1226,7 @@ namespace OpenSim.Region.Framework.Scenes } /// - /// Delete this group from its scene. + /// Delete this group from its scene. /// /// /// This only handles the in-world consequences of deletion (e.g. any avatars sitting on it are forcibly stood @@ -1383,7 +1383,7 @@ namespace OpenSim.Region.Framework.Scenes if (!m_isBackedUp) { // m_log.DebugFormat( -// "[WATER WARS]: Ignoring backup of {0} {1} since object is not marked to be backed up", Name, UUID); +// "[WATER WARS]: Ignoring backup of {0} {1} since object is not marked to be backed up", Name, UUID); return; } @@ -1395,7 +1395,7 @@ namespace OpenSim.Region.Framework.Scenes } // Since this is the top of the section of call stack for backing up a particular scene object, don't let - // any exception propogate upwards. + // any exception propogate upwards. try { if (!m_scene.ShuttingDown) // if shutting down then there will be nothing to handle the return so leave till next restart @@ -1546,7 +1546,7 @@ namespace OpenSim.Region.Framework.Scenes newPart.LinkNum = part.LinkNum; } - // Need to duplicate the physics actor as well + // Need to duplicate the physics actor as well if (part.PhysActor != null && userExposed) { PrimitiveBaseShape pbs = part.Shape; @@ -1562,7 +1562,7 @@ namespace OpenSim.Region.Framework.Scenes part.PhysActor.LocalID = part.LocalId; part.DoPhysicsPropertyUpdate(part.PhysActor.IsPhysical, true); - } + } } if (userExposed) @@ -1838,7 +1838,7 @@ namespace OpenSim.Region.Framework.Scenes SceneObjectPart newPart = null; lock (m_parts) - { + { newPart = part.Copy(m_scene.AllocateLocalId(), OwnerID, GroupID, m_parts.Count, userExposed); newPart.SetParent(this); m_parts.Add(newPart.UUID, newPart); @@ -2337,7 +2337,7 @@ namespace OpenSim.Region.Framework.Scenes if (p.LinkNum > linkPart.LinkNum) p.LinkNum--; } - } + } } linkPart.ParentID = 0; diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 3753dcbba8..024bdc97bf 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -1010,12 +1010,12 @@ namespace OpenSim.Region.Framework.Scenes return m_mediaUrl; } - set - { + set + { m_mediaUrl = value; if (ParentGroup != null) - ParentGroup.HasGroupChanged = true; + ParentGroup.HasGroupChanged = true; } } @@ -1028,7 +1028,7 @@ namespace OpenSim.Region.Framework.Scenes // m_log.DebugFormat("[SOP]: Setting CreateSelected to {0} for {1} {2}", value, Name, UUID); m_createSelected = value; } - } + } #endregion @@ -1189,7 +1189,7 @@ namespace OpenSim.Region.Framework.Scenes /// /// Property flags. See OpenMetaverse.PrimFlags - /// + /// /// Example properties are PrimFlags.Phantom and PrimFlags.DieAtEdge public PrimFlags Flags { @@ -1355,7 +1355,7 @@ namespace OpenSim.Region.Framework.Scenes /// /// Tell the scene presence that it should send updates for this part to its client - /// + /// public void AddFullUpdateToAvatar(ScenePresence presence) { presence.SceneViewer.QueuePartForUpdate(this); @@ -1414,7 +1414,7 @@ namespace OpenSim.Region.Framework.Scenes m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence sp) { - if(!sp.IsChildAgent) + if (!sp.IsChildAgent) sp.ControllingClient.SendAttachedSoundGainChange(UUID, (float)volume); }); } @@ -1659,7 +1659,7 @@ namespace OpenSim.Region.Framework.Scenes // m_log.DebugFormat("[SCENE OBJECT PART]: Clone of {0} {1} finished", Name, UUID); - return dupe; + return dupe; } protected void AssetReceived(string id, Object sender, AssetBase asset) @@ -1969,10 +1969,10 @@ namespace OpenSim.Region.Framework.Scenes } public uint GetEffectiveObjectFlags() - { + { // Commenting this section of code out since it doesn't actually do anything, as enums are handled by // value rather than reference -// PrimFlags f = _flags; +// PrimFlags f = _flags; // if (m_parentGroup == null || m_parentGroup.RootPart == this) // f &= ~(PrimFlags.Touch | PrimFlags.Money); @@ -4733,7 +4733,7 @@ namespace OpenSim.Region.Framework.Scenes if (ParentGroup == null || ParentGroup.IsDeleted) return; - if (IsAttachment && ParentGroup.RootPart != this) + if (IsAttachment && ParentGroup.RootPart != this) return; // Causes this thread to dig into the Client Thread Data. diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 1984d45f06..4affdef4a8 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs @@ -1094,7 +1094,7 @@ namespace OpenSim.Region.Framework.Scenes item.OwnerChanged = false; engine.ResumeScript(item.ItemID); } - } + } } } } diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index cc9355e031..177cf1e742 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1287,7 +1287,7 @@ namespace OpenSim.Region.Framework.Scenes // Setting parent ID would fix this, if we knew what value // to use. Or we could add a m_isSitting variable. //Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED"); - SitGround = true; + SitGround = true; } // In the future, these values might need to go global. diff --git a/OpenSim/Region/Framework/Scenes/SceneViewer.cs b/OpenSim/Region/Framework/Scenes/SceneViewer.cs index 7aa5a93e8b..b45291fcba 100644 --- a/OpenSim/Region/Framework/Scenes/SceneViewer.cs +++ b/OpenSim/Region/Framework/Scenes/SceneViewer.cs @@ -73,7 +73,7 @@ namespace OpenSim.Region.Framework.Scenes { m_pendingObjects = new Queue(); - lock(m_pendingObjects) + lock (m_pendingObjects) { EntityBase[] entities = m_presence.Scene.Entities.GetEntities(); foreach (EntityBase e in entities) @@ -85,7 +85,7 @@ namespace OpenSim.Region.Framework.Scenes } } - lock(m_pendingObjects) + lock (m_pendingObjects) { while (m_pendingObjects != null && m_pendingObjects.Count > 0) { diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs index c9662ef9eb..7d9a6a9e99 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs @@ -71,7 +71,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests Assert.That(dupeSo.Children.Count, Is.EqualTo(2)); SceneObjectPart dupePart1 = dupeSo.GetLinkNumPart(1); - SceneObjectPart dupePart2 = dupeSo.GetLinkNumPart(2); + SceneObjectPart dupePart2 = dupeSo.GetLinkNumPart(2); Assert.That(dupePart1.LocalId, Is.Not.EqualTo(part1.LocalId)); Assert.That(dupePart2.LocalId, Is.Not.EqualTo(part2.LocalId)); @@ -84,6 +84,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests Assert.That(dupePart1.PhysActor, Is.Not.Null); Assert.That(dupePart2.PhysActor, Is.Not.Null); */ - } + } } } \ No newline at end of file diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs index e3ef263b11..9f787c9faa 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs @@ -270,7 +270,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests TestHelper.InMethod(); //log4net.Config.XmlConfigurator.Configure(); - TestScene scene = SceneSetupHelpers.SetupScene(); + TestScene scene = SceneSetupHelpers.SetupScene(); string rootPartName = "rootpart"; UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001"); @@ -282,11 +282,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests { Name = rootPartName, UUID = rootPartUuid }; SceneObjectPart linkPart = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) - { Name = linkPartName, UUID = linkPartUuid }; + { Name = linkPartName, UUID = linkPartUuid }; SceneObjectGroup sog = new SceneObjectGroup(rootPart); - sog.AddPart(linkPart); - scene.AddNewSceneObject(sog, true); + sog.AddPart(linkPart); + scene.AddNewSceneObject(sog, true); // In a test, we have to crank the backup handle manually. Normally this would be done by the timer invoked // scene backup thread. @@ -309,7 +309,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests TestHelper.InMethod(); //log4net.Config.XmlConfigurator.Configure(); - TestScene scene = SceneSetupHelpers.SetupScene(); + TestScene scene = SceneSetupHelpers.SetupScene(); string rootPartName = "rootpart"; UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001"); @@ -321,11 +321,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests { Name = rootPartName, UUID = rootPartUuid }; SceneObjectPart linkPart = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) - { Name = linkPartName, UUID = linkPartUuid }; + { Name = linkPartName, UUID = linkPartUuid }; SceneObjectGroup sog = new SceneObjectGroup(rootPart); - sog.AddPart(linkPart); - scene.AddNewSceneObject(sog, true); + sog.AddPart(linkPart); + scene.AddNewSceneObject(sog, true); // In a test, we have to crank the backup handle manually. Normally this would be done by the timer invoked // scene backup thread. @@ -333,7 +333,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests // These changes should occur immediately without waiting for a backup pass SceneObjectGroup groupToDelete = sog.DelinkFromGroup(linkPart, false); - scene.DeleteSceneObject(groupToDelete, false); + scene.DeleteSceneObject(groupToDelete, false); List storedObjects = scene.StorageManager.DataStore.LoadObjects(scene.RegionInfo.RegionID); diff --git a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs index 5e491c2403..fe59d4f031 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs @@ -59,8 +59,8 @@ namespace OpenSim.Region.Framework.Tests string userFirstName = "Jock"; string userLastName = "Stirrup"; string userPassword = "troll"; - UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020"); - return UserProfileTestUtils.CreateUserWithInventory(scene, userFirstName, userLastName, userId, userPassword); + UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020"); + return UserProfileTestUtils.CreateUserWithInventory(scene, userFirstName, userLastName, userId, userPassword); } protected SceneObjectGroup CreateSO1(Scene scene, UUID ownerId) @@ -70,7 +70,7 @@ namespace OpenSim.Region.Framework.Tests SceneObjectPart part1 = new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) { Name = part1Name, UUID = part1Id }; - return new SceneObjectGroup(part1); + return new SceneObjectGroup(part1); } protected TaskInventoryItem CreateSOItem1(Scene scene, SceneObjectPart part) @@ -79,7 +79,7 @@ namespace OpenSim.Region.Framework.Tests nc.BodyText = "Hello World!"; nc.Encode(); UUID ncAssetUuid = new UUID("00000000-0000-0000-1000-000000000000"); - UUID ncItemUuid = new UUID("00000000-0000-0000-1100-000000000000"); + UUID ncItemUuid = new UUID("00000000-0000-0000-1100-000000000000"); AssetBase ncAsset = AssetHelpers.CreateAsset(ncAssetUuid, AssetType.Notecard, nc.AssetData, UUID.Zero); scene.AssetService.Store(ncAsset); @@ -114,9 +114,9 @@ namespace OpenSim.Region.Framework.Tests scene.MoveTaskInventoryItem(user1.PrincipalID, folder.ID, sop1, sopItem1.ItemID); InventoryItemBase ncUserItem - = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, user1.PrincipalID, "Objects/ncItem"); + = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, user1.PrincipalID, "Objects/ncItem"); Assert.That(ncUserItem, Is.Not.Null, "Objects/ncItem was not found"); - } + } /// /// Test MoveTaskInventoryItem where the item has no parent folder assigned. @@ -138,7 +138,7 @@ namespace OpenSim.Region.Framework.Tests scene.MoveTaskInventoryItem(user1.PrincipalID, UUID.Zero, sop1, sopItem1.ItemID); InventoryItemBase ncUserItem - = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, user1.PrincipalID, "Notecards/ncItem"); + = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, user1.PrincipalID, "Notecards/ncItem"); Assert.That(ncUserItem, Is.Not.Null, "Notecards/ncItem was not found"); } } diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index 29695034ae..6f044e0086 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs @@ -962,7 +962,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups if ((groupInfo == null) || (account == null)) { return; - } + } // Send Message to Ejectee GridInstantMessage msg = new GridInstantMessage(); diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs index 9363205263..0d265f2501 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs @@ -91,11 +91,11 @@ using OpenSim.Services.Interfaces; * + RoleID * * GroupID -> GroupNotice -> NoticeID - * + TimeStamp [uint] - * + FromName [string] - * + Subject [string] - * + Message [string] - * + BinaryBucket [byte[]] + * + TimeStamp [uint] + * + FromName [string] + * + Subject [string] + * + Message [string] + * + BinaryBucket [byte[]] * * */ @@ -309,7 +309,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups GroupInfoMap["OwnerRoleID"] = OSD.FromUUID(OwnerRoleID); GroupInfoMap["OwnersPowers"] = OSD.FromULong((ulong)m_DefaultOwnerPowers); - if(SimianAddGeneric(GroupID, "Group", name, GroupInfoMap)) + if (SimianAddGeneric(GroupID, "Group", name, GroupInfoMap)) { AddGroupRole(requestingAgentID, GroupID, UUID.Zero, "Everyone", "Members of " + name, "Member of " + name, (ulong)m_DefaultEveryonePowers); AddGroupRole(requestingAgentID, GroupID, OwnerRoleID, "Owners", "Owners of " + name, "Owner of " + name, (ulong)m_DefaultOwnerPowers); @@ -334,7 +334,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups string GroupName; OSDMap GroupInfoMap; - if( SimianGetFirstGenericEntry(groupID, "GroupInfo", out GroupName, out GroupInfoMap) ) + if (SimianGetFirstGenericEntry(groupID, "GroupInfo", out GroupName, out GroupInfoMap)) { GroupInfoMap["Charter"] = OSD.FromString(charter); GroupInfoMap["ShowInList"] = OSD.FromBoolean(showInList); @@ -379,7 +379,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups string GroupRoleMemberType = "GroupRole" + groupID.ToString(); if (SimianGetGenericEntries(GroupRoleMemberType, roleID.ToString(), out GroupRoleMembers)) { - foreach(UUID UserID in GroupRoleMembers.Keys) + foreach (UUID UserID in GroupRoleMembers.Keys) { EnsureRoleNotSelectedByMember(groupID, roleID, UserID); @@ -724,7 +724,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups } OSDMap UserGroupMemberInfo; - if( SimianGetGenericEntry(agentID, "GroupMember", groupID.ToString(), out UserGroupMemberInfo) ) + if (SimianGetGenericEntry(agentID, "GroupMember", groupID.ToString(), out UserGroupMemberInfo)) { data.AcceptNotices = UserGroupMemberInfo["AcceptNotices"].AsBoolean(); data.Contribution = UserGroupMemberInfo["Contribution"].AsInteger(); @@ -736,7 +736,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups // OSDMap GroupRoleInfo; - if( SimianGetGenericEntry(groupID, "GroupRole", data.ActiveRole.ToString(), out GroupRoleInfo) ) + if (SimianGetGenericEntry(groupID, "GroupRole", data.ActiveRole.ToString(), out GroupRoleInfo)) { data.GroupTitle = GroupRoleInfo["Title"].AsString(); data.GroupPowers = GroupRoleInfo["Powers"].AsULong(); @@ -748,7 +748,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups // OSDMap GroupInfo; string GroupName; - if( SimianGetFirstGenericEntry(groupID, "Group", out GroupName, out GroupInfo) ) + if (SimianGetFirstGenericEntry(groupID, "Group", out GroupName, out GroupInfo)) { data.GroupID = groupID; data.AllowPublish = GroupInfo["AllowPublish"].AsBoolean(); @@ -928,12 +928,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups Dictionary GroupRoles; if (SimianGetGenericEntries(groupID, "GroupRole", out GroupRoles)) { - foreach( KeyValuePair Role in GroupRoles ) + foreach (KeyValuePair Role in GroupRoles) { Dictionary GroupRoleMembers; - if( SimianGetGenericEntries("GroupRole"+groupID.ToString(), Role.Key, out GroupRoleMembers) ) + if (SimianGetGenericEntries("GroupRole"+groupID.ToString(), Role.Key, out GroupRoleMembers)) { - foreach( KeyValuePair GroupRoleMember in GroupRoleMembers ) + foreach (KeyValuePair GroupRoleMember in GroupRoleMembers) { GroupRoleMembersData data = new GroupRoleMembersData(); @@ -1264,7 +1264,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Generics Result {0}", entryMap["Value"].AsString()); maps.Add(entryMap["Key"].AsString(), (OSDMap)OSDParser.DeserializeJson(entryMap["Value"].AsString())); } - if(maps.Count == 0) + if (maps.Count == 0) { if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] No Generics Results"); } @@ -1352,17 +1352,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups } // Check if this is an update or a request - if ( requestArgs["RequestMethod"] == "RemoveGeneric" - || requestArgs["RequestMethod"] == "AddGeneric" - ) - + if (requestArgs["RequestMethod"] == "RemoveGeneric" + || requestArgs["RequestMethod"] == "AddGeneric") { // Any and all updates cause the cache to clear m_memoryCache.Clear(); // Send update to server, return the response without caching it return WebUtil.PostToService(m_groupsServerURI, requestArgs); - } // If we're not doing an update, we must be requesting data @@ -1372,7 +1369,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups OSDMap response = null; if (!m_memoryCache.TryGetValue(CacheKey, out response)) { - // if it wasn't in the cache, pass the request to the Simian Grid Services + // if it wasn't in the cache, pass the request to the Simian Grid Services response = WebUtil.PostToService(m_groupsServerURI, requestArgs); // and cache the response diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs index 79b9a167d0..a88c5e2d60 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs @@ -960,7 +960,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups } - if( resp == null ) + if (resp == null) { string UserService; UUID SessionID; @@ -1065,7 +1065,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups /// /// Group Request Tokens are an attempt to allow the groups service to authenticate - /// requests. + /// requests. /// TODO: This broke after the big grid refactor, either find a better way, or discard this /// /// diff --git a/OpenSim/Region/OptionalModules/ContentManagementSystem/MetaEntity.cs b/OpenSim/Region/OptionalModules/ContentManagementSystem/MetaEntity.cs index 796f437974..d7838c56f0 100644 --- a/OpenSim/Region/OptionalModules/ContentManagementSystem/MetaEntity.cs +++ b/OpenSim/Region/OptionalModules/ContentManagementSystem/MetaEntity.cs @@ -161,7 +161,7 @@ namespace OpenSim.Region.OptionalModules.ContentManagement //finalize m_Entity.RootPart.PhysActor = null; - m_Entity.Children = parts; + m_Entity.Children = parts; } } diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs index c439e3ec20..59ad9d87a8 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs @@ -432,7 +432,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule return; } - foreach(string button in buttons) + foreach (string button in buttons) { if (button == String.Empty) { @@ -448,7 +448,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule dm.SendDialogToUser( avatar, GetSOP().Name, GetSOP().UUID, GetSOP().OwnerID, - message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buttons); + message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buttons); } diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs index 61cbb907d9..cc51c3b020 100644 --- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs +++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs @@ -824,5 +824,5 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule RegionMoneyRequest = 1, Gift = 2, Purchase = 3 - } + } } \ No newline at end of file diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs index a0d6197004..f424e7f42c 100644 --- a/OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs +++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs @@ -49,7 +49,7 @@ namespace OpenSim.Region.RegionCombinerModule public void ClientConnect(IClientAPI client) { m_virtScene.UnSubscribeToClientPrimEvents(client); - m_virtScene.UnSubscribeToClientPrimRezEvents(client); + m_virtScene.UnSubscribeToClientPrimRezEvents(client); m_virtScene.UnSubscribeToClientInventoryEvents(client); ((AttachmentsModule)m_virtScene.AttachmentsModule).UnsubscribeFromClientEvents(client); //m_virtScene.UnSubscribeToClientTeleportEvents(client); @@ -66,7 +66,7 @@ namespace OpenSim.Region.RegionCombinerModule client.OnRezObject += LocalRezObject; m_rootScene.SubscribeToClientInventoryEvents(client); - ((AttachmentsModule)m_rootScene.AttachmentsModule).SubscribeToClientEvents(client); + ((AttachmentsModule)m_rootScene.AttachmentsModule).SubscribeToClientEvents(client); //m_rootScene.SubscribeToClientTeleportEvents(client); m_rootScene.SubscribeToClientScriptEvents(client); diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs index 33ff707e9f..be5411a34b 100644 --- a/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs +++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs @@ -118,7 +118,7 @@ public class RegionCombinerLargeLandChannel : ILandChannel return regionData.RegionScene.LandChannel.GetLandObject(x - offsetX, y - offsetY); } } - + ILandObject obj = new LandObject(UUID.Zero, false, RegData.RegionScene); obj.LandData.Name = "NO LAND"; return obj; @@ -142,14 +142,14 @@ public class RegionCombinerLargeLandChannel : ILandChannel public void Join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) { - RootRegionLandChannel.Join(start_x, start_y, end_x, end_y, attempting_user_id); + RootRegionLandChannel.Join(start_x, start_y, end_x, end_y, attempting_user_id); } public void Subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) { RootRegionLandChannel.Subdivide(start_x, start_y, end_x, end_y, attempting_user_id); } - + public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) { RootRegionLandChannel.ReturnObjectsInParcel(localID, returnType, agentIDs, taskIDs, remoteClient); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index a9c5d10e52..0692fdbe47 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -7977,7 +7977,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api res.Add(new LSL_Integer((int)me.ControlPermissions)); break; } - } + } return res; } @@ -7993,7 +7993,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (face < 0 || face > m_host.GetNumberOfSides() - 1) return ScriptBaseClass.LSL_STATUS_OK; - return SetPrimMediaParams(face, rules); + return SetPrimMediaParams(face, rules); } private LSL_Integer SetPrimMediaParams(int face, LSL_List rules) @@ -8082,7 +8082,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api me.ControlPermissions = (MediaPermission)(byte)(int)rules.GetLSLIntegerItem(i++); break; } - } + } module.SetMediaEntry(m_host, face, me); @@ -8102,7 +8102,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api IMoapModule module = m_ScriptEngine.World.RequestModuleInterface(); if (null == module) - throw new Exception("Media on a prim functions not available"); + throw new Exception("Media on a prim functions not available"); module.ClearMediaEntry(m_host, face); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index a529a944fb..477c52d79c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -1190,7 +1190,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api World.LandChannel.Join(startx,starty,endx,endy,m_host.OwnerID); } - + public void osParcelSubdivide(LSL_Vector pos1, LSL_Vector pos2) { CheckThreatLevel(ThreatLevel.High, "osParcelSubdivide"); @@ -1213,7 +1213,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // can modify it ILandObject startLandObject = World.LandChannel.GetLandObject((int)pos.x, (int)pos.y); - if (startLandObject == null) + if (startLandObject == null) { OSSLShoutError("There is no land at that location"); return; @@ -1230,7 +1230,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api UUID uuid; // Process the rules, not sure what the impact would be of changing owner or group - for (int idx = 0; idx < rules.Length; ) + for (int idx = 0; idx < rules.Length;) { int code = rules.GetLSLIntegerItem(idx++); string arg = rules.GetLSLStringItem(idx++); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index 2b67e841b2..fefbb35760 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs @@ -416,7 +416,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins List sensedEntities = new List(); // If nobody about quit fast - if(m_CmdManager.m_ScriptEngine.World.GetRootAgentCount() == 0) + if (m_CmdManager.m_ScriptEngine.World.GetRootAgentCount() == 0) return sensedEntities; SceneObjectPart SensePoint = ts.host; @@ -485,7 +485,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins { ScenePresence sp; // Try direct lookup by UUID - if(!m_CmdManager.m_ScriptEngine.World.TryGetScenePresence(ts.keyID, out sp)) + if (!m_CmdManager.m_ScriptEngine.World.TryGetScenePresence(ts.keyID, out sp)) return sensedEntities; senseEntity(sp); } diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 8102acd457..427d4e5b16 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -564,7 +564,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine bool postOnRez = (bool)p[4]; StateSource stateSource = (StateSource)p[5]; - lock(m_CompileDict) + lock (m_CompileDict) { if (!m_CompileDict.ContainsKey(itemID)) return false; diff --git a/OpenSim/Server/Base/ServerUtils.cs b/OpenSim/Server/Base/ServerUtils.cs index e7a8294fef..f4472c7dc0 100644 --- a/OpenSim/Server/Base/ServerUtils.cs +++ b/OpenSim/Server/Base/ServerUtils.cs @@ -62,7 +62,7 @@ namespace OpenSim.Server.Base /// /// /// The arguments which control which constructor is invoked on the plugin - /// + /// public static T LoadPlugin(string dllName, Object[] args) where T:class { string[] parts = dllName.Split(new char[] {':'}); diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs index f5b59823e6..479a80e297 100644 --- a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs @@ -86,7 +86,7 @@ namespace OpenSim.Services.Connectors.Hypergrid paramList.Add(hash); XmlRpcRequest request = new XmlRpcRequest("link_region", paramList); - string uri = "http://" + ((info.ServerURI != null && info.ServerURI != string.Empty && !info.ServerURI.StartsWith("http:")) ? info.ServerURI : info.ExternalEndPoint.Address + ":" + info.HttpPort + "/" ); + string uri = "http://" + ((info.ServerURI != null && info.ServerURI != string.Empty && !info.ServerURI.StartsWith("http:")) ? info.ServerURI : info.ExternalEndPoint.Address + ":" + info.HttpPort + "/"); m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Linking to " + uri); XmlRpcResponse response = null; try diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs index e25e7ebd3c..403ee15b38 100644 --- a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs @@ -526,7 +526,7 @@ namespace OpenSim.Services.Connectors InventoryFolderBase folder = new InventoryFolderBase(); try - { + { folder.ParentID = new UUID(data["ParentID"].ToString()); folder.Type = short.Parse(data["Type"].ToString()); folder.Version = ushort.Parse(data["Version"].ToString()); diff --git a/OpenSim/Services/InventoryService/InventoryService.cs b/OpenSim/Services/InventoryService/InventoryService.cs index 86bca79d6b..e543337c71 100644 --- a/OpenSim/Services/InventoryService/InventoryService.cs +++ b/OpenSim/Services/InventoryService/InventoryService.cs @@ -276,11 +276,11 @@ namespace OpenSim.Services.InventoryService List folders = RequestSubFolders(root.ID); foreach (InventoryFolderBase folder in folders) - { + { if (folder.Type == (short)type) { // m_log.DebugFormat( -// "[INVENTORY SERVICE]: Found folder {0} type {1}", folder.Name, (AssetType)folder.Type); +// "[INVENTORY SERVICE]: Found folder {0} type {1}", folder.Name, (AssetType)folder.Type); return folder; } diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 3f9bc19c9d..d30c149cf0 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs @@ -308,7 +308,7 @@ namespace OpenSim.Services.LLLoginService { // something went wrong, make something up, so that we don't have to test this anywhere else guinfo = new GridUserInfo(); - guinfo.LastPosition = guinfo.HomePosition = new Vector3(128, 128, 30); + guinfo.LastPosition = guinfo.HomePosition = new Vector3(128, 128, 30); } // diff --git a/OpenSim/Services/UserAccountService/UserAccountService.cs b/OpenSim/Services/UserAccountService/UserAccountService.cs index 65c247f334..f376cf825b 100644 --- a/OpenSim/Services/UserAccountService/UserAccountService.cs +++ b/OpenSim/Services/UserAccountService/UserAccountService.cs @@ -97,10 +97,10 @@ namespace OpenSim.Services.UserAccountService public UserAccount GetUserAccount(UUID scopeID, string firstName, string lastName) { -// m_log.DebugFormat( -// "[USER ACCOUNT SERVICE]: Retrieving account by username for {0} {1}, scope {2}", -// firstName, lastName, scopeID); - +// m_log.DebugFormat( +// "[USER ACCOUNT SERVICE]: Retrieving account by username for {0} {1}, scope {2}", +// firstName, lastName, scopeID); + UserAccountData[] d; if (scopeID != UUID.Zero) @@ -235,10 +235,10 @@ namespace OpenSim.Services.UserAccountService public bool StoreUserAccount(UserAccount data) { -// m_log.DebugFormat( -// "[USER ACCOUNT SERVICE]: Storing user account for {0} {1} {2}, scope {3}", -// data.FirstName, data.LastName, data.PrincipalID, data.ScopeID); - +// m_log.DebugFormat( +// "[USER ACCOUNT SERVICE]: Storing user account for {0} {1} {2}, scope {3}", +// data.FirstName, data.LastName, data.PrincipalID, data.ScopeID); + UserAccountData d = new UserAccountData(); d.FirstName = data.FirstName; @@ -285,7 +285,7 @@ namespace OpenSim.Services.UserAccountService #endregion #region Console commands - + /// /// Handle the create user command from the console. /// @@ -296,7 +296,7 @@ namespace OpenSim.Services.UserAccountService string lastName; string password; string email; - + List excluded = new List(new char[]{' '}); if (cmdparams.Length < 3) diff --git a/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs b/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs index 315d4052e7..f453a4bf33 100644 --- a/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs +++ b/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs @@ -99,7 +99,7 @@ namespace OpenSim.Data.Null } public void RemoveObject(UUID obj, UUID regionUUID) - { + { // All parts belonging to the object with the uuid are removed. List parts = new List(m_sceneObjectParts.Values); foreach (SceneObjectPart part in parts) @@ -108,7 +108,7 @@ namespace OpenSim.Data.Null { m_log.DebugFormat( "[MOCK REGION DATA PLUGIN]: Removing part {0} {1} as part of object {2} from {3}", - part.Name, part.UUID, obj, regionUUID); + part.Name, part.UUID, obj, regionUUID); m_sceneObjectParts.Remove(part.UUID); } } @@ -129,7 +129,7 @@ namespace OpenSim.Data.Null if (prim.IsRoot) { m_log.DebugFormat( - "[MOCK REGION DATA PLUGIN]: Loading root part {0} {1} in {2}", prim.Name, prim.UUID, regionUUID); + "[MOCK REGION DATA PLUGIN]: Loading root part {0} {1} in {2}", prim.Name, prim.UUID, regionUUID); objects[prim.UUID] = new SceneObjectGroup(prim); } } diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs index 615e519b2d..13f364b187 100644 --- a/OpenSim/Tests/Common/Mock/TestScene.cs +++ b/OpenSim/Tests/Common/Mock/TestScene.cs @@ -69,6 +69,6 @@ namespace OpenSim.Tests.Common.Mock public AsyncSceneObjectGroupDeleter SceneObjectGroupDeleter { get { return m_asyncSceneObjectDeleter; } - } + } } } \ No newline at end of file diff --git a/OpenSim/Tests/Common/Setup/AssetHelpers.cs b/OpenSim/Tests/Common/Setup/AssetHelpers.cs index f9a80b05b2..8647cfed51 100644 --- a/OpenSim/Tests/Common/Setup/AssetHelpers.cs +++ b/OpenSim/Tests/Common/Setup/AssetHelpers.cs @@ -54,8 +54,8 @@ namespace OpenSim.Tests.Common { AssetBase asset = CreateAsset(UUID.Random(), AssetType.Notecard, "hello", creatorId); scene.AssetService.Store(asset); - return asset; - } + return asset; + } /// /// Create an asset from the given scene object. diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs index 9318a27d05..889389b6ea 100644 --- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs +++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs @@ -58,7 +58,7 @@ namespace OpenSim.Tests.Common.Setup public class SceneSetupHelpers { // These static variables in order to allow regions to be linked by shared modules and same - // CommunicationsManager. + // CommunicationsManager. private static ISharedRegionModule m_assetService = null; // private static ISharedRegionModule m_authenticationService = null; private static ISharedRegionModule m_inventoryService = null; @@ -69,19 +69,19 @@ namespace OpenSim.Tests.Common.Setup /// /// Set up a test scene /// - /// + /// /// Automatically starts service threads, as would the normal runtime. - /// + /// /// public static TestScene SetupScene() { return SetupScene(""); } - + /// /// Set up a test scene /// - /// + /// /// Starts real inventory and asset services, as opposed to mock ones, if true /// public static TestScene SetupScene(String realServices) @@ -94,7 +94,7 @@ namespace OpenSim.Tests.Common.Setup ///// ///// Set up a test scene ///// - ///// + ///// ///// Starts real inventory and asset services, as opposed to mock ones, if true ///// This should be the same if simulating two scenes within a standalone ///// @@ -167,13 +167,13 @@ namespace OpenSim.Tests.Common.Setup capsModule.Initialise(new IniConfigSource()); testScene.AddRegionModule(capsModule.Name, capsModule); capsModule.AddRegion(testScene); - + IRegionModule godsModule = new GodsModule(); godsModule.Initialise(testScene, new IniConfigSource()); testScene.AddModule(godsModule.Name, godsModule); realServices = realServices.ToLower(); // IConfigSource config = new IniConfigSource(); - + // If we have a brand new scene, need to initialize shared region modules if ((m_assetService == null && m_inventoryService == null) || newScene) { @@ -184,13 +184,13 @@ namespace OpenSim.Tests.Common.Setup // For now, always started a 'real' authentication service StartAuthenticationService(testScene, true); - + if (realServices.Contains("inventory")) StartInventoryService(testScene, true); else StartInventoryService(testScene, false); - - StartGridService(testScene, true); + + StartGridService(testScene, true); StartUserAccountService(testScene); StartPresenceService(testScene); } @@ -207,7 +207,7 @@ namespace OpenSim.Tests.Common.Setup m_presenceService.RegionLoaded(testScene); } - + m_inventoryService.PostInitialise(); m_assetService.PostInitialise(); m_userAccountService.PostInitialise(); @@ -250,7 +250,7 @@ namespace OpenSim.Tests.Common.Setup else config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:MockAssetService"); config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll"); - assetService.Initialise(config); + assetService.Initialise(config); assetService.AddRegion(testScene); assetService.RegionLoaded(testScene); testScene.AddRegionModule(assetService.Name, assetService); @@ -277,7 +277,7 @@ namespace OpenSim.Tests.Common.Setup testScene.AddRegionModule(service.Name, service); //m_authenticationService = service; } - + private static void StartInventoryService(Scene testScene, bool real) { ISharedRegionModule inventoryService = new LocalInventoryServicesConnector(); @@ -285,7 +285,7 @@ namespace OpenSim.Tests.Common.Setup config.AddConfig("Modules"); config.AddConfig("InventoryService"); config.Configs["Modules"].Set("InventoryServices", "LocalInventoryServicesConnector"); - + if (real) { config.Configs["InventoryService"].Set("LocalServiceModule", "OpenSim.Services.InventoryService.dll:InventoryService"); @@ -294,7 +294,7 @@ namespace OpenSim.Tests.Common.Setup { config.Configs["InventoryService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:MockInventoryService"); } - + config.Configs["InventoryService"].Set("StorageProvider", "OpenSim.Tests.Common.dll"); inventoryService.Initialise(config); inventoryService.AddRegion(testScene); @@ -338,14 +338,14 @@ namespace OpenSim.Tests.Common.Setup config.Configs["UserAccountService"].Set("StorageProvider", "OpenSim.Data.Null.dll"); config.Configs["UserAccountService"].Set( "LocalServiceModule", "OpenSim.Services.UserAccountService.dll:UserAccountService"); - + if (m_userAccountService == null) { ISharedRegionModule userAccountService = new LocalUserAccountServicesConnector(); userAccountService.Initialise(config); m_userAccountService = userAccountService; } - + m_userAccountService.AddRegion(testScene); m_userAccountService.RegionLoaded(testScene); testScene.AddRegionModule(m_userAccountService.Name, m_userAccountService); @@ -559,5 +559,4 @@ namespace OpenSim.Tests.Common.Setup sogd.InventoryDeQueueAndDelete(); } } - } diff --git a/OpenSim/Tests/Common/Setup/UserInventoryTestUtils.cs b/OpenSim/Tests/Common/Setup/UserInventoryTestUtils.cs index 915af7e58d..135c50eb74 100644 --- a/OpenSim/Tests/Common/Setup/UserInventoryTestUtils.cs +++ b/OpenSim/Tests/Common/Setup/UserInventoryTestUtils.cs @@ -42,7 +42,7 @@ namespace OpenSim.Tests.Common public static InventoryItemBase CreateInventoryItem( Scene scene, string itemName, UUID itemId, string folderPath, UUID userId) - { + { InventoryItemBase item = new InventoryItemBase(); item.Name = itemName; item.AssetID = AssetHelpers.CreateAsset(scene, userId).FullID; @@ -52,7 +52,7 @@ namespace OpenSim.Tests.Common InventoryFolderBase objsFolder = scene.InventoryService.GetFolderForType(userId, AssetType.Object); item.Folder = objsFolder.ID; - scene.AddInventoryItem(item); + scene.AddInventoryItem(item); return item; } diff --git a/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs b/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs index 26156f396f..d01521dbdb 100644 --- a/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs +++ b/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs @@ -53,7 +53,7 @@ namespace OpenSim.Tests.Common.Setup // UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000099"); // return CreateUserWithInventory(commsManager, userId, callback); // } -// +// // /// // /// Create a test user with a standard inventory // /// @@ -108,11 +108,11 @@ namespace OpenSim.Tests.Common.Setup // { // LocalUserServices lus = (LocalUserServices)commsManager.UserService; // lus.AddUser(firstName, lastName, password, "bill@bailey.com", 1000, 1000, userId); -// +// // CachedUserInfo userInfo = commsManager.UserProfileCacheService.GetUserDetails(userId); // userInfo.OnInventoryReceived += callback; // userInfo.FetchInventory(); -// +// // return userInfo; // } @@ -140,6 +140,6 @@ namespace OpenSim.Tests.Common.Setup scene.UserAccountService.StoreUserAccount(ua); scene.InventoryService.CreateUserInventory(ua.PrincipalID); scene.AuthenticationService.SetPassword(ua.PrincipalID, pw); - } + } } } \ No newline at end of file