aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs232
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs30
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs12
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs32
4 files changed, 153 insertions, 153 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 1eab16b..d6329ce 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -57,14 +57,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
57 57
58 // ~ClientView() 58 // ~ClientView()
59 // { 59 // {
60 // m_log.Info("[CLIENTVIEW]: Destructor called"); 60 // m_log.Info("[CLIENTVIEW]: Destructor called");
61 // } 61 // }
62 62
63 /* static variables */ 63 /* static variables */
64 public static TerrainManager TerrainManager; 64 public static TerrainManager TerrainManager;
65 65
66 public delegate bool SynchronizeClientHandler(IScene scene, Packet packet, LLUUID agentID, ThrottleOutPacketType throttlePacketType); 66 public delegate bool SynchronizeClientHandler(IScene scene, Packet packet, LLUUID agentID, ThrottleOutPacketType throttlePacketType);
67 public static SynchronizeClientHandler SynchronizeClient = null; 67 public static SynchronizeClientHandler SynchronizeClient = null;
68 /* private variables */ 68 /* private variables */
69 private readonly LLUUID m_sessionId; 69 private readonly LLUUID m_sessionId;
70 private LLUUID m_secureSessionId = LLUUID.Zero; 70 private LLUUID m_secureSessionId = LLUUID.Zero;
@@ -201,7 +201,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
201 private RemoveInventoryFolder handlerRemoveInventoryFolder = null; 201 private RemoveInventoryFolder handlerRemoveInventoryFolder = null;
202 private RequestTaskInventory handlerRequestTaskInventory = null; //OnRequestTaskInventory; 202 private RequestTaskInventory handlerRequestTaskInventory = null; //OnRequestTaskInventory;
203 private UpdateTaskInventory handlerUpdateTaskInventory = null; //OnUpdateTaskInventory; 203 private UpdateTaskInventory handlerUpdateTaskInventory = null; //OnUpdateTaskInventory;
204 private MoveTaskInventory handlerMoveTaskItem = null; 204 private MoveTaskInventory handlerMoveTaskItem = null;
205 private RemoveTaskInventory handlerRemoveTaskItem = null; //OnRemoveTaskItem; 205 private RemoveTaskInventory handlerRemoveTaskItem = null; //OnRemoveTaskItem;
206 private RezScript handlerRezScript = null; //OnRezScript; 206 private RezScript handlerRezScript = null; //OnRezScript;
207 private RequestMapBlocks handlerRequestMapBlocks = null; //OnRequestMapBlocks; 207 private RequestMapBlocks handlerRequestMapBlocks = null; //OnRequestMapBlocks;
@@ -324,7 +324,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
324 /* METHODS */ 324 /* METHODS */
325 325
326 public LLClientView(EndPoint remoteEP, IScene scene, AssetCache assetCache, LLPacketServer packServer, 326 public LLClientView(EndPoint remoteEP, IScene scene, AssetCache assetCache, LLPacketServer packServer,
327 AgentCircuitManager authenSessions, LLUUID agentId, LLUUID sessionId, uint circuitCode, EndPoint proxyEP) 327 AgentCircuitManager authenSessions, LLUUID agentId, LLUUID sessionId, uint circuitCode, EndPoint proxyEP)
328 { 328 {
329 m_moneyBalance = 1000; 329 m_moneyBalance = 1000;
330 330
@@ -348,12 +348,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
348 348
349 m_userEndPoint = remoteEP; 349 m_userEndPoint = remoteEP;
350 m_proxyEndPoint = proxyEP; 350 m_proxyEndPoint = proxyEP;
351 351
352 m_startpos = m_authenticateSessionsHandler.GetPosition(circuitCode); 352 m_startpos = m_authenticateSessionsHandler.GetPosition(circuitCode);
353 353
354 // While working on this, the BlockingQueue had me fooled for a bit. 354 // While working on this, the BlockingQueue had me fooled for a bit.
355 // The Blocking queue causes the thread to stop until there's something 355 // The Blocking queue causes the thread to stop until there's something
356 // in it to process. It's an on-purpose threadlock though because 356 // in it to process. It's an on-purpose threadlock though because
357 // without it, the clientloop will suck up all sim resources. 357 // without it, the clientloop will suck up all sim resources.
358 358
359 m_packetQueue = new LLPacketQueue(agentId); 359 m_packetQueue = new LLPacketQueue(agentId);
@@ -379,9 +379,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
379 m_scene.RemoveClient(AgentId); 379 m_scene.RemoveClient(AgentId);
380 380
381 //m_log.InfoFormat("[CLIENTVIEW] Memory pre GC {0}", System.GC.GetTotalMemory(false)); 381 //m_log.InfoFormat("[CLIENTVIEW] Memory pre GC {0}", System.GC.GetTotalMemory(false));
382 //m_log.InfoFormat("[CLIENTVIEW] Memory post GC {0}", System.GC.GetTotalMemory(true)); 382 //m_log.InfoFormat("[CLIENTVIEW] Memory post GC {0}", System.GC.GetTotalMemory(true));
383 383
384 // Send the STOP packet 384 // Send the STOP packet
385 DisableSimulatorPacket disable = (DisableSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.DisableSimulator); 385 DisableSimulatorPacket disable = (DisableSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.DisableSimulator);
386 OutPacket(disable, ThrottleOutPacketType.Unknown); 386 OutPacket(disable, ThrottleOutPacketType.Unknown);
387 387
@@ -398,12 +398,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
398 // flushing out all it's packets. There should probably 398 // flushing out all it's packets. There should probably
399 // be a better mechanism here 399 // be a better mechanism here
400 400
401 // We can't reach into other scenes and close the connection 401 // We can't reach into other scenes and close the connection
402 // We need to do this over grid communications 402 // We need to do this over grid communications
403 //m_scene.CloseAllAgents(CircuitCode); 403 //m_scene.CloseAllAgents(CircuitCode);
404 404
405 // If we're not shutting down the circuit, then this is the last time we'll go here. 405 // If we're not shutting down the circuit, then this is the last time we'll go here.
406 // If we are shutting down the circuit, the UDP Server will come back here with 406 // If we are shutting down the circuit, the UDP Server will come back here with
407 // ShutDownCircuit = false 407 // ShutDownCircuit = false
408 if (!(shutdownCircuit)) 408 if (!(shutdownCircuit))
409 { 409 {
@@ -641,7 +641,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
641 { 641 {
642 //this.UploadAssets = new AgentAssetUpload(this, m_assetCache, m_inventoryCache); 642 //this.UploadAssets = new AgentAssetUpload(this, m_assetCache, m_inventoryCache);
643 643
644 // Establish our two timers. We could probably get this down to one 644 // Establish our two timers. We could probably get this down to one
645 m_ackTimer = new Timer(750); 645 m_ackTimer = new Timer(750);
646 m_ackTimer.Elapsed += new ElapsedEventHandler(AckTimer_Elapsed); 646 m_ackTimer.Elapsed += new ElapsedEventHandler(AckTimer_Elapsed);
647 m_ackTimer.Start(); 647 m_ackTimer.Start();
@@ -791,7 +791,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
791 public event ParcelJoinRequest OnParcelJoinRequest; 791 public event ParcelJoinRequest OnParcelJoinRequest;
792 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; 792 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
793 public event ParcelSelectObjects OnParcelSelectObjects; 793 public event ParcelSelectObjects OnParcelSelectObjects;
794 public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; 794 public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
795 public event ParcelAbandonRequest OnParcelAbandonRequest; 795 public event ParcelAbandonRequest OnParcelAbandonRequest;
796 public event RegionInfoRequest OnRegionInfoRequest; 796 public event RegionInfoRequest OnRegionInfoRequest;
797 public event EstateCovenantRequest OnEstateCovenantRequest; 797 public event EstateCovenantRequest OnEstateCovenantRequest;
@@ -834,7 +834,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
834 #region Scene/Avatar to Client 834 #region Scene/Avatar to Client
835 835
836 /// <summary> 836 /// <summary>
837 /// 837 ///
838 /// </summary> 838 /// </summary>
839 /// <param name="regionInfo"></param> 839 /// <param name="regionInfo"></param>
840 public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) 840 public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args)
@@ -871,7 +871,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
871 } 871 }
872 872
873 /// <summary> 873 /// <summary>
874 /// 874 ///
875 /// </summary> 875 /// </summary>
876 /// <param name="regInfo"></param> 876 /// <param name="regInfo"></param>
877 public void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look) 877 public void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look)
@@ -898,7 +898,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
898 } 898 }
899 899
900 /// <summary> 900 /// <summary>
901 /// 901 ///
902 /// </summary> 902 /// </summary>
903 /// <param name="message"></param> 903 /// <param name="message"></param>
904 /// <param name="type"></param> 904 /// <param name="type"></param>
@@ -934,17 +934,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
934 LLUUID imSessionID, string fromName, byte dialog, uint timeStamp) 934 LLUUID imSessionID, string fromName, byte dialog, uint timeStamp)
935 { 935 {
936 SendInstantMessage( 936 SendInstantMessage(
937 fromAgent, fromAgentSession, message, toAgent, 937 fromAgent, fromAgentSession, message, toAgent,
938 imSessionID, fromName, dialog, timeStamp, new byte[0]); 938 imSessionID, fromName, dialog, timeStamp, new byte[0]);
939 } 939 }
940 940
941 /// <summary> 941 /// <summary>
942 /// Send an instant message to this client 942 /// Send an instant message to this client
943 /// </summary> 943 /// </summary>
944 /// <param name="message"></param> 944 /// <param name="message"></param>
945 /// <param name="target"></param> 945 /// <param name="target"></param>
946 public void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, 946 public void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent,
947 LLUUID imSessionID, string fromName, byte dialog, uint timeStamp, 947 LLUUID imSessionID, string fromName, byte dialog, uint timeStamp,
948 byte[] binaryBucket) 948 byte[] binaryBucket)
949 { 949 {
950 if (((Scene)(this.m_scene)).ExternalChecks.ExternalChecksCanInstantMessage(fromAgent, toAgent)) 950 if (((Scene)(this.m_scene)).ExternalChecks.ExternalChecksCanInstantMessage(fromAgent, toAgent))
@@ -1031,7 +1031,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1031 } 1031 }
1032 1032
1033 /// <summary> 1033 /// <summary>
1034 /// 1034 ///
1035 /// </summary> 1035 /// </summary>
1036 /// <param name="neighbourHandle"></param> 1036 /// <param name="neighbourHandle"></param>
1037 /// <param name="neighbourIP"></param> 1037 /// <param name="neighbourIP"></param>
@@ -1056,7 +1056,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1056 } 1056 }
1057 1057
1058 /// <summary> 1058 /// <summary>
1059 /// 1059 ///
1060 /// </summary> 1060 /// </summary>
1061 /// <returns></returns> 1061 /// <returns></returns>
1062 public AgentCircuitData RequestClientInfo() 1062 public AgentCircuitData RequestClientInfo()
@@ -1166,7 +1166,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1166 } 1166 }
1167 1167
1168 /// <summary> 1168 /// <summary>
1169 /// 1169 ///
1170 /// </summary> 1170 /// </summary>
1171 public void SendTeleportFailed(string reason) 1171 public void SendTeleportFailed(string reason)
1172 { 1172 {
@@ -1179,7 +1179,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1179 } 1179 }
1180 1180
1181 /// <summary> 1181 /// <summary>
1182 /// 1182 ///
1183 /// </summary> 1183 /// </summary>
1184 public void SendTeleportLocationStart() 1184 public void SendTeleportLocationStart()
1185 { 1185 {
@@ -1250,7 +1250,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1250 1250
1251 /// <summary> 1251 /// <summary>
1252 /// Send information about the items contained in a folder to the client. 1252 /// Send information about the items contained in a folder to the client.
1253 /// 1253 ///
1254 /// XXX This method needs some refactoring loving 1254 /// XXX This method needs some refactoring loving
1255 /// </summary> 1255 /// </summary>
1256 /// <param name="ownerID">The owner of the folder</param> 1256 /// <param name="ownerID">The owner of the folder</param>
@@ -1261,8 +1261,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1261 public void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items, 1261 public void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items,
1262 List<InventoryFolderBase> folders, 1262 List<InventoryFolderBase> folders,
1263 bool fetchFolders, bool fetchItems) 1263 bool fetchFolders, bool fetchItems)
1264 { 1264 {
1265 // An inventory descendents packet consists of a single agent section and an inventory details 1265 // An inventory descendents packet consists of a single agent section and an inventory details
1266 // section for each inventory item. The size of each inventory item is approximately 550 bytes. 1266 // section for each inventory item. The size of each inventory item is approximately 550 bytes.
1267 // In theory, UDP has a maximum packet size of 64k, so it should be possible to send descendent 1267 // In theory, UDP has a maximum packet size of 64k, so it should be possible to send descendent
1268 // packets containing metadata for in excess of 100 items. But in practice, there may be other 1268 // packets containing metadata for in excess of 100 items. But in practice, there may be other
@@ -1367,7 +1367,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1367 1367
1368 if (i < MAX_ITEMS_PER_PACKET) 1368 if (i < MAX_ITEMS_PER_PACKET)
1369 { 1369 {
1370 1370
1371 OutPacket(descend, ThrottleOutPacketType.Asset); 1371 OutPacket(descend, ThrottleOutPacketType.Asset);
1372 } 1372 }
1373 } 1373 }
@@ -1376,7 +1376,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1376 if (fetchFolders) 1376 if (fetchFolders)
1377 { 1377 {
1378 InventoryDescendentsPacket descend = CreateInventoryDescendentsPacket(ownerID, folderID); 1378 InventoryDescendentsPacket descend = CreateInventoryDescendentsPacket(ownerID, folderID);
1379 1379
1380 if (folders.Count < MAX_ITEMS_PER_PACKET) 1380 if (folders.Count < MAX_ITEMS_PER_PACKET)
1381 { 1381 {
1382 descend.FolderData = new InventoryDescendentsPacket.FolderDataBlock[folders.Count]; 1382 descend.FolderData = new InventoryDescendentsPacket.FolderDataBlock[folders.Count];
@@ -1493,27 +1493,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1493 inventoryReply.Header.Zerocoded = true; 1493 inventoryReply.Header.Zerocoded = true;
1494 OutPacket(inventoryReply, ThrottleOutPacketType.Asset); 1494 OutPacket(inventoryReply, ThrottleOutPacketType.Asset);
1495 } 1495 }
1496 1496
1497 /// <see>IClientAPI.SendBulkUpdateInventory(InventoryItemBase)</see> 1497 /// <see>IClientAPI.SendBulkUpdateInventory(InventoryItemBase)</see>
1498 public void SendBulkUpdateInventory(InventoryItemBase item) 1498 public void SendBulkUpdateInventory(InventoryItemBase item)
1499 { 1499 {
1500 uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All; 1500 uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All;
1501 1501
1502 BulkUpdateInventoryPacket bulkUpdate 1502 BulkUpdateInventoryPacket bulkUpdate
1503 = (BulkUpdateInventoryPacket)PacketPool.Instance.GetPacket(PacketType.BulkUpdateInventory); 1503 = (BulkUpdateInventoryPacket)PacketPool.Instance.GetPacket(PacketType.BulkUpdateInventory);
1504 1504
1505 bulkUpdate.AgentData.AgentID = AgentId; 1505 bulkUpdate.AgentData.AgentID = AgentId;
1506 bulkUpdate.AgentData.TransactionID = LLUUID.Random(); 1506 bulkUpdate.AgentData.TransactionID = LLUUID.Random();
1507 1507
1508 bulkUpdate.FolderData = new BulkUpdateInventoryPacket.FolderDataBlock[1]; 1508 bulkUpdate.FolderData = new BulkUpdateInventoryPacket.FolderDataBlock[1];
1509 bulkUpdate.FolderData[0] = new BulkUpdateInventoryPacket.FolderDataBlock(); 1509 bulkUpdate.FolderData[0] = new BulkUpdateInventoryPacket.FolderDataBlock();
1510 bulkUpdate.FolderData[0].FolderID = LLUUID.Zero; 1510 bulkUpdate.FolderData[0].FolderID = LLUUID.Zero;
1511 bulkUpdate.FolderData[0].ParentID = LLUUID.Zero; 1511 bulkUpdate.FolderData[0].ParentID = LLUUID.Zero;
1512 bulkUpdate.FolderData[0].Type = -1; 1512 bulkUpdate.FolderData[0].Type = -1;
1513 bulkUpdate.FolderData[0].Name = new byte[0]; 1513 bulkUpdate.FolderData[0].Name = new byte[0];
1514 1514
1515 bulkUpdate.ItemData = new BulkUpdateInventoryPacket.ItemDataBlock[1]; 1515 bulkUpdate.ItemData = new BulkUpdateInventoryPacket.ItemDataBlock[1];
1516 bulkUpdate.ItemData[0] = new BulkUpdateInventoryPacket.ItemDataBlock(); 1516 bulkUpdate.ItemData[0] = new BulkUpdateInventoryPacket.ItemDataBlock();
1517 bulkUpdate.ItemData[0].ItemID = item.ID; 1517 bulkUpdate.ItemData[0].ItemID = item.ID;
1518 bulkUpdate.ItemData[0].AssetID = item.AssetID; 1518 bulkUpdate.ItemData[0].AssetID = item.AssetID;
1519 bulkUpdate.ItemData[0].CreatorID = item.Creator; 1519 bulkUpdate.ItemData[0].CreatorID = item.Creator;
@@ -1553,11 +1553,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1553 public void SendInventoryItemCreateUpdate(InventoryItemBase Item) 1553 public void SendInventoryItemCreateUpdate(InventoryItemBase Item)
1554 { 1554 {
1555 uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All; 1555 uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All;
1556 1556
1557 UpdateCreateInventoryItemPacket InventoryReply 1557 UpdateCreateInventoryItemPacket InventoryReply
1558 = (UpdateCreateInventoryItemPacket)PacketPool.Instance.GetPacket( 1558 = (UpdateCreateInventoryItemPacket)PacketPool.Instance.GetPacket(
1559 PacketType.UpdateCreateInventoryItem); 1559 PacketType.UpdateCreateInventoryItem);
1560 1560
1561 // TODO: don't create new blocks if recycling an old packet 1561 // TODO: don't create new blocks if recycling an old packet
1562 InventoryReply.AgentData.AgentID = AgentId; 1562 InventoryReply.AgentData.AgentID = AgentId;
1563 InventoryReply.AgentData.SimApproved = true; 1563 InventoryReply.AgentData.SimApproved = true;
@@ -1719,7 +1719,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1719 /// </summary> 1719 /// </summary>
1720 /// <param name="message"></param> 1720 /// <param name="message"></param>
1721 /// <param name="modal">On the linden client, if this true then it displays a one button text box placed in the 1721 /// <param name="modal">On the linden client, if this true then it displays a one button text box placed in the
1722 /// middle of the window. If false, the message is displayed in a brief duration blue information box (as for 1722 /// middle of the window. If false, the message is displayed in a brief duration blue information box (as for
1723 /// the AlertMessage packet).</param> 1723 /// the AlertMessage packet).</param>
1724 public void SendAgentAlertMessage(string message, bool modal) 1724 public void SendAgentAlertMessage(string message, bool modal)
1725 { 1725 {
@@ -1784,7 +1784,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1784 sound.DataBlock.OwnerID = ownerID; 1784 sound.DataBlock.OwnerID = ownerID;
1785 sound.DataBlock.Gain = gain; 1785 sound.DataBlock.Gain = gain;
1786 sound.DataBlock.Flags = flags; 1786 sound.DataBlock.Flags = flags;
1787 1787
1788 OutPacket(sound, ThrottleOutPacketType.Task); 1788 OutPacket(sound, ThrottleOutPacketType.Task);
1789 } 1789 }
1790 1790
@@ -1907,7 +1907,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1907 #region Appearance/ Wearables Methods 1907 #region Appearance/ Wearables Methods
1908 1908
1909 /// <summary> 1909 /// <summary>
1910 /// 1910 ///
1911 /// </summary> 1911 /// </summary>
1912 /// <param name="wearables"></param> 1912 /// <param name="wearables"></param>
1913 public void SendWearables(AvatarWearable[] wearables, int serial) 1913 public void SendWearables(AvatarWearable[] wearables, int serial)
@@ -1933,7 +1933,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1933 } 1933 }
1934 1934
1935 /// <summary> 1935 /// <summary>
1936 /// 1936 ///
1937 /// </summary> 1937 /// </summary>
1938 /// <param name="agentID"></param> 1938 /// <param name="agentID"></param>
1939 /// <param name="visualParams"></param> 1939 /// <param name="visualParams"></param>
@@ -2016,7 +2016,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2016 } 2016 }
2017 2017
2018 /// <summary> 2018 /// <summary>
2019 /// 2019 ///
2020 /// </summary> 2020 /// </summary>
2021 /// <param name="regionHandle"></param> 2021 /// <param name="regionHandle"></param>
2022 /// <param name="timeDilation"></param> 2022 /// <param name="timeDilation"></param>
@@ -2071,14 +2071,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2071 #region Primitive Packet/data Sending Methods 2071 #region Primitive Packet/data Sending Methods
2072 2072
2073 /// <summary> 2073 /// <summary>
2074 /// 2074 ///
2075 /// </summary> 2075 /// </summary>
2076 /// <param name="localID"></param> 2076 /// <param name="localID"></param>
2077 /// <param name="rotation"></param> 2077 /// <param name="rotation"></param>
2078 /// <param name="attachPoint"></param> 2078 /// <param name="attachPoint"></param>
2079 public void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint) 2079 public void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint)
2080 { 2080 {
2081 2081
2082 ObjectAttachPacket attach = (ObjectAttachPacket)PacketPool.Instance.GetPacket(PacketType.ObjectAttach); 2082 ObjectAttachPacket attach = (ObjectAttachPacket)PacketPool.Instance.GetPacket(PacketType.ObjectAttach);
2083 Console.WriteLine("Attach object!"); 2083 Console.WriteLine("Attach object!");
2084 // TODO: don't create new blocks if recycling an old packet 2084 // TODO: don't create new blocks if recycling an old packet
@@ -2094,9 +2094,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2094 } 2094 }
2095 2095
2096 public void SendPrimitiveToClient( 2096 public void SendPrimitiveToClient(
2097 ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, 2097 ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
2098 LLVector3 pos, LLVector3 vel, LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, 2098 LLVector3 pos, LLVector3 vel, LLVector3 acc, LLQuaternion rotation, LLVector3 rvel,
2099 uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color, 2099 uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color,
2100 uint parentID, byte[] particleSystem, byte clickAction) 2100 uint parentID, byte[] particleSystem, byte clickAction)
2101 { 2101 {
2102 byte[] textureanim = new byte[0]; 2102 byte[] textureanim = new byte[0];
@@ -2108,7 +2108,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2108 } 2108 }
2109 2109
2110 public void SendPrimitiveToClient( 2110 public void SendPrimitiveToClient(
2111 ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, 2111 ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
2112 LLVector3 pos, LLVector3 velocity, LLVector3 acceleration, LLQuaternion rotation, LLVector3 rotational_velocity, 2112 LLVector3 pos, LLVector3 velocity, LLVector3 acceleration, LLQuaternion rotation, LLVector3 rotational_velocity,
2113 uint flags, 2113 uint flags,
2114 LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, 2114 LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem,
@@ -2125,15 +2125,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2125 outPacket.ObjectData[0].ID = localID; 2125 outPacket.ObjectData[0].ID = localID;
2126 outPacket.ObjectData[0].FullID = objectID; 2126 outPacket.ObjectData[0].FullID = objectID;
2127 outPacket.ObjectData[0].OwnerID = ownerID; 2127 outPacket.ObjectData[0].OwnerID = ownerID;
2128 2128
2129 // Anything more than 255 will cause libsecondlife to barf 2129 // Anything more than 255 will cause libsecondlife to barf
2130 if (text.Length > 255) 2130 if (text.Length > 255)
2131 { 2131 {
2132 text = text.Remove(255); 2132 text = text.Remove(255);
2133 } 2133 }
2134 2134
2135 outPacket.ObjectData[0].Text = Helpers.StringToField(text); 2135 outPacket.ObjectData[0].Text = Helpers.StringToField(text);
2136 2136
2137 outPacket.ObjectData[0].TextColor[0] = color[0]; 2137 outPacket.ObjectData[0].TextColor[0] = color[0];
2138 outPacket.ObjectData[0].TextColor[1] = color[1]; 2138 outPacket.ObjectData[0].TextColor[1] = color[1];
2139 outPacket.ObjectData[0].TextColor[2] = color[2]; 2139 outPacket.ObjectData[0].TextColor[2] = color[2];
@@ -2148,7 +2148,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2148 // Necessary??? 2148 // Necessary???
2149 outPacket.ObjectData[0].JointAxisOrAnchor = new LLVector3(0, 0, 2); 2149 outPacket.ObjectData[0].JointAxisOrAnchor = new LLVector3(0, 0, 2);
2150 outPacket.ObjectData[0].JointPivot = new LLVector3(0, 0, 0); 2150 outPacket.ObjectData[0].JointPivot = new LLVector3(0, 0, 0);
2151 2151
2152 // Item from inventory??? 2152 // Item from inventory???
2153 outPacket.ObjectData[0].NameValue = 2153 outPacket.ObjectData[0].NameValue =
2154 Helpers.StringToField("AttachItemID STRING RW SV " + AssetId.UUID); 2154 Helpers.StringToField("AttachItemID STRING RW SV " + AssetId.UUID);
@@ -2179,7 +2179,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2179 } 2179 }
2180 2180
2181 /// <summary> 2181 /// <summary>
2182 /// 2182 ///
2183 /// </summary> 2183 /// </summary>
2184 /// <param name="regionHandle"></param> 2184 /// <param name="regionHandle"></param>
2185 /// <param name="timeDilation"></param> 2185 /// <param name="timeDilation"></param>
@@ -2194,7 +2194,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2194 terse.RegionData.RegionHandle = regionHandle; 2194 terse.RegionData.RegionHandle = regionHandle;
2195 terse.RegionData.TimeDilation = timeDilation; 2195 terse.RegionData.TimeDilation = timeDilation;
2196 terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; 2196 terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1];
2197 terse.ObjectData[0] = CreatePrimImprovedBlock(localID, position, rotation, velocity, rotationalvelocity, state); // AssetID should fall into here probably somehow... 2197 terse.ObjectData[0] = CreatePrimImprovedBlock(localID, position, rotation, velocity, rotationalvelocity, state); // AssetID should fall into here probably somehow...
2198 terse.Header.Reliable = false; 2198 terse.Header.Reliable = false;
2199 terse.Header.Zerocoded = true; 2199 terse.Header.Zerocoded = true;
2200 OutPacket(terse, ThrottleOutPacketType.Task); 2200 OutPacket(terse, ThrottleOutPacketType.Task);
@@ -2251,7 +2251,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2251 2251
2252 if (ImageSize > 0) 2252 if (ImageSize > 0)
2253 im.ImageID.Size = ImageSize; 2253 im.ImageID.Size = ImageSize;
2254 2254
2255 im.ImageData.Data = ImageData; 2255 im.ImageData.Data = ImageData;
2256 im.ImageID.Codec = imageCodec; 2256 im.ImageID.Codec = imageCodec;
2257 im.Header.Zerocoded = true; 2257 im.Header.Zerocoded = true;
@@ -2270,7 +2270,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2270 2270
2271 public void SendObjectPropertiesFamilyData(uint RequestFlags, LLUUID ObjectUUID, LLUUID OwnerID, LLUUID GroupID, 2271 public void SendObjectPropertiesFamilyData(uint RequestFlags, LLUUID ObjectUUID, LLUUID OwnerID, LLUUID GroupID,
2272 uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask, 2272 uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask,
2273 uint NextOwnerMask, int OwnershipCost, byte SaleType,int SalePrice, uint Category, 2273 uint NextOwnerMask, int OwnershipCost, byte SaleType,int SalePrice, uint Category,
2274 LLUUID LastOwnerID, string ObjectName, string Description) 2274 LLUUID LastOwnerID, string ObjectName, string Description)
2275 { 2275 {
2276 ObjectPropertiesFamilyPacket objPropFamilyPack = (ObjectPropertiesFamilyPacket)PacketPool.Instance.GetPacket(PacketType.ObjectPropertiesFamily); 2276 ObjectPropertiesFamilyPacket objPropFamilyPack = (ObjectPropertiesFamilyPacket)PacketPool.Instance.GetPacket(PacketType.ObjectPropertiesFamily);
@@ -2301,9 +2301,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2301 } 2301 }
2302 2302
2303 public void SendObjectPropertiesReply(LLUUID ItemID, ulong CreationDate, LLUUID CreatorUUID, LLUUID FolderUUID, LLUUID FromTaskUUID, 2303 public void SendObjectPropertiesReply(LLUUID ItemID, ulong CreationDate, LLUUID CreatorUUID, LLUUID FolderUUID, LLUUID FromTaskUUID,
2304 LLUUID GroupUUID, short InventorySerial, LLUUID LastOwnerUUID, LLUUID ObjectUUID, 2304 LLUUID GroupUUID, short InventorySerial, LLUUID LastOwnerUUID, LLUUID ObjectUUID,
2305 LLUUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName, 2305 LLUUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName,
2306 string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask, 2306 string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask,
2307 uint BaseMask) 2307 uint BaseMask)
2308 { 2308 {
2309 ObjectPropertiesPacket proper = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties); 2309 ObjectPropertiesPacket proper = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties);
@@ -2409,7 +2409,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2409 rinfoblk.WaterHeight = args.waterHeight; 2409 rinfoblk.WaterHeight = args.waterHeight;
2410 rinfoblk.SimName = Helpers.StringToField(args.simName); 2410 rinfoblk.SimName = Helpers.StringToField(args.simName);
2411 2411
2412 2412
2413 rinfopack.RegionInfo = rinfoblk; 2413 rinfopack.RegionInfo = rinfoblk;
2414 2414
2415 this.OutPacket(rinfopack, ThrottleOutPacketType.Task); 2415 this.OutPacket(rinfopack, ThrottleOutPacketType.Task);
@@ -2638,7 +2638,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2638 notifyCount = 32; 2638 notifyCount = 32;
2639 } 2639 }
2640 2640
2641 2641
2642 2642
2643 ParcelObjectOwnersReplyPacket.DataBlock[] dataBlock 2643 ParcelObjectOwnersReplyPacket.DataBlock[] dataBlock
2644 = new ParcelObjectOwnersReplyPacket.DataBlock[notifyCount]; 2644 = new ParcelObjectOwnersReplyPacket.DataBlock[notifyCount];
@@ -2758,7 +2758,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2758 } 2758 }
2759 2759
2760 /// <summary> 2760 /// <summary>
2761 /// 2761 ///
2762 /// </summary> 2762 /// </summary>
2763 /// <param name="localID"></param> 2763 /// <param name="localID"></param>
2764 /// <param name="position"></param> 2764 /// <param name="position"></param>
@@ -2852,8 +2852,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2852 bytes[i++] = (byte)(rvelz % 256); 2852 bytes[i++] = (byte)(rvelz % 256);
2853 bytes[i++] = (byte)((rvelz >> 8) % 256); 2853 bytes[i++] = (byte)((rvelz >> 8) % 256);
2854 dat.Data = bytes; 2854 dat.Data = bytes;
2855 2855
2856 2856
2857 return dat; 2857 return dat;
2858 } 2858 }
2859 2859
@@ -2931,7 +2931,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2931 2931
2932 2932
2933 /// <summary> 2933 /// <summary>
2934 /// 2934 ///
2935 /// </summary> 2935 /// </summary>
2936 /// <returns></returns> 2936 /// <returns></returns>
2937 public ObjectUpdatePacket.ObjectDataBlock CreateDefaultAvatarPacket(byte[] textureEntry) 2937 public ObjectUpdatePacket.ObjectDataBlock CreateDefaultAvatarPacket(byte[] textureEntry)
@@ -2966,7 +2966,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2966 } 2966 }
2967 2967
2968 /// <summary> 2968 /// <summary>
2969 /// 2969 ///
2970 /// </summary> 2970 /// </summary>
2971 /// <param name="objdata"></param> 2971 /// <param name="objdata"></param>
2972 protected void SetDefaultAvatarPacketValues(ref ObjectUpdatePacket.ObjectDataBlock objdata) 2972 protected void SetDefaultAvatarPacketValues(ref ObjectUpdatePacket.ObjectDataBlock objdata)
@@ -3093,7 +3093,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3093 3093
3094 return true; 3094 return true;
3095 } 3095 }
3096 3096
3097 public void SendScriptQuestion(LLUUID taskID, string taskName, string ownerName, LLUUID itemID, int question) 3097 public void SendScriptQuestion(LLUUID taskID, string taskName, string ownerName, LLUUID itemID, int question)
3098 { 3098 {
3099 ScriptQuestionPacket scriptQuestion = (ScriptQuestionPacket)PacketPool.Instance.GetPacket(PacketType.ScriptQuestion); 3099 ScriptQuestionPacket scriptQuestion = (ScriptQuestionPacket)PacketPool.Instance.GetPacket(PacketType.ScriptQuestion);
@@ -3136,7 +3136,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3136 /// <summary> 3136 /// <summary>
3137 /// Send a response back to a client when it asks the asset server (via the region server) if it has 3137 /// Send a response back to a client when it asks the asset server (via the region server) if it has
3138 /// its appearance texture cached. 3138 /// its appearance texture cached.
3139 /// 3139 ///
3140 /// At the moment, we always reply that there is no cached texture. 3140 /// At the moment, we always reply that there is no cached texture.
3141 /// </summary> 3141 /// </summary>
3142 /// <param name="simclient"></param> 3142 /// <param name="simclient"></param>
@@ -3154,7 +3154,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3154 m_cachedTextureSerial++; 3154 m_cachedTextureSerial++;
3155 cachedresp.WearableData = 3155 cachedresp.WearableData =
3156 new AgentCachedTextureResponsePacket.WearableDataBlock[cachedtex.WearableData.Length]; 3156 new AgentCachedTextureResponsePacket.WearableDataBlock[cachedtex.WearableData.Length];
3157 3157
3158 for (int i = 0; i < cachedtex.WearableData.Length; i++) 3158 for (int i = 0; i < cachedtex.WearableData.Length; i++)
3159 { 3159 {
3160 cachedresp.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock(); 3160 cachedresp.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock();
@@ -3162,8 +3162,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3162 cachedresp.WearableData[i].TextureID = LLUUID.Zero; 3162 cachedresp.WearableData[i].TextureID = LLUUID.Zero;
3163 cachedresp.WearableData[i].HostName = new byte[0]; 3163 cachedresp.WearableData[i].HostName = new byte[0];
3164 } 3164 }
3165 3165
3166 // Temporarily throw these packets on to the wind queue, so we can identify whether these 3166 // Temporarily throw these packets on to the wind queue, so we can identify whether these
3167 // are somehow the source of the packet bloat. 3167 // are somehow the source of the packet bloat.
3168 cachedresp.Header.Zerocoded = true; 3168 cachedresp.Header.Zerocoded = true;
3169 OutPacket(cachedresp, ThrottleOutPacketType.Wind); 3169 OutPacket(cachedresp, ThrottleOutPacketType.Wind);
@@ -3245,7 +3245,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3245 // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); 3245 // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
3246 handlerUpdatePrimScale(localId, scale1, this); 3246 handlerUpdatePrimScale(localId, scale1, this);
3247 3247
3248 3248
3249 handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition; 3249 handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition;
3250 if (handlerUpdatePrimSinglePosition != null) 3250 if (handlerUpdatePrimSinglePosition != null)
3251 { 3251 {
@@ -3414,7 +3414,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3414 3414
3415 // Previously ClientView.m_packetQueue 3415 // Previously ClientView.m_packetQueue
3416 3416
3417 // A thread safe sequence number allocator. 3417 // A thread safe sequence number allocator.
3418 protected uint NextSeqNum() 3418 protected uint NextSeqNum()
3419 { 3419 {
3420 // Set the sequence number 3420 // Set the sequence number
@@ -3490,7 +3490,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3490 { 3490 {
3491 // Keep track of when this packet was sent out 3491 // Keep track of when this packet was sent out
3492 Pack.TickCount = System.Environment.TickCount; 3492 Pack.TickCount = System.Environment.TickCount;
3493 3493
3494 if (!Pack.Header.Resent) 3494 if (!Pack.Header.Resent)
3495 { 3495 {
3496 Pack.Header.Sequence = NextSeqNum(); 3496 Pack.Header.Sequence = NextSeqNum();
@@ -3510,7 +3510,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3510 try 3510 try
3511 { 3511 {
3512 byte[] sendbuffer = Pack.ToBytes(); 3512 byte[] sendbuffer = Pack.ToBytes();
3513 PacketPool.Instance.ReturnPacket(Pack); 3513 PacketPool.Instance.ReturnPacket(Pack);
3514 3514
3515 if (Pack.Header.Zerocoded) 3515 if (Pack.Header.Zerocoded)
3516 { 3516 {
@@ -3737,7 +3737,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3737 } 3737 }
3738 } 3738 }
3739 3739
3740 private bool m_packetProcessingEnabled = true; 3740 private bool m_packetProcessingEnabled = true;
3741 3741
3742 public bool IsActive { 3742 public bool IsActive {
3743 get { return m_packetProcessingEnabled; } 3743 get { return m_packetProcessingEnabled; }
@@ -3750,7 +3750,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3750 3750
3751 if (ProcessPacketMethod(Pack)) 3751 if (ProcessPacketMethod(Pack))
3752 { 3752 {
3753 //there is a handler registered that handled this packet type 3753 //there is a handler registered that handled this packet type
3754 return; 3754 return;
3755 } 3755 }
3756 else 3756 else
@@ -3972,7 +3972,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3972 { 3972 {
3973 // Temporarily protect ourselves from the mantis #951 failure. 3973 // Temporarily protect ourselves from the mantis #951 failure.
3974 // However, we could do this for several other handlers where a failure isn't terminal 3974 // However, we could do this for several other handlers where a failure isn't terminal
3975 // for the client session anyway, in order to protect ourselves against bad code in plugins 3975 // for the client session anyway, in order to protect ourselves against bad code in plugins
3976 try 3976 try
3977 { 3977 {
3978 List<byte> visualparams = new List<byte>(); 3978 List<byte> visualparams = new List<byte>();
@@ -3986,7 +3986,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3986 catch (Exception e) 3986 catch (Exception e)
3987 { 3987 {
3988 m_log.ErrorFormat( 3988 m_log.ErrorFormat(
3989 "[CLIENT VIEW]: AgentSetApperance packet handler threw an exception, {0}", 3989 "[CLIENT VIEW]: AgentSetApperance packet handler threw an exception, {0}",
3990 e); 3990 e);
3991 } 3991 }
3992 } 3992 }
@@ -4027,7 +4027,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4027 if (handlerDetachAttachmentIntoInv != null) 4027 if (handlerDetachAttachmentIntoInv != null)
4028 { 4028 {
4029 DetachAttachmentIntoInvPacket detachtoInv = (DetachAttachmentIntoInvPacket)Pack; 4029 DetachAttachmentIntoInvPacket detachtoInv = (DetachAttachmentIntoInvPacket)Pack;
4030 4030
4031 LLUUID itemID = detachtoInv.ObjectData.ItemID; 4031 LLUUID itemID = detachtoInv.ObjectData.ItemID;
4032 LLUUID ATTACH_agentID = detachtoInv.ObjectData.AgentID; 4032 LLUUID ATTACH_agentID = detachtoInv.ObjectData.AgentID;
4033 4033
@@ -4223,7 +4223,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4223 m_probesWithNoIngressPackets = 0; 4223 m_probesWithNoIngressPackets = 0;
4224 m_clientBlocked = false; 4224 m_clientBlocked = false;
4225 SendStartPingCheck(0); 4225 SendStartPingCheck(0);
4226 4226
4227 break; 4227 break;
4228 4228
4229 case PacketType.ForceScriptControlRelease: 4229 case PacketType.ForceScriptControlRelease:
@@ -4284,12 +4284,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4284 // m_log.Info("[REZData]: " + addPacket.ToString()); 4284 // m_log.Info("[REZData]: " + addPacket.ToString());
4285 //BypassRaycast: 1 4285 //BypassRaycast: 1
4286 //RayStart: <69.79469, 158.2652, 98.40343> 4286 //RayStart: <69.79469, 158.2652, 98.40343>
4287 //RayEnd: <61.97724, 141.995, 92.58341> 4287 //RayEnd: <61.97724, 141.995, 92.58341>
4288 //RayTargetID: 00000000-0000-0000-0000-000000000000 4288 //RayTargetID: 00000000-0000-0000-0000-000000000000
4289 4289
4290 //Check to see if adding the prim is allowed; useful for any module wanting to restrict the 4290 //Check to see if adding the prim is allowed; useful for any module wanting to restrict the
4291 //object from rezing initially 4291 //object from rezing initially
4292 4292
4293 handlerAddPrim = OnAddPrim; 4293 handlerAddPrim = OnAddPrim;
4294 if (handlerAddPrim != null) 4294 if (handlerAddPrim != null)
4295 handlerAddPrim(AgentId, addPacket.ObjectData.RayEnd, addPacket.ObjectData.Rotation, shape, addPacket.ObjectData.BypassRaycast, addPacket.ObjectData.RayStart, addPacket.ObjectData.RayTargetID, addPacket.ObjectData.RayEndIsIntersection); 4295 handlerAddPrim(AgentId, addPacket.ObjectData.RayEnd, addPacket.ObjectData.Rotation, shape, addPacket.ObjectData.BypassRaycast, addPacket.ObjectData.RayStart, addPacket.ObjectData.RayTargetID, addPacket.ObjectData.RayEndIsIntersection);
@@ -4532,10 +4532,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4532 } 4532 }
4533 } 4533 }
4534 4534
4535 // Here's our data, 4535 // Here's our data,
4536 // PermField contains the field the info goes into 4536 // PermField contains the field the info goes into
4537 // PermField determines which mask we're changing 4537 // PermField determines which mask we're changing
4538 // 4538 //
4539 // chmask is the mask of the change 4539 // chmask is the mask of the change
4540 // setTF is whether we're adding it or taking it away 4540 // setTF is whether we're adding it or taking it away
4541 // 4541 //
@@ -4969,11 +4969,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4969 } 4969 }
4970 } 4970 }
4971 } 4971 }
4972 4972
4973 break; 4973 break;
4974 4974
4975 case PacketType.RemoveTaskInventory: 4975 case PacketType.RemoveTaskInventory:
4976 4976
4977 RemoveTaskInventoryPacket removeTask = (RemoveTaskInventoryPacket)Pack; 4977 RemoveTaskInventoryPacket removeTask = (RemoveTaskInventoryPacket)Pack;
4978 4978
4979 handlerRemoveTaskItem = OnRemoveTaskItem; 4979 handlerRemoveTaskItem = OnRemoveTaskItem;
@@ -4982,27 +4982,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4982 { 4982 {
4983 handlerRemoveTaskItem(this, removeTask.InventoryData.ItemID, removeTask.InventoryData.LocalID); 4983 handlerRemoveTaskItem(this, removeTask.InventoryData.ItemID, removeTask.InventoryData.LocalID);
4984 } 4984 }
4985 4985
4986 break; 4986 break;
4987 4987
4988 case PacketType.MoveTaskInventory: 4988 case PacketType.MoveTaskInventory:
4989 4989
4990 MoveTaskInventoryPacket moveTaskInventoryPacket = (MoveTaskInventoryPacket)Pack; 4990 MoveTaskInventoryPacket moveTaskInventoryPacket = (MoveTaskInventoryPacket)Pack;
4991 4991
4992 handlerMoveTaskItem = OnMoveTaskItem; 4992 handlerMoveTaskItem = OnMoveTaskItem;
4993 4993
4994 if (handlerMoveTaskItem != null) 4994 if (handlerMoveTaskItem != null)
4995 { 4995 {
4996 handlerMoveTaskItem( 4996 handlerMoveTaskItem(
4997 this, moveTaskInventoryPacket.AgentData.FolderID, 4997 this, moveTaskInventoryPacket.AgentData.FolderID,
4998 moveTaskInventoryPacket.InventoryData.LocalID, 4998 moveTaskInventoryPacket.InventoryData.LocalID,
4999 moveTaskInventoryPacket.InventoryData.ItemID); 4999 moveTaskInventoryPacket.InventoryData.ItemID);
5000 } 5000 }
5001 5001
5002 break; 5002 break;
5003 5003
5004 case PacketType.RezScript: 5004 case PacketType.RezScript:
5005 5005
5006 //Console.WriteLine(Pack.ToString()); 5006 //Console.WriteLine(Pack.ToString());
5007 RezScriptPacket rezScriptx = (RezScriptPacket)Pack; 5007 RezScriptPacket rezScriptx = (RezScriptPacket)Pack;
5008 5008
@@ -5013,7 +5013,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5013 handlerRezScript(this, rezScriptx.InventoryBlock.ItemID, rezScriptx.UpdateBlock.ObjectLocalID); 5013 handlerRezScript(this, rezScriptx.InventoryBlock.ItemID, rezScriptx.UpdateBlock.ObjectLocalID);
5014 } 5014 }
5015 break; 5015 break;
5016 5016
5017 case PacketType.MapLayerRequest: 5017 case PacketType.MapLayerRequest:
5018 RequestMapLayer(); 5018 RequestMapLayer();
5019 break; 5019 break;
@@ -5054,7 +5054,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5054 tpCancel.Info.AgentID = tpReq.Info.AgentID; 5054 tpCancel.Info.AgentID = tpReq.Info.AgentID;
5055 OutPacket(tpCancel, ThrottleOutPacketType.Task); 5055 OutPacket(tpCancel, ThrottleOutPacketType.Task);
5056 } 5056 }
5057 5057
5058 5058
5059 try 5059 try
5060 { 5060 {
@@ -5072,7 +5072,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5072 } 5072 }
5073 else 5073 else
5074 { 5074 {
5075 5075
5076 // Teleport home request 5076 // Teleport home request
5077 handlerTeleportHomeRequest = OnTeleportHomeRequest; 5077 handlerTeleportHomeRequest = OnTeleportHomeRequest;
5078 if (handlerTeleportHomeRequest != null) 5078 if (handlerTeleportHomeRequest != null)
@@ -5121,7 +5121,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5121 5121
5122 #endregion 5122 #endregion
5123 5123
5124 5124
5125 case PacketType.UUIDNameRequest: 5125 case PacketType.UUIDNameRequest:
5126 UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack; 5126 UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack;
5127 foreach (UUIDNameRequestPacket.UUIDNameBlockBlock UUIDBlock in incoming.UUIDNameBlock) 5127 foreach (UUIDNameRequestPacket.UUIDNameBlockBlock UUIDBlock in incoming.UUIDNameBlock)
@@ -5262,7 +5262,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5262 break; 5262 break;
5263 case PacketType.ParcelRelease: 5263 case PacketType.ParcelRelease:
5264 ParcelReleasePacket releasePacket = (ParcelReleasePacket)Pack; 5264 ParcelReleasePacket releasePacket = (ParcelReleasePacket)Pack;
5265 5265
5266 handlerParcelAbandonRequest = OnParcelAbandonRequest; 5266 handlerParcelAbandonRequest = OnParcelAbandonRequest;
5267 if (handlerParcelAbandonRequest != null) 5267 if (handlerParcelAbandonRequest != null)
5268 { 5268 {
@@ -5378,7 +5378,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5378 float SunHour = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(messagePacket.ParamList[5].Parameter)); 5378 float SunHour = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(messagePacket.ParamList[5].Parameter));
5379 5379
5380 OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseFixedSun, SunHour); 5380 OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseFixedSun, SunHour);
5381 5381
5382 } 5382 }
5383 catch (Exception ex) 5383 catch (Exception ex)
5384 { 5384 {
@@ -5462,7 +5462,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5462 LLUUID Prey = LLUUID.Zero; 5462 LLUUID Prey = LLUUID.Zero;
5463 5463
5464 Helpers.TryParse(Helpers.FieldToUTF8String(messagePacket.ParamList[1].Parameter), out Prey); 5464 Helpers.TryParse(Helpers.FieldToUTF8String(messagePacket.ParamList[1].Parameter), out Prey);
5465 5465
5466 OnEstateTeleportOneUserHomeRequest(this,invoice,SenderID,Prey); 5466 OnEstateTeleportOneUserHomeRequest(this,invoice,SenderID,Prey);
5467 } 5467 }
5468 break; 5468 break;
@@ -5500,7 +5500,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5500 RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack; 5500 RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack;
5501 RequestGodlikePowersPacket.RequestBlockBlock rblock = rglpPack.RequestBlock; 5501 RequestGodlikePowersPacket.RequestBlockBlock rblock = rglpPack.RequestBlock;
5502 LLUUID token = rblock.Token; 5502 LLUUID token = rblock.Token;
5503 5503
5504 RequestGodlikePowersPacket.AgentDataBlock ablock = rglpPack.AgentData; 5504 RequestGodlikePowersPacket.AgentDataBlock ablock = rglpPack.AgentData;
5505 5505
5506 handlerReqGodlikePowers = OnRequestGodlikePowers; 5506 handlerReqGodlikePowers = OnRequestGodlikePowers;
@@ -5623,7 +5623,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5623 // TODO: Don't display this one, we handle it at a lower level 5623 // TODO: Don't display this one, we handle it at a lower level
5624 //m_log.Warn("[CLIENT]: unhandled UseCircuitCode packet"); 5624 //m_log.Warn("[CLIENT]: unhandled UseCircuitCode packet");
5625 break; 5625 break;
5626 5626
5627 case PacketType.AgentHeightWidth: 5627 case PacketType.AgentHeightWidth:
5628 // TODO: handle this packet 5628 // TODO: handle this packet
5629 m_log.Warn("[CLIENT]: unhandled AgentHeightWidth packet"); 5629 m_log.Warn("[CLIENT]: unhandled AgentHeightWidth packet");
@@ -5741,7 +5741,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5741 OutPacket(offp, ThrottleOutPacketType.Task); 5741 OutPacket(offp, ThrottleOutPacketType.Task);
5742 } 5742 }
5743 5743
5744 public void SendSitResponse(LLUUID TargetID, LLVector3 OffsetPos, LLQuaternion SitOrientation, bool autopilot, 5744 public void SendSitResponse(LLUUID TargetID, LLVector3 OffsetPos, LLQuaternion SitOrientation, bool autopilot,
5745 LLVector3 CameraAtOffset, LLVector3 CameraEyeOffset, bool ForceMouseLook) 5745 LLVector3 CameraAtOffset, LLVector3 CameraEyeOffset, bool ForceMouseLook)
5746 { 5746 {
5747 AvatarSitResponsePacket avatarSitResponse = new AvatarSitResponsePacket(); 5747 AvatarSitResponsePacket avatarSitResponse = new AvatarSitResponsePacket();
@@ -5766,7 +5766,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5766 GrantGodlikePowersPacket.AgentDataBlock adb = new GrantGodlikePowersPacket.AgentDataBlock(); 5766 GrantGodlikePowersPacket.AgentDataBlock adb = new GrantGodlikePowersPacket.AgentDataBlock();
5767 5767
5768 adb.AgentID = AgentId; 5768 adb.AgentID = AgentId;
5769 adb.SessionID = SessionId; // More security 5769 adb.SessionID = SessionId; // More security
5770 gdb.GodLevel = (byte)AdminLevel; 5770 gdb.GodLevel = (byte)AdminLevel;
5771 gdb.Token = Token; 5771 gdb.Token = Token;
5772 //respondPacket.AgentData = (GrantGodlikePowersPacket.AgentDataBlock)ablock; 5772 //respondPacket.AgentData = (GrantGodlikePowersPacket.AgentDataBlock)ablock;
@@ -5790,7 +5790,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5790 Group.GroupPowers = GroupMembership[i].groupPowers; 5790 Group.GroupPowers = GroupMembership[i].groupPowers;
5791 Groups[i] = Group; 5791 Groups[i] = Group;
5792 Groupupdate.GroupData = Groups; 5792 Groupupdate.GroupData = Groups;
5793 5793
5794 } 5794 }
5795 Groupupdate.AgentData.AgentID = AgentId; 5795 Groupupdate.AgentData.AgentID = AgentId;
5796 OutPacket(Groupupdate, ThrottleOutPacketType.Task); 5796 OutPacket(Groupupdate, ThrottleOutPacketType.Task);
@@ -5800,7 +5800,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5800 public ClientInfo GetClientInfo() 5800 public ClientInfo GetClientInfo()
5801 { 5801 {
5802 //MainLog.Instance.Verbose("CLIENT", "GetClientInfo BGN"); 5802 //MainLog.Instance.Verbose("CLIENT", "GetClientInfo BGN");
5803 5803
5804 ClientInfo info = new ClientInfo(); 5804 ClientInfo info = new ClientInfo();
5805 info.userEP = this.m_userEndPoint; 5805 info.userEP = this.m_userEndPoint;
5806 info.proxyEP = this.m_proxyEndPoint; 5806 info.proxyEP = this.m_proxyEndPoint;
@@ -5822,7 +5822,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5822 QueItem[] queitems = m_packetQueue.GetQueueArray(); 5822 QueItem[] queitems = m_packetQueue.GetQueueArray();
5823 5823
5824 MainLog.Instance.Verbose("CLIENT", "Queue Count : [{0}]", queitems.Length); 5824 MainLog.Instance.Verbose("CLIENT", "Queue Count : [{0}]", queitems.Length);
5825 5825
5826 for (int i = 0; i < queitems.Length; i++) 5826 for (int i = 0; i < queitems.Length; i++)
5827 { 5827 {
5828 if (queitems[i].Incoming == false) 5828 if (queitems[i].Incoming == false)
@@ -5862,7 +5862,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5862 } 5862 }
5863 catch (Exception) 5863 catch (Exception)
5864 { 5864 {
5865 5865
5866 } 5866 }
5867 5867
5868 m_needAck.Add(key, packet); 5868 m_needAck.Add(key, packet);
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
index 8f90f34..8655d80 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
@@ -79,14 +79,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
79 // private long LastThrottle; 79 // private long LastThrottle;
80 // private long ThrottleInterval; 80 // private long ThrottleInterval;
81 private Timer throttleTimer; 81 private Timer throttleTimer;
82 82
83 private LLUUID m_agentId; 83 private LLUUID m_agentId;
84 84
85 public LLPacketQueue(LLUUID agentId) 85 public LLPacketQueue(LLUUID agentId)
86 { 86 {
87 // While working on this, the BlockingQueue had me fooled for a bit. 87 // While working on this, the BlockingQueue had me fooled for a bit.
88 // The Blocking queue causes the thread to stop until there's something 88 // The Blocking queue causes the thread to stop until there's something
89 // in it to process. it's an on-purpose threadlock though because 89 // in it to process. it's an on-purpose threadlock though because
90 // without it, the clientloop will suck up all sim resources. 90 // without it, the clientloop will suck up all sim resources.
91 91
92 SendQueue = new BlockingQueue<LLQueItem>(); 92 SendQueue = new BlockingQueue<LLQueItem>();
@@ -111,7 +111,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
111 AssetThrottle = new LLPacketThrottle(1000, 800000, 1000); 111 AssetThrottle = new LLPacketThrottle(1000, 800000, 1000);
112 TextureThrottle = new LLPacketThrottle(1000, 800000, 4000); 112 TextureThrottle = new LLPacketThrottle(1000, 800000, 4000);
113 // Total Throttle trumps all 113 // Total Throttle trumps all
114 // Number of bytes allowed to go out per second. (256kbps per client) 114 // Number of bytes allowed to go out per second. (256kbps per client)
115 TotalThrottle = new LLPacketThrottle(0, 1500000, 28000); 115 TotalThrottle = new LLPacketThrottle(0, 1500000, 28000);
116 116
117 throttleTimer = new Timer((int) (throttletimems/throttleTimeDivisor)); 117 throttleTimer = new Timer((int) (throttletimems/throttleTimeDivisor));
@@ -121,10 +121,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
121 // TIMERS needed for this 121 // TIMERS needed for this
122 // LastThrottle = DateTime.Now.Ticks; 122 // LastThrottle = DateTime.Now.Ticks;
123 // ThrottleInterval = (long)(throttletimems/throttleTimeDivisor); 123 // ThrottleInterval = (long)(throttletimems/throttleTimeDivisor);
124 124
125 m_agentId = agentId; 125 m_agentId = agentId;
126 126
127 if (StatsManager.SimExtraStats != null) 127 if (StatsManager.SimExtraStats != null)
128 { 128 {
129 StatsManager.SimExtraStats.RegisterPacketQueueStatsProvider(m_agentId, this); 129 StatsManager.SimExtraStats.RegisterPacketQueueStatsProvider(m_agentId, this);
130 } 130 }
@@ -234,11 +234,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
234 234
235 m_enabled = false; 235 m_enabled = false;
236 throttleTimer.Stop(); 236 throttleTimer.Stop();
237 237
238 if (StatsManager.SimExtraStats != null) 238 if (StatsManager.SimExtraStats != null)
239 { 239 {
240 StatsManager.SimExtraStats.DeregisterPacketQueueStatsProvider(m_agentId); 240 StatsManager.SimExtraStats.DeregisterPacketQueueStatsProvider(m_agentId);
241 } 241 }
242 } 242 }
243 243
244 private void ResetCounters() 244 private void ResetCounters()
@@ -275,7 +275,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
275 int MaxThrottleLoops = 4550; // 50*7 packets can be dequeued at once. 275 int MaxThrottleLoops = 4550; // 50*7 packets can be dequeued at once.
276 int throttleLoops = 0; 276 int throttleLoops = 0;
277 277
278 // We're going to dequeue all of the saved up packets until 278 // We're going to dequeue all of the saved up packets until
279 // we've hit the throttle limit or there's no more packets to send 279 // we've hit the throttle limit or there's no more packets to send
280 lock (this) 280 lock (this)
281 { 281 {
@@ -428,8 +428,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
428 //Agent Throttle Block contains 7 single floatingpoint values. 428 //Agent Throttle Block contains 7 single floatingpoint values.
429 int j = 0; 429 int j = 0;
430 430
431 // Some Systems may be big endian... 431 // Some Systems may be big endian...
432 // it might be smart to do this check more often... 432 // it might be smart to do this check more often...
433 if (!BitConverter.IsLittleEndian) 433 if (!BitConverter.IsLittleEndian)
434 for (int i = 0; i < 7; i++) 434 for (int i = 0; i < 7; i++)
435 Array.Reverse(throttle, j + i*singlefloat, singlefloat); 435 Array.Reverse(throttle, j + i*singlefloat, singlefloat);
@@ -508,7 +508,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
508 // effectively wiggling the slider causes things reset 508 // effectively wiggling the slider causes things reset
509 ResetCounters(); 509 ResetCounters();
510 } 510 }
511 511
512 // See IPullStatsProvider 512 // See IPullStatsProvider
513 public string GetStats() 513 public string GetStats()
514 { 514 {
@@ -522,7 +522,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
522 CloudOutgoingPacketQueue.Count, 522 CloudOutgoingPacketQueue.Count,
523 TaskOutgoingPacketQueue.Count, 523 TaskOutgoingPacketQueue.Count,
524 TextureOutgoingPacketQueue.Count, 524 TextureOutgoingPacketQueue.Count,
525 AssetOutgoingPacketQueue.Count); 525 AssetOutgoingPacketQueue.Count);
526 } 526 }
527 527
528 public LLQueItem[] GetQueueArray() 528 public LLQueItem[] GetQueueArray()
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs
index 6a033c8..5983454 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs
@@ -37,7 +37,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
37{ 37{
38 public class LLPacketServer 38 public class LLPacketServer
39 { 39 {
40 //private static readonly log4net.ILog m_log 40 //private static readonly log4net.ILog m_log
41 // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 41 // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
42 42
43 private LLClientStackNetworkHandler m_networkHandler; 43 private LLClientStackNetworkHandler m_networkHandler;
@@ -61,7 +61,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
61 } 61 }
62 62
63 /// <summary> 63 /// <summary>
64 /// 64 ///
65 /// </summary> 65 /// </summary>
66 /// <param name="circuitCode"></param> 66 /// <param name="circuitCode"></param>
67 /// <param name="packet"></param> 67 /// <param name="packet"></param>
@@ -112,7 +112,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
112 } 112 }
113 113
114 /// <summary> 114 /// <summary>
115 /// 115 ///
116 /// </summary> 116 /// </summary>
117 /// <param name="buffer"></param> 117 /// <param name="buffer"></param>
118 /// <param name="size"></param> 118 /// <param name="size"></param>
@@ -124,7 +124,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
124 } 124 }
125 125
126 /// <summary> 126 /// <summary>
127 /// 127 ///
128 /// </summary> 128 /// </summary>
129 /// <param name="circuitcode"></param> 129 /// <param name="circuitcode"></param>
130 public virtual void CloseCircuit(uint circuitcode) 130 public virtual void CloseCircuit(uint circuitcode)
@@ -141,9 +141,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
141 public virtual void CloseClient(IClientAPI client) 141 public virtual void CloseClient(IClientAPI client)
142 { 142 {
143 //m_log.Info("PacketServer:CloseClient()"); 143 //m_log.Info("PacketServer:CloseClient()");
144 144
145 CloseCircuit(client.CircuitCode); 145 CloseCircuit(client.CircuitCode);
146 m_scene.ClientManager.Remove(client.CircuitCode); 146 m_scene.ClientManager.Remove(client.CircuitCode);
147 client.Close(false); 147 client.Close(false);
148 } 148 }
149 } 149 }
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index 5f83b50..c413416 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -171,11 +171,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
171 m_socket.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, 171 m_socket.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender,
172 ReceivedData, null); 172 ReceivedData, null);
173 173
174 // Ter: For some stupid reason ConnectionReset basically kills our async event structure.. 174 // Ter: For some stupid reason ConnectionReset basically kills our async event structure..
175 // so therefore.. we've got to tell the server to BeginReceiveFrom again. 175 // so therefore.. we've got to tell the server to BeginReceiveFrom again.
176 // This will happen over and over until we've gone through all packets 176 // This will happen over and over until we've gone through all packets
177 // sent to and from this particular user. 177 // sent to and from this particular user.
178 // Stupid I know.. 178 // Stupid I know..
179 // but Flusing the buffer would be even more stupid... so, we're stuck with this ugly method. 179 // but Flusing the buffer would be even more stupid... so, we're stuck with this ugly method.
180 } 180 }
181 catch (SocketException) 181 catch (SocketException)
@@ -195,12 +195,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
195 { 195 {
196 m_socket.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, 196 m_socket.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender,
197 ReceivedData, null); 197 ReceivedData, null);
198 198
199 // Ter: For some stupid reason ConnectionReset basically kills our async event structure.. 199 // Ter: For some stupid reason ConnectionReset basically kills our async event structure..
200 // so therefore.. we've got to tell the server to BeginReceiveFrom again. 200 // so therefore.. we've got to tell the server to BeginReceiveFrom again.
201 // This will happen over and over until we've gone through all packets 201 // This will happen over and over until we've gone through all packets
202 // sent to and from this particular user. 202 // sent to and from this particular user.
203 // Stupid I know.. 203 // Stupid I know..
204 // but Flusing the buffer would be even more stupid... so, we're stuck with this ugly method. 204 // but Flusing the buffer would be even more stupid... so, we're stuck with this ugly method.
205 } 205 }
206 catch (SocketException e2) 206 catch (SocketException e2)
@@ -208,7 +208,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
208 m_log.Error("[UDPSERVER]: " + e2.ToString()); 208 m_log.Error("[UDPSERVER]: " + e2.ToString());
209 } 209 }
210 210
211 // Here's some reference code! :D 211 // Here's some reference code! :D
212 // Shutdown and restart the UDP listener! hehe 212 // Shutdown and restart the UDP listener! hehe
213 // Shiny 213 // Shiny
214 214
@@ -228,11 +228,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
228 m_socket.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, 228 m_socket.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender,
229 ReceivedData, null); 229 ReceivedData, null);
230 230
231 // Ter: For some stupid reason ConnectionReset basically kills our async event structure.. 231 // Ter: For some stupid reason ConnectionReset basically kills our async event structure..
232 // so therefore.. we've got to tell the server to BeginReceiveFrom again. 232 // so therefore.. we've got to tell the server to BeginReceiveFrom again.
233 // This will happen over and over until we've gone through all packets 233 // This will happen over and over until we've gone through all packets
234 // sent to and from this particular user. 234 // sent to and from this particular user.
235 // Stupid I know.. 235 // Stupid I know..
236 // but Flusing the buffer would be even more stupid... so, we're stuck with this ugly method. 236 // but Flusing the buffer would be even more stupid... so, we're stuck with this ugly method.
237 } 237 }
238 238
@@ -283,11 +283,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
283 m_socket.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, 283 m_socket.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender,
284 ReceivedData, null); 284 ReceivedData, null);
285 285
286 // Ter: For some stupid reason ConnectionReset basically kills our async event structure.. 286 // Ter: For some stupid reason ConnectionReset basically kills our async event structure..
287 // so therefore.. we've got to tell the server to BeginReceiveFrom again. 287 // so therefore.. we've got to tell the server to BeginReceiveFrom again.
288 // This will happen over and over until we've gone through all packets 288 // This will happen over and over until we've gone through all packets
289 // sent to and from this particular user. 289 // sent to and from this particular user.
290 // Stupid I know.. 290 // Stupid I know..
291 // but Flusing the buffer would be even more stupid... so, we're stuck with this ugly method. 291 // but Flusing the buffer would be even more stupid... so, we're stuck with this ugly method.
292 } 292 }
293 catch (SocketException e5) 293 catch (SocketException e5)
@@ -351,7 +351,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
351 } 351 }
352 } 352 }
353 } 353 }
354 354
355 } 355 }
356 356
357 private void CloseEndPoint(EndPoint sender) 357 private void CloseEndPoint(EndPoint sender)
@@ -468,7 +468,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
468 public void RestoreClient(AgentCircuitData circuit, EndPoint userEP, EndPoint proxyEP) 468 public void RestoreClient(AgentCircuitData circuit, EndPoint userEP, EndPoint proxyEP)
469 { 469 {
470 //MainLog.Instance.Verbose("UDPSERVER", "RestoreClient"); 470 //MainLog.Instance.Verbose("UDPSERVER", "RestoreClient");
471 471
472 UseCircuitCodePacket useCircuit = new UseCircuitCodePacket(); 472 UseCircuitCodePacket useCircuit = new UseCircuitCodePacket();
473 useCircuit.CircuitCode.Code = circuit.circuitcode; 473 useCircuit.CircuitCode.Code = circuit.circuitcode;
474 useCircuit.CircuitCode.ID = circuit.AgentID; 474 useCircuit.CircuitCode.ID = circuit.AgentID;