Comment out LLUDPServer.BroadcastPacket() to reduce code complexity. Appears to be a never used method.

link-sitting
Justin Clark-Casey (justincc) 2013-10-24 00:37:49 +01:00
parent 5d61c4039d
commit cccdfcb59e
1 changed files with 38 additions and 38 deletions

View File

@ -862,44 +862,44 @@ namespace OpenSim.Region.ClientStack.LindenUDP
return x == m_location; return x == m_location;
} }
public void BroadcastPacket(Packet packet, ThrottleOutPacketType category, bool sendToPausedAgents, bool allowSplitting) // public void BroadcastPacket(Packet packet, ThrottleOutPacketType category, bool sendToPausedAgents, bool allowSplitting)
{ // {
// CoarseLocationUpdate and AvatarGroupsReply packets cannot be split in an automated way // // CoarseLocationUpdate and AvatarGroupsReply packets cannot be split in an automated way
if ((packet.Type == PacketType.CoarseLocationUpdate || packet.Type == PacketType.AvatarGroupsReply) && allowSplitting) // if ((packet.Type == PacketType.CoarseLocationUpdate || packet.Type == PacketType.AvatarGroupsReply) && allowSplitting)
allowSplitting = false; // allowSplitting = false;
//
if (allowSplitting && packet.HasVariableBlocks) // if (allowSplitting && packet.HasVariableBlocks)
{ // {
byte[][] datas = packet.ToBytesMultiple(); // byte[][] datas = packet.ToBytesMultiple();
int packetCount = datas.Length; // int packetCount = datas.Length;
//
if (packetCount < 1) // if (packetCount < 1)
m_log.Error("[LLUDPSERVER]: Failed to split " + packet.Type + " with estimated length " + packet.Length); // m_log.Error("[LLUDPSERVER]: Failed to split " + packet.Type + " with estimated length " + packet.Length);
//
for (int i = 0; i < packetCount; i++) // for (int i = 0; i < packetCount; i++)
{ // {
byte[] data = datas[i]; // byte[] data = datas[i];
m_scene.ForEachClient( // m_scene.ForEachClient(
delegate(IClientAPI client) // delegate(IClientAPI client)
{ // {
if (client is LLClientView) // if (client is LLClientView)
SendPacketData(((LLClientView)client).UDPClient, data, packet.Type, category, null); // SendPacketData(((LLClientView)client).UDPClient, data, packet.Type, category, null);
} // }
); // );
} // }
} // }
else // else
{ // {
byte[] data = packet.ToBytes(); // byte[] data = packet.ToBytes();
m_scene.ForEachClient( // m_scene.ForEachClient(
delegate(IClientAPI client) // delegate(IClientAPI client)
{ // {
if (client is LLClientView) // if (client is LLClientView)
SendPacketData(((LLClientView)client).UDPClient, data, packet.Type, category, null); // SendPacketData(((LLClientView)client).UDPClient, data, packet.Type, category, null);
} // }
); // );
} // }
} // }
/// <summary> /// <summary>
/// Start the process of sending a packet to the client. /// Start the process of sending a packet to the client.