* 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
{
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 = "# ";

View File

@ -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();

View File

@ -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;

View File

@ -33,7 +33,7 @@ namespace OpenSim.Framework
/// <summary>
/// Inventory Item - contains all the properties associated with an individual inventory piece.
/// </summary>
public class InventoryItemBase : InventoryNodeBase
public class InventoryItemBase : InventoryNodeBase, ICloneable
{
/// <summary>
/// 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;
}
}
}

View File

@ -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
*
*
*
*/
/// <summary>
/// We use this class to store image data and associated request data and attributes
/// </summary>
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;
}

View File

@ -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);

View File

@ -54,15 +54,14 @@ 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 )
{
@ -95,9 +94,8 @@ 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);

View File

@ -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; }

View File

@ -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;
/// <value>

View File

@ -1361,7 +1361,7 @@ if (m_shape != null) {
/// <returns></returns>
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)

View File

@ -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;
@ -644,8 +644,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
</level3>", ids[i],i,m_freeSwitchRealm,dt));
}
resp.Append("</buddies><groups></groups></body></level0></response>");
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"]);