From 6ef9d4da901a346c232458317cca6268da888e2e Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Mon, 18 Aug 2008 00:39:10 +0000 Subject: Formatting cleanup. --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 66 +++++++++++----------- .../ClientStack/LindenUDP/LLPacketHandler.cs | 14 ++--- .../Region/ClientStack/LindenUDP/LLUDPServer.cs | 18 +++--- 3 files changed, 49 insertions(+), 49 deletions(-) (limited to 'OpenSim/Region/ClientStack/LindenUDP') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index b14b3db..3c24fb6 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -230,7 +230,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP private RegionHandleRequest handlerRegionHandleRequest = null; // OnRegionHandleRequest private ParcelInfoRequest handlerParcelInfoRequest = null; // OnParcelInfoRequest - + private ScriptAnswer handlerScriptAnswer = null; private RequestPayPrice handlerRequestPayPrice = null; private ObjectDeselect handlerObjectDetach = null; @@ -366,7 +366,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP public LLClientView(EndPoint remoteEP, IScene scene, AssetCache assetCache, LLPacketServer packServer, AgentCircuitManager authenSessions, LLUUID agentId, LLUUID sessionId, uint circuitCode, EndPoint proxyEP) - { + { m_moneyBalance = 1000; m_channelVersion = Helpers.StringToField(scene.GetSimulatorVersion()); @@ -378,7 +378,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_networkServer = packServer; // m_inventoryCache = inventoryCache; - m_authenticateSessionsHandler = authenSessions; + m_authenticateSessionsHandler = authenSessions; m_agentId = agentId; m_sessionId = sessionId; @@ -404,8 +404,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_clientThread.IsBackground = true; m_clientThread.Start(); ThreadTracker.Add(m_clientThread); - - m_log.Info("[CLIENT]: Started up new thread to handle client UDP session"); + + m_log.Info("[CLIENT]: Started up new thread to handle client UDP session"); } public void SetDebug(int newDebug) @@ -457,9 +457,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP public void Close(bool shutdownCircuit) { m_log.DebugFormat( - "[CLIENT]: Close has been called with shutdownCircuit = {0} on scene {1}", + "[CLIENT]: Close has been called with shutdownCircuit = {0} on scene {1}", shutdownCircuit, m_scene.RegionInfo.RegionName); - + m_PacketHandler.Flush(); // raise an event on the packet server to Shutdown the circuit @@ -639,7 +639,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP # endregion protected int m_terrainCheckerCount = 0; - + /// /// Event handler for check client timer /// Checks to ensure that the client is still connected. If the client has failed to respond to many pings @@ -652,15 +652,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (m_PacketHandler.PacketsReceived == m_PacketHandler.PacketsReceivedReported) { m_probesWithNoIngressPackets++; - if ((m_probesWithNoIngressPackets > 30 && !m_clientBlocked) + if ((m_probesWithNoIngressPackets > 30 && !m_clientBlocked) || (m_probesWithNoIngressPackets > 90 && m_clientBlocked)) { if (OnConnectionClosed != null) { m_log.WarnFormat( - "[CLIENT]: Client for agent {0} {1} has stopped responding to pings. Closing connection", + "[CLIENT]: Client for agent {0} {1} has stopped responding to pings. Closing connection", Name, AgentId); - + OnConnectionClosed(this); } } @@ -694,7 +694,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_clientPingTimer = new Timer(5000); m_clientPingTimer.Elapsed += new ElapsedEventHandler(CheckClientConnectivity); m_clientPingTimer.Enabled = true; - + m_scene.AddNewClient(this, true); } @@ -764,7 +764,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP LLQueItem item = new LLQueItem(); item.Packet = packet; - + m_PacketHandler.ProcessOutPacket(item); // There may be a better way to do this. Perhaps kick? Not sure this propogates notifications to @@ -1091,7 +1091,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP for (int y = 0; y < 16; y++) { // For some terrains, sending more than one terrain patch at once results in a libsecondlife exception - // see http://opensimulator.org/mantis/view.php?id=1662 + // see http://opensimulator.org/mantis/view.php?id=1662 //for (int x = 0; x < 16; x += 4) //{ // SendLayerPacket(map, y, x); @@ -1113,7 +1113,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// /// Sends a set of four patches (x, x+1, ..., x+3) to the client /// - /// heightmap + /// heightmap /// X coordinate for patches 0..12 /// Y coordinate for patches 0..15 // private void SendLayerPacket(float[] map, int y, int x) @@ -1147,7 +1147,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP LayerDataPacket layerpack = LLClientView.TerrainManager.CreateLandPacket(map, patches); layerpack.Header.Zerocoded = true; - + OutPacket(layerpack, ThrottleOutPacketType.Land); } catch (Exception e) @@ -1157,7 +1157,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } /// - /// Tell the client that the given neighbour region is ready to receive a child agent. + /// Tell the client that the given neighbour region is ready to receive a child agent. /// /// /// @@ -3405,7 +3405,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } /// - /// + /// /// /// /// @@ -3682,7 +3682,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// /// returns a byte array of the client set throttles Gets multiplied by the multiplier - /// + /// /// /// non 1 multiplier for subdividing the throttles between individual regions /// @@ -3691,7 +3691,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP return m_PacketHandler.PacketQueue.GetThrottlesPacked(multiplier); } /// - /// sets the throttles from values supplied by the client + /// sets the throttles from values supplied by the client /// /// public void SetChildAgentThrottle(byte[] throttles) @@ -5291,24 +5291,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP case PacketType.RegionHandleRequest: RegionHandleRequestPacket rhrPack = (RegionHandleRequestPacket)Pack; - + handlerRegionHandleRequest = OnRegionHandleRequest; if (handlerRegionHandleRequest != null) { handlerRegionHandleRequest(this, rhrPack.RequestBlock.RegionID); } break; - + case PacketType.ParcelInfoRequest: ParcelInfoRequestPacket pirPack = (ParcelInfoRequestPacket)Pack; - + handlerParcelInfoRequest = OnParcelInfoRequest; if (handlerParcelInfoRequest != null) { handlerParcelInfoRequest(this, pirPack.Data.ParcelID); } break; - + case PacketType.ParcelAccessListRequest: ParcelAccessListRequestPacket requestPacket = (ParcelAccessListRequestPacket)Pack; @@ -6277,10 +6277,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP } #endregion - - + + #region Camera - + public void SendSetFollowCamProperties (LLUUID objectID, SortedDictionary parameters) { SetFollowCamPropertiesPacket packet = (SetFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.SetFollowCamProperties); @@ -6292,7 +6292,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP SetFollowCamPropertiesPacket.CameraPropertyBlock block = new SetFollowCamPropertiesPacket.CameraPropertyBlock(); block.Type = pair.Key; block.Value = pair.Value; - + camPropBlock[idx++] = block; } packet.CameraProperty = camPropBlock; @@ -6314,7 +6314,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP reply.ReplyBlock.RegionHandle = handle; OutPacket(reply, ThrottleOutPacketType.Land); } - + public void SendParcelInfo(RegionInfo info, LandData land, LLUUID parcelID, uint x, uint y) { ParcelInfoReplyPacket reply = (ParcelInfoReplyPacket)PacketPool.Instance.GetPacket(PacketType.ParcelInfoReply); @@ -6325,16 +6325,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP reply.Data.Desc = Helpers.StringToField(land.Description); reply.Data.ActualArea = land.Area; reply.Data.BillableArea = land.Area; // TODO: what is this? - + // Bit 0: Mature, bit 7: on sale, other bits: no idea reply.Data.Flags = (byte)( ((land.Flags & (uint)Parcel.ParcelFlags.MaturePublish) != 0 ? (1 << 0) : 0) + ((land.Flags & (uint)Parcel.ParcelFlags.ForSale) != 0 ? (1 << 7) : 0)); - + LLVector3 pos = land.UserLocation; if (pos.Equals(LLVector3.Zero)) { - pos = (land.AABBMax + land.AABBMin) * 0.5f; + pos = (land.AABBMax + land.AABBMin) * 0.5f; } reply.Data.GlobalX = info.RegionLocX * Constants.RegionSize + x; reply.Data.GlobalY = info.RegionLocY * Constants.RegionSize + y; @@ -6344,7 +6344,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP reply.Data.Dwell = 0; // TODO: not implemented yet reply.Data.SalePrice = land.SalePrice; reply.Data.AuctionID = (int)land.AuctionID; - + OutPacket(reply, ThrottleOutPacketType.Land); } } diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs index 8fe9a7b..8023f58 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs @@ -230,7 +230,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { // Call the load balancer's hook. If this is not active here // we defer to the sim server this client is actually connected - // to. Packet drop notifies will not be triggered in this + // to. Packet drop notifies will not be triggered in this // configuration! // if ((m_SynchronizeClient != null) && (!m_Client.IsActive)) @@ -282,7 +282,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } } - + private void QueuePacket( Packet packet, ThrottleOutPacketType throttlePacketType, Object id) @@ -303,7 +303,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { int now = System.Environment.TickCount; int lastAck = m_LastAck; - + // Unless we have received at least one ack, don't bother resending // anything. There may not be a client there, don't clog up the // pipes. @@ -558,7 +558,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP PruneDupeTracker(); - // Check for duplicate packets.. packets that the client is + // Check for duplicate packets.. packets that the client is // resending because it didn't receive our ack // lock (m_DupeTracker) @@ -677,7 +677,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_Sequence = info.sequence; } - + public void AddImportantPacket(PacketType type) { if (m_ImportantPackets.Contains(type)) @@ -693,7 +693,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_ImportantPackets.Remove(type); } - + private void DropResend(Object id) { foreach (AckData data in new List(m_NeedAck.Values)) @@ -736,7 +736,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (packet.Header.Reliable) { m_UnackedBytes += packet.ToBytes().Length; - m_NeedAck[packet.Header.Sequence] = new AckData(packet, + m_NeedAck[packet.Header.Sequence] = new AckData(packet, item.Identifier); } } diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 5903661..7c21df2 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs @@ -213,7 +213,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } BeginReceive(); - + if (packet != null) { try @@ -297,11 +297,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_socket.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); - // Ter: For some stupid reason ConnectionReset basically kills our async event structure.. + // Ter: For some stupid reason ConnectionReset basically kills our async event structure.. // so therefore.. we've got to tell the server to BeginReceiveFrom again. - // This will happen over and over until we've gone through all packets + // This will happen over and over until we've gone through all packets // sent to and from this particular user. - // Stupid I know.. + // Stupid I know.. // but Flusing the buffer would be even more stupid... so, we're stuck with this ugly method. } catch (SocketException e) @@ -329,7 +329,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { if (!(packet is UseCircuitCodePacket)) return; - + UseCircuitCodePacket useCircuit = (UseCircuitCodePacket) packet; lock (clientCircuits) { @@ -424,13 +424,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP public virtual void RemoveClientCircuit(uint circuitcode) { EndPoint sendto = null; - if (clientCircuits_reverse.Contains(circuitcode)) + if (clientCircuits_reverse.Contains(circuitcode)) { sendto = (EndPoint)clientCircuits_reverse[circuitcode]; clientCircuits_reverse.Remove(circuitcode); - - lock (clientCircuits) + + lock (clientCircuits) { if (sendto != null) { @@ -442,7 +442,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP "[UDPSERVER]: endpoint for circuit code {0} in RemoveClientCircuit() was unexpectedly null!", circuitcode); } } - lock (proxyCircuits) + lock (proxyCircuits) { proxyCircuits.Remove(circuitcode); } -- cgit v1.1