aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs66
1 files changed, 33 insertions, 33 deletions
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
230 230
231 private RegionHandleRequest handlerRegionHandleRequest = null; // OnRegionHandleRequest 231 private RegionHandleRequest handlerRegionHandleRequest = null; // OnRegionHandleRequest
232 private ParcelInfoRequest handlerParcelInfoRequest = null; // OnParcelInfoRequest 232 private ParcelInfoRequest handlerParcelInfoRequest = null; // OnParcelInfoRequest
233 233
234 private ScriptAnswer handlerScriptAnswer = null; 234 private ScriptAnswer handlerScriptAnswer = null;
235 private RequestPayPrice handlerRequestPayPrice = null; 235 private RequestPayPrice handlerRequestPayPrice = null;
236 private ObjectDeselect handlerObjectDetach = null; 236 private ObjectDeselect handlerObjectDetach = null;
@@ -366,7 +366,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
366 366
367 public LLClientView(EndPoint remoteEP, IScene scene, AssetCache assetCache, LLPacketServer packServer, 367 public LLClientView(EndPoint remoteEP, IScene scene, AssetCache assetCache, LLPacketServer packServer,
368 AgentCircuitManager authenSessions, LLUUID agentId, LLUUID sessionId, uint circuitCode, EndPoint proxyEP) 368 AgentCircuitManager authenSessions, LLUUID agentId, LLUUID sessionId, uint circuitCode, EndPoint proxyEP)
369 { 369 {
370 m_moneyBalance = 1000; 370 m_moneyBalance = 1000;
371 371
372 m_channelVersion = Helpers.StringToField(scene.GetSimulatorVersion()); 372 m_channelVersion = Helpers.StringToField(scene.GetSimulatorVersion());
@@ -378,7 +378,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
378 378
379 m_networkServer = packServer; 379 m_networkServer = packServer;
380 // m_inventoryCache = inventoryCache; 380 // m_inventoryCache = inventoryCache;
381 m_authenticateSessionsHandler = authenSessions; 381 m_authenticateSessionsHandler = authenSessions;
382 382
383 m_agentId = agentId; 383 m_agentId = agentId;
384 m_sessionId = sessionId; 384 m_sessionId = sessionId;
@@ -404,8 +404,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
404 m_clientThread.IsBackground = true; 404 m_clientThread.IsBackground = true;
405 m_clientThread.Start(); 405 m_clientThread.Start();
406 ThreadTracker.Add(m_clientThread); 406 ThreadTracker.Add(m_clientThread);
407 407
408 m_log.Info("[CLIENT]: Started up new thread to handle client UDP session"); 408 m_log.Info("[CLIENT]: Started up new thread to handle client UDP session");
409 } 409 }
410 410
411 public void SetDebug(int newDebug) 411 public void SetDebug(int newDebug)
@@ -457,9 +457,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
457 public void Close(bool shutdownCircuit) 457 public void Close(bool shutdownCircuit)
458 { 458 {
459 m_log.DebugFormat( 459 m_log.DebugFormat(
460 "[CLIENT]: Close has been called with shutdownCircuit = {0} on scene {1}", 460 "[CLIENT]: Close has been called with shutdownCircuit = {0} on scene {1}",
461 shutdownCircuit, m_scene.RegionInfo.RegionName); 461 shutdownCircuit, m_scene.RegionInfo.RegionName);
462 462
463 m_PacketHandler.Flush(); 463 m_PacketHandler.Flush();
464 464
465 // raise an event on the packet server to Shutdown the circuit 465 // raise an event on the packet server to Shutdown the circuit
@@ -639,7 +639,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
639 # endregion 639 # endregion
640 640
641 protected int m_terrainCheckerCount = 0; 641 protected int m_terrainCheckerCount = 0;
642 642
643 /// <summary> 643 /// <summary>
644 /// Event handler for check client timer 644 /// Event handler for check client timer
645 /// Checks to ensure that the client is still connected. If the client has failed to respond to many pings 645 /// 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
652 if (m_PacketHandler.PacketsReceived == m_PacketHandler.PacketsReceivedReported) 652 if (m_PacketHandler.PacketsReceived == m_PacketHandler.PacketsReceivedReported)
653 { 653 {
654 m_probesWithNoIngressPackets++; 654 m_probesWithNoIngressPackets++;
655 if ((m_probesWithNoIngressPackets > 30 && !m_clientBlocked) 655 if ((m_probesWithNoIngressPackets > 30 && !m_clientBlocked)
656 || (m_probesWithNoIngressPackets > 90 && m_clientBlocked)) 656 || (m_probesWithNoIngressPackets > 90 && m_clientBlocked))
657 { 657 {
658 if (OnConnectionClosed != null) 658 if (OnConnectionClosed != null)
659 { 659 {
660 m_log.WarnFormat( 660 m_log.WarnFormat(
661 "[CLIENT]: Client for agent {0} {1} has stopped responding to pings. Closing connection", 661 "[CLIENT]: Client for agent {0} {1} has stopped responding to pings. Closing connection",
662 Name, AgentId); 662 Name, AgentId);
663 663
664 OnConnectionClosed(this); 664 OnConnectionClosed(this);
665 } 665 }
666 } 666 }
@@ -694,7 +694,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
694 m_clientPingTimer = new Timer(5000); 694 m_clientPingTimer = new Timer(5000);
695 m_clientPingTimer.Elapsed += new ElapsedEventHandler(CheckClientConnectivity); 695 m_clientPingTimer.Elapsed += new ElapsedEventHandler(CheckClientConnectivity);
696 m_clientPingTimer.Enabled = true; 696 m_clientPingTimer.Enabled = true;
697 697
698 m_scene.AddNewClient(this, true); 698 m_scene.AddNewClient(this, true);
699 } 699 }
700 700
@@ -764,7 +764,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
764 764
765 LLQueItem item = new LLQueItem(); 765 LLQueItem item = new LLQueItem();
766 item.Packet = packet; 766 item.Packet = packet;
767 767
768 m_PacketHandler.ProcessOutPacket(item); 768 m_PacketHandler.ProcessOutPacket(item);
769 769
770 // There may be a better way to do this. Perhaps kick? Not sure this propogates notifications to 770 // 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
1091 for (int y = 0; y < 16; y++) 1091 for (int y = 0; y < 16; y++)
1092 { 1092 {
1093 // For some terrains, sending more than one terrain patch at once results in a libsecondlife exception 1093 // For some terrains, sending more than one terrain patch at once results in a libsecondlife exception
1094 // see http://opensimulator.org/mantis/view.php?id=1662 1094 // see http://opensimulator.org/mantis/view.php?id=1662
1095 //for (int x = 0; x < 16; x += 4) 1095 //for (int x = 0; x < 16; x += 4)
1096 //{ 1096 //{
1097 // SendLayerPacket(map, y, x); 1097 // SendLayerPacket(map, y, x);
@@ -1113,7 +1113,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1113 /// <summary> 1113 /// <summary>
1114 /// Sends a set of four patches (x, x+1, ..., x+3) to the client 1114 /// Sends a set of four patches (x, x+1, ..., x+3) to the client
1115 /// </summary> 1115 /// </summary>
1116 /// <param name="map">heightmap</param> 1116 /// <param name="map">heightmap</param>
1117 /// <param name="px">X coordinate for patches 0..12</param> 1117 /// <param name="px">X coordinate for patches 0..12</param>
1118 /// <param name="py">Y coordinate for patches 0..15</param> 1118 /// <param name="py">Y coordinate for patches 0..15</param>
1119 // private void SendLayerPacket(float[] map, int y, int x) 1119 // private void SendLayerPacket(float[] map, int y, int x)
@@ -1147,7 +1147,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1147 1147
1148 LayerDataPacket layerpack = LLClientView.TerrainManager.CreateLandPacket(map, patches); 1148 LayerDataPacket layerpack = LLClientView.TerrainManager.CreateLandPacket(map, patches);
1149 layerpack.Header.Zerocoded = true; 1149 layerpack.Header.Zerocoded = true;
1150 1150
1151 OutPacket(layerpack, ThrottleOutPacketType.Land); 1151 OutPacket(layerpack, ThrottleOutPacketType.Land);
1152 } 1152 }
1153 catch (Exception e) 1153 catch (Exception e)
@@ -1157,7 +1157,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1157 } 1157 }
1158 1158
1159 /// <summary> 1159 /// <summary>
1160 /// Tell the client that the given neighbour region is ready to receive a child agent. 1160 /// Tell the client that the given neighbour region is ready to receive a child agent.
1161 /// </summary> 1161 /// </summary>
1162 /// <param name="neighbourHandle"></param> 1162 /// <param name="neighbourHandle"></param>
1163 /// <param name="neighbourIP"></param> 1163 /// <param name="neighbourIP"></param>
@@ -3405,7 +3405,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3405 } 3405 }
3406 3406
3407 /// <summary> 3407 /// <summary>
3408 /// 3408 ///
3409 /// </summary> 3409 /// </summary>
3410 /// <param name="client"></param> 3410 /// <param name="client"></param>
3411 /// <returns></returns> 3411 /// <returns></returns>
@@ -3682,7 +3682,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3682 3682
3683 /// <summary> 3683 /// <summary>
3684 /// returns a byte array of the client set throttles Gets multiplied by the multiplier 3684 /// returns a byte array of the client set throttles Gets multiplied by the multiplier
3685 /// 3685 ///
3686 /// </summary> 3686 /// </summary>
3687 /// <param name="multiplier">non 1 multiplier for subdividing the throttles between individual regions</param> 3687 /// <param name="multiplier">non 1 multiplier for subdividing the throttles between individual regions</param>
3688 /// <returns></returns> 3688 /// <returns></returns>
@@ -3691,7 +3691,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3691 return m_PacketHandler.PacketQueue.GetThrottlesPacked(multiplier); 3691 return m_PacketHandler.PacketQueue.GetThrottlesPacked(multiplier);
3692 } 3692 }
3693 /// <summary> 3693 /// <summary>
3694 /// sets the throttles from values supplied by the client 3694 /// sets the throttles from values supplied by the client
3695 /// </summary> 3695 /// </summary>
3696 /// <param name="throttles"></param> 3696 /// <param name="throttles"></param>
3697 public void SetChildAgentThrottle(byte[] throttles) 3697 public void SetChildAgentThrottle(byte[] throttles)
@@ -5291,24 +5291,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5291 5291
5292 case PacketType.RegionHandleRequest: 5292 case PacketType.RegionHandleRequest:
5293 RegionHandleRequestPacket rhrPack = (RegionHandleRequestPacket)Pack; 5293 RegionHandleRequestPacket rhrPack = (RegionHandleRequestPacket)Pack;
5294 5294
5295 handlerRegionHandleRequest = OnRegionHandleRequest; 5295 handlerRegionHandleRequest = OnRegionHandleRequest;
5296 if (handlerRegionHandleRequest != null) 5296 if (handlerRegionHandleRequest != null)
5297 { 5297 {
5298 handlerRegionHandleRequest(this, rhrPack.RequestBlock.RegionID); 5298 handlerRegionHandleRequest(this, rhrPack.RequestBlock.RegionID);
5299 } 5299 }
5300 break; 5300 break;
5301 5301
5302 case PacketType.ParcelInfoRequest: 5302 case PacketType.ParcelInfoRequest:
5303 ParcelInfoRequestPacket pirPack = (ParcelInfoRequestPacket)Pack; 5303 ParcelInfoRequestPacket pirPack = (ParcelInfoRequestPacket)Pack;
5304 5304
5305 handlerParcelInfoRequest = OnParcelInfoRequest; 5305 handlerParcelInfoRequest = OnParcelInfoRequest;
5306 if (handlerParcelInfoRequest != null) 5306 if (handlerParcelInfoRequest != null)
5307 { 5307 {
5308 handlerParcelInfoRequest(this, pirPack.Data.ParcelID); 5308 handlerParcelInfoRequest(this, pirPack.Data.ParcelID);
5309 } 5309 }
5310 break; 5310 break;
5311 5311
5312 case PacketType.ParcelAccessListRequest: 5312 case PacketType.ParcelAccessListRequest:
5313 ParcelAccessListRequestPacket requestPacket = (ParcelAccessListRequestPacket)Pack; 5313 ParcelAccessListRequestPacket requestPacket = (ParcelAccessListRequestPacket)Pack;
5314 5314
@@ -6277,10 +6277,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6277 } 6277 }
6278 6278
6279 #endregion 6279 #endregion
6280 6280
6281 6281
6282 #region Camera 6282 #region Camera
6283 6283
6284 public void SendSetFollowCamProperties (LLUUID objectID, SortedDictionary<int, float> parameters) 6284 public void SendSetFollowCamProperties (LLUUID objectID, SortedDictionary<int, float> parameters)
6285 { 6285 {
6286 SetFollowCamPropertiesPacket packet = (SetFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.SetFollowCamProperties); 6286 SetFollowCamPropertiesPacket packet = (SetFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.SetFollowCamProperties);
@@ -6292,7 +6292,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6292 SetFollowCamPropertiesPacket.CameraPropertyBlock block = new SetFollowCamPropertiesPacket.CameraPropertyBlock(); 6292 SetFollowCamPropertiesPacket.CameraPropertyBlock block = new SetFollowCamPropertiesPacket.CameraPropertyBlock();
6293 block.Type = pair.Key; 6293 block.Type = pair.Key;
6294 block.Value = pair.Value; 6294 block.Value = pair.Value;
6295 6295
6296 camPropBlock[idx++] = block; 6296 camPropBlock[idx++] = block;
6297 } 6297 }
6298 packet.CameraProperty = camPropBlock; 6298 packet.CameraProperty = camPropBlock;
@@ -6314,7 +6314,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6314 reply.ReplyBlock.RegionHandle = handle; 6314 reply.ReplyBlock.RegionHandle = handle;
6315 OutPacket(reply, ThrottleOutPacketType.Land); 6315 OutPacket(reply, ThrottleOutPacketType.Land);
6316 } 6316 }
6317 6317
6318 public void SendParcelInfo(RegionInfo info, LandData land, LLUUID parcelID, uint x, uint y) 6318 public void SendParcelInfo(RegionInfo info, LandData land, LLUUID parcelID, uint x, uint y)
6319 { 6319 {
6320 ParcelInfoReplyPacket reply = (ParcelInfoReplyPacket)PacketPool.Instance.GetPacket(PacketType.ParcelInfoReply); 6320 ParcelInfoReplyPacket reply = (ParcelInfoReplyPacket)PacketPool.Instance.GetPacket(PacketType.ParcelInfoReply);
@@ -6325,16 +6325,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6325 reply.Data.Desc = Helpers.StringToField(land.Description); 6325 reply.Data.Desc = Helpers.StringToField(land.Description);
6326 reply.Data.ActualArea = land.Area; 6326 reply.Data.ActualArea = land.Area;
6327 reply.Data.BillableArea = land.Area; // TODO: what is this? 6327 reply.Data.BillableArea = land.Area; // TODO: what is this?
6328 6328
6329 // Bit 0: Mature, bit 7: on sale, other bits: no idea 6329 // Bit 0: Mature, bit 7: on sale, other bits: no idea
6330 reply.Data.Flags = (byte)( 6330 reply.Data.Flags = (byte)(
6331 ((land.Flags & (uint)Parcel.ParcelFlags.MaturePublish) != 0 ? (1 << 0) : 0) + 6331 ((land.Flags & (uint)Parcel.ParcelFlags.MaturePublish) != 0 ? (1 << 0) : 0) +
6332 ((land.Flags & (uint)Parcel.ParcelFlags.ForSale) != 0 ? (1 << 7) : 0)); 6332 ((land.Flags & (uint)Parcel.ParcelFlags.ForSale) != 0 ? (1 << 7) : 0));
6333 6333
6334 LLVector3 pos = land.UserLocation; 6334 LLVector3 pos = land.UserLocation;
6335 if (pos.Equals(LLVector3.Zero)) 6335 if (pos.Equals(LLVector3.Zero))
6336 { 6336 {
6337 pos = (land.AABBMax + land.AABBMin) * 0.5f; 6337 pos = (land.AABBMax + land.AABBMin) * 0.5f;
6338 } 6338 }
6339 reply.Data.GlobalX = info.RegionLocX * Constants.RegionSize + x; 6339 reply.Data.GlobalX = info.RegionLocX * Constants.RegionSize + x;
6340 reply.Data.GlobalY = info.RegionLocY * Constants.RegionSize + y; 6340 reply.Data.GlobalY = info.RegionLocY * Constants.RegionSize + y;
@@ -6344,7 +6344,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6344 reply.Data.Dwell = 0; // TODO: not implemented yet 6344 reply.Data.Dwell = 0; // TODO: not implemented yet
6345 reply.Data.SalePrice = land.SalePrice; 6345 reply.Data.SalePrice = land.SalePrice;
6346 reply.Data.AuctionID = (int)land.AuctionID; 6346 reply.Data.AuctionID = (int)land.AuctionID;
6347 6347
6348 OutPacket(reply, ThrottleOutPacketType.Land); 6348 OutPacket(reply, ThrottleOutPacketType.Land);
6349 } 6349 }
6350 } 6350 }