* minor: remove some mono compiler warnings, minor cleanup

0.6.5-rc1
Justin Clarke Casey 2009-05-04 15:38:36 +00:00
parent f80ba373fa
commit 257fc5515a
11 changed files with 35 additions and 42 deletions

View File

@ -37,7 +37,7 @@ namespace OpenSim.Framework.Console
{ {
public class ConsoleBase 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 = "# "; protected string prompt = "# ";

View File

@ -39,7 +39,7 @@ namespace OpenSim.Framework.Console
// //
public class LocalConsole : CommandConsole 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(); private readonly object m_syncRoot = new object();

View File

@ -41,7 +41,7 @@ namespace OpenSim.Framework.Console
// //
public class RemoteConsole : CommandConsole 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 IHttpServer m_Server = null;
private IConfigSource m_Config = null; private IConfigSource m_Config = null;

View File

@ -33,7 +33,7 @@ namespace OpenSim.Framework
/// <summary> /// <summary>
/// Inventory Item - contains all the properties associated with an individual inventory piece. /// Inventory Item - contains all the properties associated with an individual inventory piece.
/// </summary> /// </summary>
public class InventoryItemBase : InventoryNodeBase public class InventoryItemBase : InventoryNodeBase, ICloneable
{ {
/// <summary> /// <summary>
/// The inventory type of the item. This is slightly different from the asset type in some situations. /// 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; 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;
}
} }
} }

View File

@ -36,20 +36,13 @@ using System.Reflection;
namespace OpenSim.Region.ClientStack.LindenUDP namespace OpenSim.Region.ClientStack.LindenUDP
{ {
/* /// <summary>
* /// We use this class to store image data and associated request data and attributes
* J2KImage /// </summary>
*
* We use this class to store image data and associated request data and attributes
*
*
*
*/
public class J2KImage public class J2KImage
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public double m_designatedPriorityKey; public double m_designatedPriorityKey;
public double m_requestedPriority = 0.0d; public double m_requestedPriority = 0.0d;
public uint m_lastSequence = 0; 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); 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 // If the asset is missing/destroyed/truncated, we will land
// here // here
@ -252,7 +245,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
return true; return true;
} }
} }
catch (Exception e) catch (Exception)
{ {
return false; return false;
} }

View File

@ -124,6 +124,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
protected void SaveInvItem(InventoryItemBase inventoryItem, string path) protected void SaveInvItem(InventoryItemBase inventoryItem, string path)
{ {
string filename = string.Format("{0}{1}_{2}.xml", path, inventoryItem.Name, inventoryItem.ID); string filename = string.Format("{0}{1}_{2}.xml", path, inventoryItem.Name, inventoryItem.ID);
string serialization = UserInventoryItemSerializer.Serialize(inventoryItem); string serialization = UserInventoryItemSerializer.Serialize(inventoryItem);
m_archive.WriteFile(filename, serialization); m_archive.WriteFile(filename, serialization);

View File

@ -54,15 +54,14 @@ namespace OpenSim.Region.Framework.Scenes
public class RegionStatsHandler : IStreamedRequestHandler public class RegionStatsHandler : IStreamedRequestHandler
{ {
private string osRXStatsURI = String.Empty; private string osRXStatsURI = String.Empty;
private string osXStatsURI = String.Empty; private string osXStatsURI = String.Empty;
private string osSecret = String.Empty; //private string osSecret = String.Empty;
private OpenSim.Framework.RegionInfo regionInfo; private OpenSim.Framework.RegionInfo regionInfo;
public string localZone = TimeZone.CurrentTimeZone.StandardName; public string localZone = TimeZone.CurrentTimeZone.StandardName;
public TimeSpan utcOffset = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now); 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 ) public RegionStatsHandler(OpenSim.Framework.RegionInfo region_info )
{ {
@ -95,9 +94,8 @@ namespace OpenSim.Region.Framework.Scenes
private string Report() private string Report()
{ {
OSDMap args = new OSDMap(30); 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["OSStatsURI"] = OSD.FromString("http://" + regionInfo.ExternalHostName + ":" + regionInfo.HttpPort + "/" + osXStatsURI + "/");
args["TimeZoneName"] = OSD.FromString(localZone); args["TimeZoneName"] = OSD.FromString(localZone);
args["TimeZoneOffs"] = OSD.FromReal(utcOffset.TotalHours); args["TimeZoneOffs"] = OSD.FromReal(utcOffset.TotalHours);

View File

@ -148,8 +148,6 @@ namespace OpenSim.Region.Framework.Scenes
protected float m_timespan = 0.089f; protected float m_timespan = 0.089f;
protected DateTime m_lastupdate = DateTime.Now; protected DateTime m_lastupdate = DateTime.Now;
protected float m_timedilation = 1.0f;
private int m_update_physics = 1; private int m_update_physics = 1;
private int m_update_entitymovement = 1; private int m_update_entitymovement = 1;
private int m_update_entities = 1; // Run through all objects checking for updates 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; } get { return m_sceneGraph.m_syncRoot; }
} }
public float TimeDilation
{
get { return m_timedilation; }
}
public int MaxPrimsPerFrame public int MaxPrimsPerFrame
{ {
get { return m_maxPrimsPerFrame; } get { return m_maxPrimsPerFrame; }

View File

@ -110,14 +110,14 @@ namespace OpenSim.Region.Framework.Scenes
public float TimeDilation public float TimeDilation
{ {
get { return 1.0f; } get { return m_timedilation; }
} }
protected float m_timedilation = 1.0f;
protected ulong m_regionHandle; protected ulong m_regionHandle;
protected string m_regionName; protected string m_regionName;
protected RegionInfo m_regInfo; protected RegionInfo m_regInfo;
//public TerrainEngine Terrain;
public ITerrainChannel Heightmap; public ITerrainChannel Heightmap;
/// <value> /// <value>

View File

@ -594,7 +594,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
return response; return response;
string auth_token = (string)requestBody["auth_token"]; string auth_token = (string)requestBody["auth_token"];
string[] auth_tokenvals = auth_token.Split(':'); //string[] auth_tokenvals = auth_token.Split(':');
//string username = auth_tokenvals[0]; //string username = auth_tokenvals[0];
int strcount = 0; int strcount = 0;
@ -644,8 +644,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
</level3>", ids[i],i,m_freeSwitchRealm,dt)); </level3>", ids[i],i,m_freeSwitchRealm,dt));
} }
resp.Append("</buddies><groups></groups></body></level0></response>"); resp.Append("</buddies><groups></groups></body></level0></response>");
response["str_response_string"] = resp.ToString(); response["str_response_string"] = resp.ToString();
@ -716,7 +714,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
*/ */
} }
public Hashtable FreeSwitchConfigHTTPHandler(Hashtable request) public Hashtable FreeSwitchConfigHTTPHandler(Hashtable request)
{ {
m_log.DebugFormat("[FreeSwitchVoice] FreeSwitchConfigHTTPHandler called with {0}", (string)request["body"]); m_log.DebugFormat("[FreeSwitchVoice] FreeSwitchConfigHTTPHandler called with {0}", (string)request["body"]);