From 257fc5515ac9cb36032c2f44f040c3620ed2f328 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Mon, 4 May 2009 15:38:36 +0000 Subject: * minor: remove some mono compiler warnings, minor cleanup --- OpenSim/Framework/Console/ConsoleBase.cs | 2 +- OpenSim/Framework/Console/LocalConsole.cs | 2 +- OpenSim/Framework/Console/RemoteConsole.cs | 2 +- OpenSim/Framework/InventoryItemBase.cs | 13 ++++++++++- OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs | 25 ++++++++-------------- .../Archiver/InventoryArchiveWriteRequest.cs | 1 + .../Region/Framework/Scenes/RegionStatsHandler.cs | 12 +++++------ OpenSim/Region/Framework/Scenes/Scene.cs | 7 ------ OpenSim/Region/Framework/Scenes/SceneBase.cs | 4 ++-- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 2 +- .../Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs | 7 ++---- 11 files changed, 35 insertions(+), 42 deletions(-) diff --git a/OpenSim/Framework/Console/ConsoleBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs index 30493fc..dd3c145 100644 --- a/OpenSim/Framework/Console/ConsoleBase.cs +++ b/OpenSim/Framework/Console/ConsoleBase.cs @@ -37,7 +37,7 @@ namespace OpenSim.Framework.Console { public class ConsoleBase { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); +// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); protected string prompt = "# "; diff --git a/OpenSim/Framework/Console/LocalConsole.cs b/OpenSim/Framework/Console/LocalConsole.cs index 2344ad2..22f10fc 100644 --- a/OpenSim/Framework/Console/LocalConsole.cs +++ b/OpenSim/Framework/Console/LocalConsole.cs @@ -39,7 +39,7 @@ namespace OpenSim.Framework.Console // public class LocalConsole : CommandConsole { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); +// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private readonly object m_syncRoot = new object(); diff --git a/OpenSim/Framework/Console/RemoteConsole.cs b/OpenSim/Framework/Console/RemoteConsole.cs index 71f075e..19c3ab1 100644 --- a/OpenSim/Framework/Console/RemoteConsole.cs +++ b/OpenSim/Framework/Console/RemoteConsole.cs @@ -41,7 +41,7 @@ namespace OpenSim.Framework.Console // public class RemoteConsole : CommandConsole { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); +// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private IHttpServer m_Server = null; private IConfigSource m_Config = null; diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs index ce3dc63..b14ce7f 100644 --- a/OpenSim/Framework/InventoryItemBase.cs +++ b/OpenSim/Framework/InventoryItemBase.cs @@ -33,7 +33,7 @@ namespace OpenSim.Framework /// /// Inventory Item - contains all the properties associated with an individual inventory piece. /// - public class InventoryItemBase : InventoryNodeBase + public class InventoryItemBase : InventoryNodeBase, ICloneable { /// /// The inventory type of the item. This is slightly different from the asset type in some situations. @@ -143,5 +143,16 @@ namespace OpenSim.Framework { CreationDate = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; } + + public object Clone() + { + InventoryItemBase clone = new InventoryItemBase(); + clone.AssetID = AssetID; + clone.AssetType = AssetType; + clone.BasePermissions = BasePermissions; + clone.CreationDate = CreationDate; + clone.CreatorId = CreatorId; + + } } } diff --git a/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs b/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs index 6878fe5..1882005 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs @@ -36,20 +36,13 @@ using System.Reflection; namespace OpenSim.Region.ClientStack.LindenUDP { - /* - * - * J2KImage - * - * We use this class to store image data and associated request data and attributes - * - * - * - */ - + /// + /// We use this class to store image data and associated request data and attributes + /// public class J2KImage { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + public double m_designatedPriorityKey; public double m_requestedPriority = 0.0d; public uint m_lastSequence = 0; @@ -107,7 +100,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { return (ushort)(((m_asset.Data.Length - cFirstPacketSize + cImagePacketSize - 1) / cImagePacketSize) + 1); } - catch(Exception e) + catch (Exception) { // If the asset is missing/destroyed/truncated, we will land // here @@ -223,9 +216,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } - //It's concievable that the client might request packet one - //from a one packet image, which is really packet 0, - //which would leave us with a negative imagePacketSize.. + // It's concievable that the client might request packet one + // from a one packet image, which is really packet 0, + // which would leave us with a negative imagePacketSize.. if (imagePacketSize > 0) { byte[] imageData = new byte[imagePacketSize]; @@ -252,7 +245,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP return true; } } - catch (Exception e) + catch (Exception) { return false; } diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index 9c45fd2..0144136 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs @@ -124,6 +124,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver protected void SaveInvItem(InventoryItemBase inventoryItem, string path) { string filename = string.Format("{0}{1}_{2}.xml", path, inventoryItem.Name, inventoryItem.ID); + string serialization = UserInventoryItemSerializer.Serialize(inventoryItem); m_archive.WriteFile(filename, serialization); diff --git a/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs b/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs index f521490..4ef5221 100644 --- a/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs +++ b/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs @@ -53,16 +53,15 @@ namespace OpenSim.Region.Framework.Scenes public class RegionStatsHandler : IStreamedRequestHandler - { - + { private string osRXStatsURI = String.Empty; private string osXStatsURI = String.Empty; - private string osSecret = String.Empty; + //private string osSecret = String.Empty; private OpenSim.Framework.RegionInfo regionInfo; public string localZone = TimeZone.CurrentTimeZone.StandardName; public TimeSpan utcOffset = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now); - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public RegionStatsHandler(OpenSim.Framework.RegionInfo region_info ) { @@ -94,10 +93,9 @@ namespace OpenSim.Region.Framework.Scenes } private string Report() - { - + { OSDMap args = new OSDMap(30); - int time = Util.ToUnixTime( DateTime.Now ); + //int time = Util.ToUnixTime( DateTime.Now ); args["OSStatsURI"] = OSD.FromString("http://" + regionInfo.ExternalHostName + ":" + regionInfo.HttpPort + "/" + osXStatsURI + "/"); args["TimeZoneName"] = OSD.FromString(localZone); args["TimeZoneOffs"] = OSD.FromReal(utcOffset.TotalHours); diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 9f99305..4dc1661 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -148,8 +148,6 @@ namespace OpenSim.Region.Framework.Scenes protected float m_timespan = 0.089f; protected DateTime m_lastupdate = DateTime.Now; - protected float m_timedilation = 1.0f; - private int m_update_physics = 1; private int m_update_entitymovement = 1; private int m_update_entities = 1; // Run through all objects checking for updates @@ -230,11 +228,6 @@ namespace OpenSim.Region.Framework.Scenes get { return m_sceneGraph.m_syncRoot; } } - public float TimeDilation - { - get { return m_timedilation; } - } - public int MaxPrimsPerFrame { get { return m_maxPrimsPerFrame; } diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs index 9d8582f..6510a0c 100644 --- a/OpenSim/Region/Framework/Scenes/SceneBase.cs +++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs @@ -110,14 +110,14 @@ namespace OpenSim.Region.Framework.Scenes public float TimeDilation { - get { return 1.0f; } + get { return m_timedilation; } } + protected float m_timedilation = 1.0f; protected ulong m_regionHandle; protected string m_regionName; protected RegionInfo m_regInfo; - //public TerrainEngine Terrain; public ITerrainChannel Heightmap; /// diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index bca1a65..6b5883e 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -1361,7 +1361,7 @@ if (m_shape != null) { /// public SceneObjectPart Copy(uint localID, UUID AgentID, UUID GroupID, int linkNum, bool userExposed) { - SceneObjectPart dupe = (SceneObjectPart) MemberwiseClone(); + SceneObjectPart dupe = (SceneObjectPart)MemberwiseClone(); dupe.m_shape = m_shape.Copy(); dupe.m_regionHandle = m_regionHandle; if (userExposed) diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs index e04b1ba..ddd0c12 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs @@ -594,7 +594,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice return response; string auth_token = (string)requestBody["auth_token"]; - string[] auth_tokenvals = auth_token.Split(':'); + //string[] auth_tokenvals = auth_token.Split(':'); //string username = auth_tokenvals[0]; int strcount = 0; @@ -643,9 +643,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice ", ids[i],i,m_freeSwitchRealm,dt)); } - - - + resp.Append(""); response["str_response_string"] = resp.ToString(); @@ -716,7 +714,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice */ } - public Hashtable FreeSwitchConfigHTTPHandler(Hashtable request) { m_log.DebugFormat("[FreeSwitchVoice] FreeSwitchConfigHTTPHandler called with {0}", (string)request["body"]); -- cgit v1.1