diff options
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 22 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 12 |
2 files changed, 25 insertions, 9 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index b532cd4..4c9011a 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -3417,20 +3417,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3417 | aw.AgentData.SerialNum = (uint)serial; | 3417 | aw.AgentData.SerialNum = (uint)serial; |
3418 | aw.AgentData.SessionID = m_sessionId; | 3418 | aw.AgentData.SessionID = m_sessionId; |
3419 | 3419 | ||
3420 | int count = 0; | ||
3421 | for (int i = 0; i < wearables.Length; i++) | ||
3422 | count += wearables[i].Count; | ||
3423 | |||
3420 | // TODO: don't create new blocks if recycling an old packet | 3424 | // TODO: don't create new blocks if recycling an old packet |
3421 | aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[13]; | 3425 | aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[count]; |
3422 | AgentWearablesUpdatePacket.WearableDataBlock awb; | 3426 | AgentWearablesUpdatePacket.WearableDataBlock awb; |
3427 | int idx = 0; | ||
3423 | for (int i = 0; i < wearables.Length; i++) | 3428 | for (int i = 0; i < wearables.Length; i++) |
3424 | { | 3429 | { |
3425 | awb = new AgentWearablesUpdatePacket.WearableDataBlock(); | 3430 | for (int j = 0; j < wearables[i].Count; j++) |
3426 | awb.WearableType = (byte)i; | 3431 | { |
3427 | awb.AssetID = wearables[i].AssetID; | 3432 | awb = new AgentWearablesUpdatePacket.WearableDataBlock(); |
3428 | awb.ItemID = wearables[i].ItemID; | 3433 | awb.WearableType = (byte)i; |
3429 | aw.WearableData[i] = awb; | 3434 | awb.AssetID = wearables[i][j].AssetID; |
3435 | awb.ItemID = wearables[i][j].ItemID; | ||
3436 | aw.WearableData[idx] = awb; | ||
3437 | idx++; | ||
3430 | 3438 | ||
3431 | // m_log.DebugFormat( | 3439 | // m_log.DebugFormat( |
3432 | // "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}", | 3440 | // "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}", |
3433 | // awb.ItemID, awb.AssetID, i, Name); | 3441 | // awb.ItemID, awb.AssetID, i, Name); |
3442 | } | ||
3434 | } | 3443 | } |
3435 | 3444 | ||
3436 | OutPacket(aw, ThrottleOutPacketType.Task); | 3445 | OutPacket(aw, ThrottleOutPacketType.Task); |
@@ -5759,6 +5768,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5759 | AvatarWearingArgs wearingArgs = new AvatarWearingArgs(); | 5768 | AvatarWearingArgs wearingArgs = new AvatarWearingArgs(); |
5760 | for (int i = 0; i < nowWearing.WearableData.Length; i++) | 5769 | for (int i = 0; i < nowWearing.WearableData.Length; i++) |
5761 | { | 5770 | { |
5771 | m_log.DebugFormat("[XXX]: Wearable type {0} item {1}", nowWearing.WearableData[i].WearableType, nowWearing.WearableData[i].ItemID); | ||
5762 | AvatarWearingArgs.Wearable wearable = | 5772 | AvatarWearingArgs.Wearable wearable = |
5763 | new AvatarWearingArgs.Wearable(nowWearing.WearableData[i].ItemID, | 5773 | new AvatarWearingArgs.Wearable(nowWearing.WearableData[i].ItemID, |
5764 | nowWearing.WearableData[i].WearableType); | 5774 | nowWearing.WearableData[i].WearableType); |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index e2cda6d..b8c692f 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |||
@@ -183,7 +183,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
183 | IConfig config = configSource.Configs["ClientStack.LindenUDP"]; | 183 | IConfig config = configSource.Configs["ClientStack.LindenUDP"]; |
184 | if (config != null) | 184 | if (config != null) |
185 | { | 185 | { |
186 | m_asyncPacketHandling = config.GetBoolean("async_packet_handling", false); | 186 | m_asyncPacketHandling = config.GetBoolean("async_packet_handling", true); |
187 | m_recvBufferSize = config.GetInt("client_socket_rcvbuf_size", 0); | 187 | m_recvBufferSize = config.GetInt("client_socket_rcvbuf_size", 0); |
188 | sceneThrottleBps = config.GetInt("scene_throttle_max_bps", 0); | 188 | sceneThrottleBps = config.GetInt("scene_throttle_max_bps", 0); |
189 | 189 | ||
@@ -615,8 +615,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
615 | 615 | ||
616 | // UseCircuitCode handling | 616 | // UseCircuitCode handling |
617 | if (packet.Type == PacketType.UseCircuitCode) | 617 | if (packet.Type == PacketType.UseCircuitCode) |
618 | { | 618 | { |
619 | m_log.Debug("[LLUDPSERVER]: Handling UseCircuitCode packet from " + buffer.RemoteEndPoint); | ||
620 | object[] array = new object[] { buffer, packet }; | 619 | object[] array = new object[] { buffer, packet }; |
621 | 620 | ||
622 | if (m_asyncPacketHandling) | 621 | if (m_asyncPacketHandling) |
@@ -827,9 +826,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
827 | 826 | ||
828 | private void HandleUseCircuitCode(object o) | 827 | private void HandleUseCircuitCode(object o) |
829 | { | 828 | { |
829 | DateTime startTime = DateTime.Now; | ||
830 | object[] array = (object[])o; | 830 | object[] array = (object[])o; |
831 | UDPPacketBuffer buffer = (UDPPacketBuffer)array[0]; | 831 | UDPPacketBuffer buffer = (UDPPacketBuffer)array[0]; |
832 | UseCircuitCodePacket packet = (UseCircuitCodePacket)array[1]; | 832 | UseCircuitCodePacket packet = (UseCircuitCodePacket)array[1]; |
833 | |||
834 | m_log.DebugFormat("[LLUDPSERVER]: Handling UseCircuitCode request from {0}", buffer.RemoteEndPoint); | ||
833 | 835 | ||
834 | IPEndPoint remoteEndPoint = (IPEndPoint)buffer.RemoteEndPoint; | 836 | IPEndPoint remoteEndPoint = (IPEndPoint)buffer.RemoteEndPoint; |
835 | 837 | ||
@@ -838,6 +840,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
838 | 840 | ||
839 | // Acknowledge the UseCircuitCode packet | 841 | // Acknowledge the UseCircuitCode packet |
840 | SendAckImmediate(remoteEndPoint, packet.Header.Sequence); | 842 | SendAckImmediate(remoteEndPoint, packet.Header.Sequence); |
843 | |||
844 | m_log.DebugFormat( | ||
845 | "[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms", | ||
846 | buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds); | ||
841 | } | 847 | } |
842 | 848 | ||
843 | private void SendAckImmediate(IPEndPoint remoteEndpoint, uint sequenceNumber) | 849 | private void SendAckImmediate(IPEndPoint remoteEndpoint, uint sequenceNumber) |