From 9b6b6d05d45cf0f754a0b26bf6240ef50be66563 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Tue, 3 Jul 2007 14:37:29 +0000 Subject: * Optimized usings (the 'LL ate my scripts' commit) * added some licensing info --- .../Region/ClientStack/Assets/InventoryCache.cs | 17 ++++----- .../ClientStack/ClientStackNetworkHandler.cs | 6 --- OpenSim/Region/ClientStack/ClientView.API.cs | 44 +++++++++++----------- .../ClientStack/ClientView.AgentAssetUpload.cs | 7 ++-- .../ClientStack/ClientView.PacketHandlers.cs | 23 +++-------- .../ClientStack/ClientView.ProcessPackets.cs | 16 ++------ OpenSim/Region/ClientStack/ClientView.cs | 30 +++++++-------- OpenSim/Region/ClientStack/ClientViewBase.cs | 23 +++++------ OpenSim/Region/ClientStack/PacketServer.cs | 8 ++-- .../Region/ClientStack/RegionApplicationBase.cs | 23 +++-------- OpenSim/Region/ClientStack/UDPServer.cs | 19 ++-------- 11 files changed, 79 insertions(+), 137 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/Assets/InventoryCache.cs b/OpenSim/Region/ClientStack/Assets/InventoryCache.cs index da74f85..082c0d0 100644 --- a/OpenSim/Region/ClientStack/Assets/InventoryCache.cs +++ b/OpenSim/Region/ClientStack/Assets/InventoryCache.cs @@ -28,13 +28,12 @@ using System; using System.Collections.Generic; +using System.Text; using libsecondlife; -using OpenSim; using libsecondlife.Packets; -//using OpenSim.GridServers; +using OpenSim.Framework.Interfaces; using OpenSim.Framework.Inventory; using OpenSim.Framework.Types; -using OpenSim.Framework.Interfaces; using OpenSim.Region.ClientStack; namespace OpenSim.Assets @@ -46,7 +45,7 @@ namespace OpenSim.Assets { private Dictionary _agentsInventory; private List _serverRequests; //list of requests made to user server. - private System.Text.Encoding _enc = System.Text.Encoding.ASCII; + private Encoding _enc = Encoding.ASCII; private const uint FULL_MASK_PERMISSIONS = 2147483647; public InventoryCache() @@ -127,7 +126,7 @@ namespace OpenSim.Assets return res; } - public LLUUID AddNewInventoryItem(ClientView remoteClient, LLUUID folderID, OpenSim.Framework.Types.AssetBase asset) + public LLUUID AddNewInventoryItem(ClientView remoteClient, LLUUID folderID, AssetBase asset) { LLUUID newItem = null; if (this._agentsInventory.ContainsKey(remoteClient.AgentID)) @@ -163,7 +162,7 @@ namespace OpenSim.Assets return res; } - public bool UpdateInventoryItemAsset(ClientView remoteClient, LLUUID itemID, OpenSim.Framework.Types.AssetBase asset) + public bool UpdateInventoryItemAsset(ClientView remoteClient, LLUUID itemID, AssetBase asset) { if (this._agentsInventory.ContainsKey(remoteClient.AgentID)) { @@ -238,7 +237,7 @@ namespace OpenSim.Assets Descend.ItemData[i].SalePrice = 100; Descend.ItemData[i].SaleType = 0; Descend.ItemData[i].Type = Item.Type; - Descend.ItemData[i].CRC = libsecondlife.Helpers.InventoryCRC(1000, 0, Descend.ItemData[i].InvType, Descend.ItemData[i].Type, Descend.ItemData[i].AssetID, Descend.ItemData[i].GroupID, 100, Descend.ItemData[i].OwnerID, Descend.ItemData[i].CreatorID, Descend.ItemData[i].ItemID, Descend.ItemData[i].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); + Descend.ItemData[i].CRC = Helpers.InventoryCRC(1000, 0, Descend.ItemData[i].InvType, Descend.ItemData[i].Type, Descend.ItemData[i].AssetID, Descend.ItemData[i].GroupID, 100, Descend.ItemData[i].OwnerID, Descend.ItemData[i].CreatorID, Descend.ItemData[i].ItemID, Descend.ItemData[i].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); } userInfo.OutPacket(Descend); @@ -286,7 +285,7 @@ namespace OpenSim.Assets InventoryReply.InventoryData[0].SalePrice = 100; InventoryReply.InventoryData[0].SaleType = 0; InventoryReply.InventoryData[0].Type = Item.Type; - InventoryReply.InventoryData[0].CRC = libsecondlife.Helpers.InventoryCRC(1000, 0, InventoryReply.InventoryData[0].InvType, InventoryReply.InventoryData[0].Type, InventoryReply.InventoryData[0].AssetID, InventoryReply.InventoryData[0].GroupID, 100, InventoryReply.InventoryData[0].OwnerID, InventoryReply.InventoryData[0].CreatorID, InventoryReply.InventoryData[0].ItemID, InventoryReply.InventoryData[0].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); + InventoryReply.InventoryData[0].CRC = Helpers.InventoryCRC(1000, 0, InventoryReply.InventoryData[0].InvType, InventoryReply.InventoryData[0].Type, InventoryReply.InventoryData[0].AssetID, InventoryReply.InventoryData[0].GroupID, 100, InventoryReply.InventoryData[0].OwnerID, InventoryReply.InventoryData[0].CreatorID, InventoryReply.InventoryData[0].ItemID, InventoryReply.InventoryData[0].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); userInfo.OutPacket(InventoryReply); } } @@ -320,7 +319,7 @@ namespace OpenSim.Assets InventoryReply.InventoryData[0].SalePrice = 100; InventoryReply.InventoryData[0].SaleType = 0; InventoryReply.InventoryData[0].Type = Item.Type; - InventoryReply.InventoryData[0].CRC = libsecondlife.Helpers.InventoryCRC(1000, 0, InventoryReply.InventoryData[0].InvType, InventoryReply.InventoryData[0].Type, InventoryReply.InventoryData[0].AssetID, InventoryReply.InventoryData[0].GroupID, 100, InventoryReply.InventoryData[0].OwnerID, InventoryReply.InventoryData[0].CreatorID, InventoryReply.InventoryData[0].ItemID, InventoryReply.InventoryData[0].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); + InventoryReply.InventoryData[0].CRC = Helpers.InventoryCRC(1000, 0, InventoryReply.InventoryData[0].InvType, InventoryReply.InventoryData[0].Type, InventoryReply.InventoryData[0].AssetID, InventoryReply.InventoryData[0].GroupID, 100, InventoryReply.InventoryData[0].OwnerID, InventoryReply.InventoryData[0].CreatorID, InventoryReply.InventoryData[0].ItemID, InventoryReply.InventoryData[0].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); remoteClient.OutPacket(InventoryReply); } diff --git a/OpenSim/Region/ClientStack/ClientStackNetworkHandler.cs b/OpenSim/Region/ClientStack/ClientStackNetworkHandler.cs index f99cf79..f4e537c 100644 --- a/OpenSim/Region/ClientStack/ClientStackNetworkHandler.cs +++ b/OpenSim/Region/ClientStack/ClientStackNetworkHandler.cs @@ -25,13 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; -using System.Net; using System.Net.Sockets; -using libsecondlife; - namespace OpenSim.Region.ClientStack { diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs index 51f02da..40e0021 100644 --- a/OpenSim/Region/ClientStack/ClientView.API.cs +++ b/OpenSim/Region/ClientStack/ClientView.API.cs @@ -27,14 +27,14 @@ */ using System; using System.Collections.Generic; +using System.Net; using System.Text; -using OpenSim.Framework.Interfaces; -using OpenSim.Framework.Inventory; -using OpenSim.Framework.Types; - +using Axiom.MathLib; using libsecondlife; using libsecondlife.Packets; -using System.Net; +using OpenSim.Framework.Console; +using OpenSim.Framework.Interfaces; +using OpenSim.Framework.Types; namespace OpenSim.Region.ClientStack { @@ -137,7 +137,7 @@ namespace OpenSim.Region.ClientStack /// public void SendRegionHandshake(RegionInfo regionInfo) { - System.Text.Encoding _enc = System.Text.Encoding.ASCII; + Encoding _enc = Encoding.ASCII; RegionHandshakePacket handshake = new RegionHandshakePacket(); handshake.RegionInfo.BillableFactor = regionInfo.estateSettings.billableFactor; @@ -219,8 +219,8 @@ namespace OpenSim.Region.ClientStack /// public void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID) { - System.Text.Encoding enc = System.Text.Encoding.ASCII; - libsecondlife.Packets.ChatFromSimulatorPacket reply = new ChatFromSimulatorPacket(); + Encoding enc = Encoding.ASCII; + ChatFromSimulatorPacket reply = new ChatFromSimulatorPacket(); reply.ChatData.Audible = 1; reply.ChatData.Message = message; reply.ChatData.ChatType = type; @@ -260,7 +260,7 @@ namespace OpenSim.Region.ClientStack } catch (Exception e) { - OpenSim.Framework.Console.MainLog.Instance.Warn("ClientView API.cs: SendLayerData() - Failed with exception " + e.ToString()); + MainLog.Instance.Warn("ClientView API.cs: SendLayerData() - Failed with exception " + e.ToString()); } } @@ -286,7 +286,7 @@ namespace OpenSim.Region.ClientStack } catch (Exception e) { - OpenSim.Framework.Console.MainLog.Instance.Warn("ClientView API .cs: SendLayerData() - Failed with exception " + e.ToString()); + MainLog.Instance.Warn("ClientView API .cs: SendLayerData() - Failed with exception " + e.ToString()); } } @@ -298,7 +298,7 @@ namespace OpenSim.Region.ClientStack /// public void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourEndPoint ) { - System.Net.IPAddress neighbourIP = neighbourEndPoint.Address; + IPAddress neighbourIP = neighbourEndPoint.Address; ushort neighbourPort = (ushort) neighbourEndPoint.Port; EnableSimulatorPacket enablesimpacket = new EnableSimulatorPacket(); @@ -343,7 +343,7 @@ namespace OpenSim.Region.ClientStack newSimPack.Info = new CrossedRegionPacket.InfoBlock(); newSimPack.Info.Position = pos; newSimPack.Info.LookAt = look; // new LLVector3(0.0f, 0.0f, 0.0f); // copied from Avatar.cs - SHOULD BE DYNAMIC!!!!!!!!!! - newSimPack.RegionData = new libsecondlife.Packets.CrossedRegionPacket.RegionDataBlock(); + newSimPack.RegionData = new CrossedRegionPacket.RegionDataBlock(); newSimPack.RegionData.RegionHandle = newRegionHandle; byte[] byteIP = externalIPEndPoint.Address.GetAddressBytes(); newSimPack.RegionData.SimIP = (uint)byteIP[3] << 24; @@ -359,7 +359,7 @@ namespace OpenSim.Region.ClientStack public void SendMapBlock(List mapBlocks) { - System.Text.Encoding _enc = System.Text.Encoding.ASCII; + Encoding _enc = Encoding.ASCII; MapBlockReplyPacket mapReply = new MapBlockReplyPacket(); mapReply.AgentData.AgentID = this.AgentID; @@ -514,20 +514,20 @@ namespace OpenSim.Region.ClientStack /// public void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos, byte[] textureEntry) { - System.Text.Encoding _enc = System.Text.Encoding.ASCII; + Encoding _enc = Encoding.ASCII; //send a objectupdate packet with information about the clients avatar ObjectUpdatePacket objupdate = new ObjectUpdatePacket(); objupdate.RegionData.RegionHandle = regionHandle; objupdate.RegionData.TimeDilation = 64096; - objupdate.ObjectData = new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock[1]; + objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; objupdate.ObjectData[0] = this.CreateDefaultAvatarPacket(textureEntry); //give this avatar object a local id and assign the user a name objupdate.ObjectData[0].ID = avatarLocalID; objupdate.ObjectData[0].FullID = avatarID; objupdate.ObjectData[0].NameValue = _enc.GetBytes("FirstName STRING RW SV " + firstName + "\nLastName STRING RW SV " + lastName + " \0"); - libsecondlife.LLVector3 pos2 = new LLVector3((float)Pos.X, (float)Pos.Y, (float)Pos.Z); + LLVector3 pos2 = new LLVector3((float)Pos.X, (float)Pos.Y, (float)Pos.Z); byte[] pb = pos2.GetBytes(); Array.Copy(pb, 0, objupdate.ObjectData[0].ObjectData, 16, pb.Length); @@ -716,9 +716,9 @@ namespace OpenSim.Region.ClientStack ushort InternVelocityX; ushort InternVelocityY; ushort InternVelocityZ; - Axiom.MathLib.Vector3 internDirec = new Axiom.MathLib.Vector3(0, 0, 0); + Vector3 internDirec = new Vector3(0, 0, 0); - internDirec = new Axiom.MathLib.Vector3(velocity.X, velocity.Y, velocity.Z); + internDirec = new Vector3(velocity.X, velocity.Y, velocity.Z); internDirec = internDirec / 128.0f; internDirec.x += 1; @@ -961,7 +961,7 @@ namespace OpenSim.Region.ClientStack /// protected ObjectUpdatePacket.ObjectDataBlock CreateDefaultAvatarPacket(byte[] textureEntry) { - libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock objdata = new ObjectUpdatePacket.ObjectDataBlock(); // new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock(data1, ref i); + ObjectUpdatePacket.ObjectDataBlock objdata = new ObjectUpdatePacket.ObjectDataBlock(); // new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock(data1, ref i); SetDefaultAvatarPacketValues(ref objdata); objdata.UpdateFlags = 61 + (9 << 8) + (130 << 16) + (16 << 24); @@ -977,12 +977,12 @@ namespace OpenSim.Region.ClientStack { objdata.TextureEntry = textureEntry; } - System.Text.Encoding enc = System.Text.Encoding.ASCII; - libsecondlife.LLVector3 pos = new LLVector3(objdata.ObjectData, 16); + Encoding enc = Encoding.ASCII; + LLVector3 pos = new LLVector3(objdata.ObjectData, 16); pos.X = 100f; objdata.ID = 8880000; objdata.NameValue = enc.GetBytes("FirstName STRING RW SV Test \nLastName STRING RW SV User \0"); - libsecondlife.LLVector3 pos2 = new LLVector3(100f, 100f, 23f); + LLVector3 pos2 = new LLVector3(100f, 100f, 23f); //objdata.FullID=user.AgentID; byte[] pb = pos.GetBytes(); Array.Copy(pb, 0, objdata.ObjectData, 16, pb.Length); diff --git a/OpenSim/Region/ClientStack/ClientView.AgentAssetUpload.cs b/OpenSim/Region/ClientStack/ClientView.AgentAssetUpload.cs index bc6cc21..60cd33a 100644 --- a/OpenSim/Region/ClientStack/ClientView.AgentAssetUpload.cs +++ b/OpenSim/Region/ClientStack/ClientView.AgentAssetUpload.cs @@ -27,14 +27,13 @@ */ using System; using System.Collections.Generic; -using System.Text; +using libsecondlife; +using libsecondlife.Packets; using OpenSim.Assets; -using OpenSim.Framework.Types; using OpenSim.Framework.Interfaces; +using OpenSim.Framework.Types; using OpenSim.Framework.Utilities; using OpenSim.Region.Caches; -using libsecondlife; -using libsecondlife.Packets; namespace OpenSim.Region.ClientStack { diff --git a/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs b/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs index 0456e3c..e4512d1 100644 --- a/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs +++ b/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs @@ -25,22 +25,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections; -using System.Collections.Generic; using libsecondlife; using libsecondlife.Packets; -using Nwc.XmlRpc; -using System.Net; -using System.Net.Sockets; -using System.IO; -using System.Threading; -using System.Timers; -using OpenSim.Framework.Interfaces; -using OpenSim.Framework.Types; -using OpenSim.Framework.Inventory; -using OpenSim.Framework.Utilities; -using OpenSim.Assets; +using OpenSim.Framework.Console; namespace OpenSim.Region.ClientStack { @@ -55,7 +42,7 @@ namespace OpenSim.Region.ClientStack protected virtual bool Logout(ClientView simClient, Packet packet) { - OpenSim.Framework.Console.MainLog.Instance.Verbose( "OpenSimClient.cs:ProcessInPacket() - Got a logout request"); + MainLog.Instance.Verbose( "OpenSimClient.cs:ProcessInPacket() - Got a logout request"); //send reply to let the client logout LogoutReplyPacket logReply = new LogoutReplyPacket(); logReply.AgentData.AgentID = this.AgentID; @@ -120,7 +107,7 @@ namespace OpenSim.Region.ClientStack { if (OnUpdatePrimPosition != null) { - libsecondlife.LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); + LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); OnUpdatePrimPosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this); } //should update stored position of the prim @@ -129,7 +116,7 @@ namespace OpenSim.Region.ClientStack { if (OnUpdatePrimRotation != null) { - libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true); + LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true); OnUpdatePrimRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); } } @@ -137,7 +124,7 @@ namespace OpenSim.Region.ClientStack { if (OnUpdatePrimScale != null) { - libsecondlife.LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); + LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); } } diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs index 75d3f65..8419906 100644 --- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs +++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs @@ -26,21 +26,13 @@ * */ using System; -using System.Collections; using System.Collections.Generic; +using System.Text; using libsecondlife; using libsecondlife.Packets; -using Nwc.XmlRpc; -using System.Net; -using System.Net.Sockets; -using System.IO; -using System.Threading; -using System.Timers; -using OpenSim.Framework.Interfaces; -using OpenSim.Framework.Types; using OpenSim.Framework.Inventory; +using OpenSim.Framework.Types; using OpenSim.Framework.Utilities; -using OpenSim.Assets; namespace OpenSim.Region.ClientStack { @@ -64,7 +56,7 @@ namespace OpenSim.Region.ClientStack } else { - System.Text.Encoding _enc = System.Text.Encoding.ASCII; + Encoding _enc = Encoding.ASCII; switch (Pack.Type) { @@ -452,7 +444,7 @@ namespace OpenSim.Region.ClientStack this.OutPacket(tpStart); TeleportProgressPacket tpProgress = new TeleportProgressPacket(); - tpProgress.Info.Message = (new System.Text.ASCIIEncoding()).GetBytes("sending_landmark"); + tpProgress.Info.Message = (new ASCIIEncoding()).GetBytes("sending_landmark"); tpProgress.Info.TeleportFlags = 8; tpProgress.AgentData.AgentID = tpReq.Info.AgentID; this.OutPacket(tpProgress); diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index a36eeb0..606ca1d 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs @@ -25,24 +25,22 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections; using System.Collections.Generic; -using libsecondlife; -using libsecondlife.Packets; -using Nwc.XmlRpc; using System.Net; -using System.Net.Sockets; -using System.IO; +using System.Text; using System.Threading; using System.Timers; +using libsecondlife; +using libsecondlife.Packets; +using OpenSim.Assets; using OpenSim.Framework; +using OpenSim.Framework.Console; using OpenSim.Framework.Interfaces; -using OpenSim.Framework.Types; using OpenSim.Framework.Inventory; +using OpenSim.Framework.Types; using OpenSim.Framework.Utilities; -using OpenSim.Assets; using OpenSim.Region.Caches; +using Timer=System.Timers.Timer; namespace OpenSim.Region.ClientStack { @@ -79,7 +77,7 @@ namespace OpenSim.Region.ClientStack private int cachedtextureserial = 0; private RegionInfo m_regionData; protected AuthenticateSessionsBase m_authenticateSessionsHandler; - private System.Text.Encoding enc = System.Text.Encoding.ASCII; + private Encoding enc = Encoding.ASCII; public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary clientThreads, IWorld world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AuthenticateSessionsBase authenSessions ) { @@ -91,7 +89,7 @@ namespace OpenSim.Region.ClientStack m_inventoryCache = inventoryCache; m_authenticateSessionsHandler = authenSessions; - OpenSim.Framework.Console.MainLog.Instance.Verbose( "OpenSimClient.cs - Started up new client thread to handle incoming request"); + MainLog.Instance.Verbose( "OpenSimClient.cs - Started up new client thread to handle incoming request"); cirpack = initialcirpack; userEP = remoteEP; @@ -100,7 +98,7 @@ namespace OpenSim.Region.ClientStack PacketQueue = new BlockingQueue(); this.UploadAssets = new AgentAssetUpload(this, m_assetCache, m_inventoryCache); - AckTimer = new System.Timers.Timer(500); + AckTimer = new Timer(500); AckTimer.Elapsed += new ElapsedEventHandler(AckTimer_Elapsed); AckTimer.Start(); @@ -189,7 +187,7 @@ namespace OpenSim.Region.ClientStack protected virtual void ClientLoop() { - OpenSim.Framework.Console.MainLog.Instance.Verbose( "OpenSimClient.cs:ClientLoop() - Entered loop"); + MainLog.Instance.Verbose( "OpenSimClient.cs:ClientLoop() - Entered loop"); while (true) { QueItem nextPacket = PacketQueue.Dequeue(); @@ -211,7 +209,7 @@ namespace OpenSim.Region.ClientStack protected virtual void InitNewClient() { - OpenSim.Framework.Console.MainLog.Instance.Verbose( "OpenSimClient.cs:InitNewClient() - Adding viewer agent to world"); + MainLog.Instance.Verbose( "OpenSimClient.cs:InitNewClient() - Adding viewer agent to world"); this.m_world.AddNewClient(this, false); } @@ -222,12 +220,12 @@ namespace OpenSim.Region.ClientStack if (!sessionInfo.Authorised) { //session/circuit not authorised - OpenSim.Framework.Console.MainLog.Instance.Notice("OpenSimClient.cs:AuthUser() - New user request denied to " + userEP.ToString()); + MainLog.Instance.Notice("OpenSimClient.cs:AuthUser() - New user request denied to " + userEP.ToString()); ClientThread.Abort(); } else { - OpenSim.Framework.Console.MainLog.Instance.Notice("OpenSimClient.cs:AuthUser() - Got authenticated connection from " + userEP.ToString()); + MainLog.Instance.Notice("OpenSimClient.cs:AuthUser() - Got authenticated connection from " + userEP.ToString()); //session is authorised this.AgentID = cirpack.CircuitCode.ID; this.SessionID = cirpack.CircuitCode.SessionID; diff --git a/OpenSim/Region/ClientStack/ClientViewBase.cs b/OpenSim/Region/ClientStack/ClientViewBase.cs index 7d39405..f105978 100644 --- a/OpenSim/Region/ClientStack/ClientViewBase.cs +++ b/OpenSim/Region/ClientStack/ClientViewBase.cs @@ -27,17 +27,14 @@ * */ using System; -using System.Collections; using System.Collections.Generic; -using libsecondlife; -using libsecondlife.Packets; using System.Net; using System.Net.Sockets; -using System.IO; -using System.Threading; using System.Timers; +using libsecondlife; +using libsecondlife.Packets; +using OpenSim.Framework.Console; using OpenSim.Framework.Utilities; -using OpenSim.Framework.Interfaces; namespace OpenSim.Region.ClientStack { @@ -47,7 +44,7 @@ namespace OpenSim.Region.ClientStack protected Dictionary PendingAcks = new Dictionary(); protected Dictionary NeedAck = new Dictionary(); - protected System.Timers.Timer AckTimer; + protected Timer AckTimer; protected uint Sequence = 0; protected object SequenceLock = new object(); protected const int MAX_APPENDED_ACKS = 10; @@ -159,7 +156,7 @@ namespace OpenSim.Region.ClientStack } catch (Exception) { - OpenSim.Framework.Console.MainLog.Instance.Warn("OpenSimClient.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection " + userEP.ToString() + " - killing thread"); + MainLog.Instance.Warn("OpenSimClient.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection " + userEP.ToString() + " - killing thread"); this.KillThread(); } @@ -195,8 +192,8 @@ namespace OpenSim.Region.ClientStack else if ((NewPack.Type == PacketType.StartPingCheck)) { //reply to pingcheck - libsecondlife.Packets.StartPingCheckPacket startPing = (libsecondlife.Packets.StartPingCheckPacket)NewPack; - libsecondlife.Packets.CompletePingCheckPacket endPing = new CompletePingCheckPacket(); + StartPingCheckPacket startPing = (StartPingCheckPacket)NewPack; + CompletePingCheckPacket endPing = new CompletePingCheckPacket(); endPing.PingID.PingID = startPing.PingID.PingID; OutPacket(endPing); } @@ -224,7 +221,7 @@ namespace OpenSim.Region.ClientStack { if (Pack.Header.Reliable) { - libsecondlife.Packets.PacketAckPacket ack_it = new PacketAckPacket(); + PacketAckPacket ack_it = new PacketAckPacket(); ack_it.Packets = new PacketAckPacket.PacketsBlock[1]; ack_it.Packets[0] = new PacketAckPacket.PacketsBlock(); ack_it.Packets[0].ID = Pack.Header.Sequence; @@ -254,7 +251,7 @@ namespace OpenSim.Region.ClientStack { if ((now - packet.TickCount > RESEND_TIMEOUT) && (!packet.Header.Resent)) { - OpenSim.Framework.Console.MainLog.Instance.Verbose( "Resending " + packet.Type.ToString() + " packet, " + + MainLog.Instance.Verbose( "Resending " + packet.Type.ToString() + " packet, " + (now - packet.TickCount) + "ms have passed"); packet.Header.Resent = true; @@ -273,7 +270,7 @@ namespace OpenSim.Region.ClientStack if (PendingAcks.Count > 250) { // FIXME: Handle the odd case where we have too many pending ACKs queued up - OpenSim.Framework.Console.MainLog.Instance.Verbose( "Too many ACKs queued up!"); + MainLog.Instance.Verbose( "Too many ACKs queued up!"); return; } diff --git a/OpenSim/Region/ClientStack/PacketServer.cs b/OpenSim/Region/ClientStack/PacketServer.cs index 6f20413..b5f0a02 100644 --- a/OpenSim/Region/ClientStack/PacketServer.cs +++ b/OpenSim/Region/ClientStack/PacketServer.cs @@ -25,15 +25,13 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; using System.Collections.Generic; -using System.Text; -using libsecondlife.Packets; -using OpenSim.Framework.Interfaces; -using OpenSim.Framework; using System.Net; using System.Net.Sockets; +using libsecondlife.Packets; using OpenSim.Assets; +using OpenSim.Framework; +using OpenSim.Framework.Interfaces; using OpenSim.Region.Caches; namespace OpenSim.Region.ClientStack diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index 94db8ee..1e99c71 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs @@ -26,27 +26,16 @@ * */ using System; -using System.Text; -using System.IO; -using System.Threading; -using System.Net; -using System.Net.Sockets; -using System.Timers; -using System.Reflection; -using System.Collections; using System.Collections.Generic; -using libsecondlife; -using libsecondlife.Packets; -using OpenSim.Region.Terrain; -using OpenSim.Framework.Interfaces; -using OpenSim.Framework.Types; -using OpenSim.Framework; +using System.Net; using OpenSim.Assets; -using OpenSim.Region.Caches; +using OpenSim.Framework; using OpenSim.Framework.Console; -using OpenSim.Physics.Manager; -using Nwc.XmlRpc; +using OpenSim.Framework.Interfaces; using OpenSim.Framework.Servers; +using OpenSim.Framework.Types; +using OpenSim.Physics.Manager; +using OpenSim.Region.Caches; namespace OpenSim.Region.ClientStack { diff --git a/OpenSim/Region/ClientStack/UDPServer.cs b/OpenSim/Region/ClientStack/UDPServer.cs index 8ad5332..6eea524 100644 --- a/OpenSim/Region/ClientStack/UDPServer.cs +++ b/OpenSim/Region/ClientStack/UDPServer.cs @@ -26,26 +26,15 @@ * */ using System; -using System.Text; -using System.IO; -using System.Threading; +using System.Collections.Generic; using System.Net; using System.Net.Sockets; -using System.Timers; -using System.Reflection; -using System.Collections; -using System.Collections.Generic; -using libsecondlife; using libsecondlife.Packets; -using OpenSim.Region.Terrain; -using OpenSim.Framework.Interfaces; -using OpenSim.Framework.Types; using OpenSim.Assets; -using OpenSim.Region.Caches; -using OpenSim.Framework.Console; using OpenSim.Framework; -using Nwc.XmlRpc; -using OpenSim.Framework.Servers; +using OpenSim.Framework.Console; +using OpenSim.Framework.Interfaces; +using OpenSim.Region.Caches; namespace OpenSim.Region.ClientStack { -- cgit v1.1