Merge branch 'master' into careminster-presence-refactor

This commit is contained in:
Melanie
2010-11-02 22:58:33 +00:00
44 changed files with 19371 additions and 19377 deletions

View File

@@ -3417,20 +3417,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP
aw.AgentData.SerialNum = (uint)serial;
aw.AgentData.SessionID = m_sessionId;
int count = 0;
for (int i = 0; i < wearables.Length; i++)
count += wearables[i].Count;
// TODO: don't create new blocks if recycling an old packet
aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[13];
aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[count];
AgentWearablesUpdatePacket.WearableDataBlock awb;
int idx = 0;
for (int i = 0; i < wearables.Length; i++)
{
awb = new AgentWearablesUpdatePacket.WearableDataBlock();
awb.WearableType = (byte)i;
awb.AssetID = wearables[i].AssetID;
awb.ItemID = wearables[i].ItemID;
aw.WearableData[i] = awb;
for (int j = 0; j < wearables[i].Count; j++)
{
awb = new AgentWearablesUpdatePacket.WearableDataBlock();
awb.WearableType = (byte)i;
awb.AssetID = wearables[i][j].AssetID;
awb.ItemID = wearables[i][j].ItemID;
aw.WearableData[idx] = awb;
idx++;
// m_log.DebugFormat(
// "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}",
// awb.ItemID, awb.AssetID, i, Name);
}
}
OutPacket(aw, ThrottleOutPacketType.Task);
@@ -5759,6 +5768,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
AvatarWearingArgs wearingArgs = new AvatarWearingArgs();
for (int i = 0; i < nowWearing.WearableData.Length; i++)
{
m_log.DebugFormat("[XXX]: Wearable type {0} item {1}", nowWearing.WearableData[i].WearableType, nowWearing.WearableData[i].ItemID);
AvatarWearingArgs.Wearable wearable =
new AvatarWearingArgs.Wearable(nowWearing.WearableData[i].ItemID,
nowWearing.WearableData[i].WearableType);

View File

@@ -183,7 +183,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
IConfig config = configSource.Configs["ClientStack.LindenUDP"];
if (config != null)
{
m_asyncPacketHandling = config.GetBoolean("async_packet_handling", false);
m_asyncPacketHandling = config.GetBoolean("async_packet_handling", true);
m_recvBufferSize = config.GetInt("client_socket_rcvbuf_size", 0);
sceneThrottleBps = config.GetInt("scene_throttle_max_bps", 0);
@@ -615,8 +615,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// UseCircuitCode handling
if (packet.Type == PacketType.UseCircuitCode)
{
m_log.Debug("[LLUDPSERVER]: Handling UseCircuitCode packet from " + buffer.RemoteEndPoint);
{
object[] array = new object[] { buffer, packet };
if (m_asyncPacketHandling)
@@ -827,9 +826,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private void HandleUseCircuitCode(object o)
{
DateTime startTime = DateTime.Now;
object[] array = (object[])o;
UDPPacketBuffer buffer = (UDPPacketBuffer)array[0];
UseCircuitCodePacket packet = (UseCircuitCodePacket)array[1];
m_log.DebugFormat("[LLUDPSERVER]: Handling UseCircuitCode request from {0}", buffer.RemoteEndPoint);
IPEndPoint remoteEndPoint = (IPEndPoint)buffer.RemoteEndPoint;
@@ -838,6 +840,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// Acknowledge the UseCircuitCode packet
SendAckImmediate(remoteEndPoint, packet.Header.Sequence);
m_log.DebugFormat(
"[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms",
buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds);
}
private void SendAckImmediate(IPEndPoint remoteEndpoint, uint sequenceNumber)