cosmetics

This commit is contained in:
UbitUmarov
2020-08-19 18:07:40 +01:00
parent 0dc925b5c4
commit 612632f945
11 changed files with 288 additions and 343 deletions

View File

@@ -46,7 +46,6 @@ using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Services.Interfaces;
using AssetLandmark = OpenSim.Framework.AssetLandmark;
using Caps = OpenSim.Framework.Capabilities.Caps;
using PermissionMask = OpenSim.Framework.PermissionMask;
@@ -314,9 +313,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// LLClientView Only
public delegate void BinaryGenericMessage(Object sender, string method, byte[][] args);
/// <summary>Used to adjust Sun Orbit values so Linden based viewers properly position sun</summary>
private const float m_sunPainDaHalfOrbitalCutoff = 4.712388980384689858f;
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static string LogHeader = "[LLCLIENTVIEW]";
@@ -361,7 +357,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// </value>
protected List<uint> m_killRecord;
// protected HashSet<uint> m_attachmentsSent;
//protected HashSet<uint> m_attachmentsSent;
private bool m_SendLogoutPacketWhenClosing = true;
@@ -477,7 +473,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// <summary>
/// Used to synchronise threads when client is being closed.
/// </summary>
public Object CloseSyncLock { get; private set; }
public object CloseSyncLock { get;} = new object();
public bool IsLoggingOut { get; set; }
@@ -507,7 +503,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
// DebugPacketLevel = 1;
CloseSyncLock = new Object();
SelectedObjects = new List<uint>();
RegisterInterface<IClientIM>(this);
@@ -610,7 +605,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(disable, ThrottleOutPacketType.Unknown);
}
// Fire the callback for this connection closing
if (OnConnectionClosed != null)
OnConnectionClosed(this);
@@ -7938,9 +7932,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#endregion
/// <summary>
/// This is a different way of processing packets then ProcessInPacket
/// </summary>
protected virtual void RegisterLocalPacketHandlers()
{
AddLocalPacketHandler(PacketType.LogoutRequest, HandleLogout);
@@ -13160,9 +13151,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public bool TryGet<T>(out T iface)
{
if (m_clientInterfaces.ContainsKey(typeof(T)))
if(m_clientInterfaces.TryGetValue(typeof(T), out object o))
{
iface = (T)m_clientInterfaces[typeof(T)];
iface = (T)o;
return true;
}
iface = default(T);

View File

@@ -262,19 +262,7 @@ namespace OpenMetaverse
try
{
// This udp socket flag is not supported under mono,
// so we'll catch the exception and continue
// Try does not protect some mono versions on mac
// this may work now on all platforms
//if(Util.IsWindows())
//{
m_udpSocket.IOControl(SIO_UDP_CONNRESET, new byte[] { 0 }, null);
m_log.Debug("[UDPBASE]: SIO_UDP_CONNRESET flag set");
//}
//else
//{
// m_log.Debug("[UDPBASE]: SIO_UDP_CONNRESET flag not supported on this platform, ignoring");
//}
m_udpSocket.IOControl(SIO_UDP_CONNRESET, new byte[] { 0 }, null);
}
catch
{