diff options
Diffstat (limited to '')
6 files changed, 113 insertions, 39 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs b/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs index b53a2fb..9869a99 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs | |||
@@ -31,7 +31,6 @@ using OpenMetaverse; | |||
31 | using OpenMetaverse.Imaging; | 31 | using OpenMetaverse.Imaging; |
32 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
33 | using OpenSim.Region.Framework.Interfaces; | 33 | using OpenSim.Region.Framework.Interfaces; |
34 | using OpenSim.Region.Framework.Scenes.Hypergrid; | ||
35 | using OpenSim.Services.Interfaces; | 34 | using OpenSim.Services.Interfaces; |
36 | using log4net; | 35 | using log4net; |
37 | using System.Reflection; | 36 | using System.Reflection; |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index ebcdd62..8cd47fb 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -40,11 +40,10 @@ using OpenMetaverse.Packets; | |||
40 | using OpenMetaverse.StructuredData; | 40 | using OpenMetaverse.StructuredData; |
41 | using OpenSim.Framework; | 41 | using OpenSim.Framework; |
42 | using OpenSim.Framework.Client; | 42 | using OpenSim.Framework.Client; |
43 | using OpenSim.Framework.Communications.Cache; | 43 | |
44 | using OpenSim.Framework.Statistics; | 44 | using OpenSim.Framework.Statistics; |
45 | using OpenSim.Region.Framework.Interfaces; | 45 | using OpenSim.Region.Framework.Interfaces; |
46 | using OpenSim.Region.Framework.Scenes; | 46 | using OpenSim.Region.Framework.Scenes; |
47 | using OpenSim.Region.Framework.Scenes.Hypergrid; | ||
48 | using OpenSim.Services.Interfaces; | 47 | using OpenSim.Services.Interfaces; |
49 | using Timer = System.Timers.Timer; | 48 | using Timer = System.Timers.Timer; |
50 | using AssetLandmark = OpenSim.Framework.AssetLandmark; | 49 | using AssetLandmark = OpenSim.Framework.AssetLandmark; |
@@ -98,6 +97,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
98 | /// </summary> | 97 | /// </summary> |
99 | public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat, IClientIPEndpoint, IStatsCollector | 98 | public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat, IClientIPEndpoint, IStatsCollector |
100 | { | 99 | { |
100 | /// <value> | ||
101 | /// Debug packet level. At the moment, only 255 does anything (prints out all in and out packets). | ||
102 | /// </value> | ||
103 | protected int m_debugPacketLevel = 0; | ||
104 | |||
101 | #region Events | 105 | #region Events |
102 | 106 | ||
103 | public event GenericMessage OnGenericMessage; | 107 | public event GenericMessage OnGenericMessage; |
@@ -122,7 +126,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
122 | public event ObjectAttach OnObjectAttach; | 126 | public event ObjectAttach OnObjectAttach; |
123 | public event ObjectDeselect OnObjectDetach; | 127 | public event ObjectDeselect OnObjectDetach; |
124 | public event ObjectDrop OnObjectDrop; | 128 | public event ObjectDrop OnObjectDrop; |
125 | public event GenericCall2 OnCompleteMovementToRegion; | 129 | public event GenericCall1 OnCompleteMovementToRegion; |
130 | public event UpdateAgent OnPreAgentUpdate; | ||
126 | public event UpdateAgent OnAgentUpdate; | 131 | public event UpdateAgent OnAgentUpdate; |
127 | public event AgentRequestSit OnAgentRequestSit; | 132 | public event AgentRequestSit OnAgentRequestSit; |
128 | public event AgentSit OnAgentSit; | 133 | public event AgentSit OnAgentSit; |
@@ -353,6 +358,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
353 | private bool m_SendLogoutPacketWhenClosing = true; | 358 | private bool m_SendLogoutPacketWhenClosing = true; |
354 | private AgentUpdateArgs lastarg; | 359 | private AgentUpdateArgs lastarg; |
355 | private bool m_IsActive = true; | 360 | private bool m_IsActive = true; |
361 | private bool m_IsLoggingOut = false; | ||
356 | 362 | ||
357 | protected Dictionary<PacketType, PacketProcessor> m_packetHandlers = new Dictionary<PacketType, PacketProcessor>(); | 363 | protected Dictionary<PacketType, PacketProcessor> m_packetHandlers = new Dictionary<PacketType, PacketProcessor>(); |
358 | protected Dictionary<string, GenericMessage> m_genericPacketHandlers = new Dictionary<string, GenericMessage>(); //PauPaw:Local Generic Message handlers | 364 | protected Dictionary<string, GenericMessage> m_genericPacketHandlers = new Dictionary<string, GenericMessage>(); //PauPaw:Local Generic Message handlers |
@@ -416,6 +422,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
416 | get { return m_IsActive; } | 422 | get { return m_IsActive; } |
417 | set { m_IsActive = value; } | 423 | set { m_IsActive = value; } |
418 | } | 424 | } |
425 | public bool IsLoggingOut | ||
426 | { | ||
427 | get { return m_IsLoggingOut; } | ||
428 | set { m_IsLoggingOut = value; } | ||
429 | } | ||
430 | |||
419 | public bool SendLogoutPacketWhenClosing { set { m_SendLogoutPacketWhenClosing = value; } } | 431 | public bool SendLogoutPacketWhenClosing { set { m_SendLogoutPacketWhenClosing = value; } } |
420 | 432 | ||
421 | #endregion Properties | 433 | #endregion Properties |
@@ -466,6 +478,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
466 | 478 | ||
467 | public void SetDebugPacketLevel(int newDebug) | 479 | public void SetDebugPacketLevel(int newDebug) |
468 | { | 480 | { |
481 | m_debugPacketLevel = newDebug; | ||
469 | } | 482 | } |
470 | 483 | ||
471 | #region Client Methods | 484 | #region Client Methods |
@@ -2512,6 +2525,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2512 | 2525 | ||
2513 | public void SendAsset(AssetRequestToClient req) | 2526 | public void SendAsset(AssetRequestToClient req) |
2514 | { | 2527 | { |
2528 | if (req.AssetInf.Data == null) | ||
2529 | { | ||
2530 | m_log.ErrorFormat("Cannot send asset {0} ({1}), asset data is null", | ||
2531 | req.AssetInf.ID, req.AssetInf.Metadata.ContentType); | ||
2532 | return; | ||
2533 | } | ||
2534 | |||
2515 | //m_log.Debug("sending asset " + req.RequestAssetID); | 2535 | //m_log.Debug("sending asset " + req.RequestAssetID); |
2516 | TransferInfoPacket Transfer = new TransferInfoPacket(); | 2536 | TransferInfoPacket Transfer = new TransferInfoPacket(); |
2517 | Transfer.TransferInfo.ChannelType = 2; | 2537 | Transfer.TransferInfo.ChannelType = 2; |
@@ -4051,10 +4071,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4051 | EstateCovenantReplyPacket.DataBlock edata = new EstateCovenantReplyPacket.DataBlock(); | 4071 | EstateCovenantReplyPacket.DataBlock edata = new EstateCovenantReplyPacket.DataBlock(); |
4052 | edata.CovenantID = covenant; | 4072 | edata.CovenantID = covenant; |
4053 | edata.CovenantTimestamp = 0; | 4073 | edata.CovenantTimestamp = 0; |
4054 | if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) | 4074 | edata.EstateOwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; |
4055 | edata.EstateOwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; | ||
4056 | else | ||
4057 | edata.EstateOwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; | ||
4058 | edata.EstateName = Utils.StringToBytes(m_scene.RegionInfo.EstateSettings.EstateName); | 4075 | edata.EstateName = Utils.StringToBytes(m_scene.RegionInfo.EstateSettings.EstateName); |
4059 | einfopack.Data = edata; | 4076 | einfopack.Data = edata; |
4060 | OutPacket(einfopack, ThrottleOutPacketType.Task); | 4077 | OutPacket(einfopack, ThrottleOutPacketType.Task); |
@@ -4075,8 +4092,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4075 | 4092 | ||
4076 | //Sending Estate Settings | 4093 | //Sending Estate Settings |
4077 | returnblock[0].Parameter = Utils.StringToBytes(estateName); | 4094 | returnblock[0].Parameter = Utils.StringToBytes(estateName); |
4078 | // TODO: remove this cruft once MasterAvatar is fully deprecated | ||
4079 | // | ||
4080 | returnblock[1].Parameter = Utils.StringToBytes(estateOwner.ToString()); | 4095 | returnblock[1].Parameter = Utils.StringToBytes(estateOwner.ToString()); |
4081 | returnblock[2].Parameter = Utils.StringToBytes(estateID.ToString()); | 4096 | returnblock[2].Parameter = Utils.StringToBytes(estateID.ToString()); |
4082 | 4097 | ||
@@ -4866,7 +4881,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4866 | UpdateAgent handlerAgentUpdate = OnAgentUpdate; | 4881 | UpdateAgent handlerAgentUpdate = OnAgentUpdate; |
4867 | lastarg = arg; // save this set of arguments for nexttime | 4882 | lastarg = arg; // save this set of arguments for nexttime |
4868 | if (handlerAgentUpdate != null) | 4883 | if (handlerAgentUpdate != null) |
4884 | { | ||
4885 | OnPreAgentUpdate(this, arg); | ||
4869 | OnAgentUpdate(this, arg); | 4886 | OnAgentUpdate(this, arg); |
4887 | } | ||
4870 | 4888 | ||
4871 | handlerAgentUpdate = null; | 4889 | handlerAgentUpdate = null; |
4872 | } | 4890 | } |
@@ -5505,6 +5523,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5505 | // for the client session anyway, in order to protect ourselves against bad code in plugins | 5523 | // for the client session anyway, in order to protect ourselves against bad code in plugins |
5506 | try | 5524 | try |
5507 | { | 5525 | { |
5526 | |||
5508 | byte[] visualparams = new byte[appear.VisualParam.Length]; | 5527 | byte[] visualparams = new byte[appear.VisualParam.Length]; |
5509 | for (int i = 0; i < appear.VisualParam.Length; i++) | 5528 | for (int i = 0; i < appear.VisualParam.Length; i++) |
5510 | visualparams[i] = appear.VisualParam[i].ParamValue; | 5529 | visualparams[i] = appear.VisualParam[i].ParamValue; |
@@ -5715,10 +5734,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5715 | 5734 | ||
5716 | private bool HandleCompleteAgentMovement(IClientAPI sender, Packet Pack) | 5735 | private bool HandleCompleteAgentMovement(IClientAPI sender, Packet Pack) |
5717 | { | 5736 | { |
5718 | GenericCall2 handlerCompleteMovementToRegion = OnCompleteMovementToRegion; | 5737 | GenericCall1 handlerCompleteMovementToRegion = OnCompleteMovementToRegion; |
5719 | if (handlerCompleteMovementToRegion != null) | 5738 | if (handlerCompleteMovementToRegion != null) |
5720 | { | 5739 | { |
5721 | handlerCompleteMovementToRegion(); | 5740 | handlerCompleteMovementToRegion(sender); |
5722 | } | 5741 | } |
5723 | handlerCompleteMovementToRegion = null; | 5742 | handlerCompleteMovementToRegion = null; |
5724 | 5743 | ||
@@ -7038,7 +7057,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7038 | assetRequestItem = invService.GetItem(assetRequestItem); | 7057 | assetRequestItem = invService.GetItem(assetRequestItem); |
7039 | if (assetRequestItem == null) | 7058 | if (assetRequestItem == null) |
7040 | { | 7059 | { |
7041 | assetRequestItem = ((Scene)m_scene).CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID); | 7060 | ILibraryService lib = m_scene.RequestModuleInterface<ILibraryService>(); |
7061 | if (lib != null) | ||
7062 | assetRequestItem = lib.LibraryRootFolder.FindItem(itemID); | ||
7042 | if (assetRequestItem == null) | 7063 | if (assetRequestItem == null) |
7043 | return true; | 7064 | return true; |
7044 | } | 7065 | } |
@@ -10928,7 +10949,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
10928 | LLUDPServer.LogPacketHeader(false, m_circuitCode, 0, packet.Type, (ushort)packet.Length); | 10949 | LLUDPServer.LogPacketHeader(false, m_circuitCode, 0, packet.Type, (ushort)packet.Length); |
10929 | #endregion BinaryStats | 10950 | #endregion BinaryStats |
10930 | 10951 | ||
10931 | m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, true); | 10952 | OutPacket(packet, throttlePacketType, true); |
10932 | } | 10953 | } |
10933 | 10954 | ||
10934 | /// <summary> | 10955 | /// <summary> |
@@ -10941,6 +10962,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
10941 | /// handles splitting manually</param> | 10962 | /// handles splitting manually</param> |
10942 | protected void OutPacket(Packet packet, ThrottleOutPacketType throttlePacketType, bool doAutomaticSplitting) | 10963 | protected void OutPacket(Packet packet, ThrottleOutPacketType throttlePacketType, bool doAutomaticSplitting) |
10943 | { | 10964 | { |
10965 | if (m_debugPacketLevel >= 255) | ||
10966 | m_log.DebugFormat("[CLIENT]: Packet OUT {0}", packet.Type); | ||
10967 | |||
10944 | m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting); | 10968 | m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting); |
10945 | } | 10969 | } |
10946 | 10970 | ||
@@ -11012,10 +11036,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11012 | /// <param name="Pack">OpenMetaverse.packet</param> | 11036 | /// <param name="Pack">OpenMetaverse.packet</param> |
11013 | public void ProcessInPacket(Packet Pack) | 11037 | public void ProcessInPacket(Packet Pack) |
11014 | { | 11038 | { |
11015 | // m_log.DebugFormat("[CLIENT]: Packet IN {0}", Pack); | 11039 | if (m_debugPacketLevel >= 255) |
11040 | m_log.DebugFormat("[CLIENT]: Packet IN {0}", Pack.Type); | ||
11016 | 11041 | ||
11017 | if (!ProcessPacketMethod(Pack)) | 11042 | if (!ProcessPacketMethod(Pack)) |
11018 | m_log.Warn("[CLIENT]: unhandled packet " + Pack); | 11043 | m_log.Warn("[CLIENT]: unhandled packet " + Pack.Type); |
11019 | 11044 | ||
11020 | PacketPool.Instance.ReturnPacket(Pack); | 11045 | PacketPool.Instance.ReturnPacket(Pack); |
11021 | } | 11046 | } |
@@ -11333,6 +11358,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11333 | const uint m_maxPacketSize = 600; | 11358 | const uint m_maxPacketSize = 600; |
11334 | int numPackets = 1; | 11359 | int numPackets = 1; |
11335 | 11360 | ||
11361 | if (data == null) | ||
11362 | return 0; | ||
11363 | |||
11336 | if (data.LongLength > m_maxPacketSize) | 11364 | if (data.LongLength > m_maxPacketSize) |
11337 | { | 11365 | { |
11338 | // over max number of bytes so split up file | 11366 | // over max number of bytes so split up file |
@@ -11578,5 +11606,40 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11578 | packet.PropertiesData.LanguagesText = Utils.StringToBytes(languages); | 11606 | packet.PropertiesData.LanguagesText = Utils.StringToBytes(languages); |
11579 | OutPacket(packet, ThrottleOutPacketType.Task); | 11607 | OutPacket(packet, ThrottleOutPacketType.Task); |
11580 | } | 11608 | } |
11609 | |||
11610 | public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) | ||
11611 | { | ||
11612 | ChangeUserRightsPacket packet = (ChangeUserRightsPacket)PacketPool.Instance.GetPacket(PacketType.ChangeUserRights); | ||
11613 | |||
11614 | packet.AgentData = new ChangeUserRightsPacket.AgentDataBlock(); | ||
11615 | packet.AgentData.AgentID = agentID; | ||
11616 | |||
11617 | packet.Rights = new ChangeUserRightsPacket.RightsBlock[1]; | ||
11618 | packet.Rights[0] = new ChangeUserRightsPacket.RightsBlock(); | ||
11619 | packet.Rights[0].AgentRelated = friendID; | ||
11620 | packet.Rights[0].RelatedRights = rights; | ||
11621 | |||
11622 | OutPacket(packet, ThrottleOutPacketType.Task); | ||
11623 | } | ||
11624 | |||
11625 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) | ||
11626 | { | ||
11627 | ScriptDialogPacket dialog = (ScriptDialogPacket)PacketPool.Instance.GetPacket(PacketType.ScriptDialog); | ||
11628 | dialog.Data.ObjectID = objectId; | ||
11629 | dialog.Data.ChatChannel = chatChannel; | ||
11630 | dialog.Data.ImageID = UUID.Zero; | ||
11631 | dialog.Data.ObjectName = Util.StringToBytes256(objectname); | ||
11632 | // this is the username of the *owner* | ||
11633 | dialog.Data.FirstName = Util.StringToBytes256(ownerFirstName); | ||
11634 | dialog.Data.LastName = Util.StringToBytes256(ownerLastName); | ||
11635 | dialog.Data.Message = Util.StringToBytes256(message); | ||
11636 | |||
11637 | |||
11638 | ScriptDialogPacket.ButtonsBlock[] buttons = new ScriptDialogPacket.ButtonsBlock[1]; | ||
11639 | buttons[0] = new ScriptDialogPacket.ButtonsBlock(); | ||
11640 | buttons[0].ButtonLabel = Util.StringToBytes256("!!llTextBox!!"); | ||
11641 | dialog.Buttons = buttons; | ||
11642 | OutPacket(dialog, ThrottleOutPacketType.Task); | ||
11643 | } | ||
11581 | } | 11644 | } |
11582 | } | 11645 | } |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLFileTransfer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLFileTransfer.cs index adf171e..10e5a95 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLFileTransfer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLFileTransfer.cs | |||
@@ -197,7 +197,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
197 | 197 | ||
198 | private void Initialise(UUID fileID, string fileName) | 198 | private void Initialise(UUID fileID, string fileName) |
199 | { | 199 | { |
200 | m_asset = new AssetBase(fileID, fileName, type); | 200 | m_asset = new AssetBase(fileID, fileName, type, UUID.Zero.ToString()); |
201 | m_asset.Data = new byte[0]; | 201 | m_asset.Data = new byte[0]; |
202 | m_asset.Description = "empty"; | 202 | m_asset.Description = "empty"; |
203 | m_asset.Local = true; | 203 | m_asset.Local = true; |
@@ -212,6 +212,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
212 | 212 | ||
213 | public void RequestStartXfer(IClientAPI pRemoteClient) | 213 | public void RequestStartXfer(IClientAPI pRemoteClient) |
214 | { | 214 | { |
215 | m_asset.Metadata.CreatorID = pRemoteClient.AgentId.ToString(); | ||
216 | |||
215 | if (!String.IsNullOrEmpty(m_asset.Name)) | 217 | if (!String.IsNullOrEmpty(m_asset.Name)) |
216 | { | 218 | { |
217 | pRemoteClient.SendXferRequest(mXferID, m_asset.Type, m_asset.FullID, 0, Utils.StringToBytes(m_asset.Name)); | 219 | pRemoteClient.SendXferRequest(mXferID, m_asset.Type, m_asset.FullID, 0, Utils.StringToBytes(m_asset.Name)); |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs index 55d9c9c..6232c48 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs | |||
@@ -144,6 +144,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
144 | /// <summary>A reference to the LLUDPServer that is managing this client</summary> | 144 | /// <summary>A reference to the LLUDPServer that is managing this client</summary> |
145 | private readonly LLUDPServer m_udpServer; | 145 | private readonly LLUDPServer m_udpServer; |
146 | 146 | ||
147 | /// <summary>Caches packed throttle information</summary> | ||
148 | private byte[] m_packedThrottles; | ||
149 | |||
147 | private int m_defaultRTO = 3000; | 150 | private int m_defaultRTO = 3000; |
148 | private int m_maxRTO = 60000; | 151 | private int m_maxRTO = 60000; |
149 | 152 | ||
@@ -350,21 +353,31 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
350 | bucket = m_throttleCategories[(int)ThrottleOutPacketType.Texture]; | 353 | bucket = m_throttleCategories[(int)ThrottleOutPacketType.Texture]; |
351 | bucket.DripRate = texture; | 354 | bucket.DripRate = texture; |
352 | bucket.MaxBurst = texture; | 355 | bucket.MaxBurst = texture; |
356 | |||
357 | // Reset the packed throttles cached data | ||
358 | m_packedThrottles = null; | ||
353 | } | 359 | } |
354 | 360 | ||
355 | public byte[] GetThrottlesPacked() | 361 | public byte[] GetThrottlesPacked() |
356 | { | 362 | { |
357 | byte[] data = new byte[7 * 4]; | 363 | byte[] data = m_packedThrottles; |
358 | int i = 0; | 364 | |
359 | 365 | if (data == null) | |
360 | Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Resend].DripRate), 0, data, i, 4); i += 4; | 366 | { |
361 | Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Land].DripRate), 0, data, i, 4); i += 4; | 367 | data = new byte[7 * 4]; |
362 | Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Wind].DripRate), 0, data, i, 4); i += 4; | 368 | int i = 0; |
363 | Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Cloud].DripRate), 0, data, i, 4); i += 4; | 369 | |
364 | Buffer.BlockCopy(Utils.FloatToBytes((float)(m_throttleCategories[(int)ThrottleOutPacketType.Task].DripRate) + | 370 | Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Resend].DripRate), 0, data, i, 4); i += 4; |
365 | m_throttleCategories[(int)ThrottleOutPacketType.State].DripRate), 0, data, i, 4); i += 4; | 371 | Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Land].DripRate), 0, data, i, 4); i += 4; |
366 | Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Texture].DripRate), 0, data, i, 4); i += 4; | 372 | Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Wind].DripRate), 0, data, i, 4); i += 4; |
367 | Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Asset].DripRate), 0, data, i, 4); i += 4; | 373 | Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Cloud].DripRate), 0, data, i, 4); i += 4; |
374 | Buffer.BlockCopy(Utils.FloatToBytes((float)(m_throttleCategories[(int)ThrottleOutPacketType.Task].DripRate) + | ||
375 | m_throttleCategories[(int)ThrottleOutPacketType.State].DripRate), 0, data, i, 4); i += 4; | ||
376 | Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Texture].DripRate), 0, data, i, 4); i += 4; | ||
377 | Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Asset].DripRate), 0, data, i, 4); i += 4; | ||
378 | |||
379 | m_packedThrottles = data; | ||
380 | } | ||
368 | 381 | ||
369 | return data; | 382 | return data; |
370 | } | 383 | } |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 3c4fa72..36d24e8 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |||
@@ -596,15 +596,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
596 | } | 596 | } |
597 | catch (MalformedDataException) | 597 | catch (MalformedDataException) |
598 | { | 598 | { |
599 | m_log.ErrorFormat("[LLUDPSERVER]: Malformed data, cannot parse packet from {0}:\n{1}", | ||
600 | buffer.RemoteEndPoint, Utils.BytesToHexString(buffer.Data, buffer.DataLength, null)); | ||
601 | } | 599 | } |
602 | 600 | ||
603 | // Fail-safe check | 601 | // Fail-safe check |
604 | if (packet == null) | 602 | if (packet == null) |
605 | { | 603 | { |
606 | m_log.Warn("[LLUDPSERVER]: Couldn't build a message from incoming data " + buffer.DataLength + | 604 | m_log.ErrorFormat("[LLUDPSERVER]: Malformed data, cannot parse {0} byte packet from {1}:", |
607 | " bytes long from " + buffer.RemoteEndPoint); | 605 | buffer.DataLength, buffer.RemoteEndPoint); |
606 | m_log.Error(Utils.BytesToHexString(buffer.Data, buffer.DataLength, null)); | ||
608 | return; | 607 | return; |
609 | } | 608 | } |
610 | 609 | ||
@@ -919,7 +918,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
919 | // Remove this client from the scene | 918 | // Remove this client from the scene |
920 | IClientAPI client; | 919 | IClientAPI client; |
921 | if (m_scene.TryGetClient(udpClient.AgentID, out client)) | 920 | if (m_scene.TryGetClient(udpClient.AgentID, out client)) |
921 | { | ||
922 | client.IsLoggingOut = true; | ||
922 | client.Close(); | 923 | client.Close(); |
924 | } | ||
923 | } | 925 | } |
924 | 926 | ||
925 | private void IncomingPacketHandler() | 927 | private void IncomingPacketHandler() |
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index c7aeca14..0ec87e5 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs | |||
@@ -56,13 +56,6 @@ namespace OpenSim.Region.ClientStack | |||
56 | 56 | ||
57 | protected uint m_httpServerPort; | 57 | protected uint m_httpServerPort; |
58 | 58 | ||
59 | public CommunicationsManager CommunicationsManager | ||
60 | { | ||
61 | get { return m_commsManager; } | ||
62 | set { m_commsManager = value; } | ||
63 | } | ||
64 | protected CommunicationsManager m_commsManager; | ||
65 | |||
66 | protected StorageManager m_storageManager; | 59 | protected StorageManager m_storageManager; |
67 | 60 | ||
68 | protected ClientStackManager m_clientStackManager; | 61 | protected ClientStackManager m_clientStackManager; |
@@ -111,6 +104,8 @@ namespace OpenSim.Region.ClientStack | |||
111 | m_log.Info("[REGION]: Starting HTTP server"); | 104 | m_log.Info("[REGION]: Starting HTTP server"); |
112 | m_httpServer.Start(); | 105 | m_httpServer.Start(); |
113 | 106 | ||
107 | MainServer.Instance = m_httpServer; | ||
108 | |||
114 | base.StartupSpecific(); | 109 | base.StartupSpecific(); |
115 | } | 110 | } |
116 | 111 | ||