From 2d315ec207292ef05bab5e4f662599e755d7acbf Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 5 Nov 2013 20:58:52 +0000
Subject: Fix a race condition where pCampbot actions could continue even if a
bot had disconnected.
---
OpenSim/Tools/pCampBot/Bot.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Tools/pCampBot/Bot.cs b/OpenSim/Tools/pCampBot/Bot.cs
index ccc24fa..70aa2cb 100644
--- a/OpenSim/Tools/pCampBot/Bot.cs
+++ b/OpenSim/Tools/pCampBot/Bot.cs
@@ -276,7 +276,7 @@ namespace pCampBot
//add additional steps and/or things the bot should do
private void Action()
{
- while (ConnectionState != ConnectionState.Disconnecting)
+ while (ConnectionState == ConnectionState.Connected)
{
lock (Behaviours)
{
--
cgit v1.1
From fb23f78928c72cdaab1e33270f4c732690e10714 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 5 Nov 2013 23:18:09 +0000
Subject: minor: comment out "SetLastPosition" GridUserService debug message
for now.
---
OpenSim/Services/UserAccountService/GridUserService.cs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Services/UserAccountService/GridUserService.cs b/OpenSim/Services/UserAccountService/GridUserService.cs
index 944411f..bef1691 100644
--- a/OpenSim/Services/UserAccountService/GridUserService.cs
+++ b/OpenSim/Services/UserAccountService/GridUserService.cs
@@ -194,7 +194,8 @@ namespace OpenSim.Services.UserAccountService
public bool SetLastPosition(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt)
{
- m_log.DebugFormat("[GRID USER SERVICE]: SetLastPosition for {0}", userID);
+// m_log.DebugFormat("[GRID USER SERVICE]: SetLastPosition for {0}", userID);
+
GridUserData d = m_Database.Get(userID);
if (d == null)
{
--
cgit v1.1
From caf2abe311a9f7a703ba7444601c34d96053edcf Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 5 Nov 2013 23:32:26 +0000
Subject: Record individual region bot disconnects in pCampbot log
---
OpenSim/Tools/pCampBot/Bot.cs | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Tools/pCampBot/Bot.cs b/OpenSim/Tools/pCampBot/Bot.cs
index 70aa2cb..de464ab 100644
--- a/OpenSim/Tools/pCampBot/Bot.cs
+++ b/OpenSim/Tools/pCampBot/Bot.cs
@@ -264,9 +264,10 @@ namespace pCampBot
newClient.Throttle.Total = 400000;
}
- newClient.Network.LoginProgress += this.Network_LoginProgress;
- newClient.Network.SimConnected += this.Network_SimConnected;
- newClient.Network.Disconnected += this.Network_OnDisconnected;
+ newClient.Network.LoginProgress += Network_LoginProgress;
+ newClient.Network.SimConnected += Network_SimConnected;
+ newClient.Network.SimDisconnected += Network_SimDisconnected;
+ newClient.Network.Disconnected += Network_OnDisconnected;
newClient.Objects.ObjectUpdate += Objects_NewPrim;
Client = newClient;
@@ -583,7 +584,13 @@ namespace pCampBot
public void Network_SimConnected(object sender, SimConnectedEventArgs args)
{
m_log.DebugFormat(
- "[BOT]: Bot {0} connected to {1} at {2}", Name, args.Simulator.Name, args.Simulator.IPEndPoint);
+ "[BOT]: Bot {0} connected to region {1} at {2}", Name, args.Simulator.Name, args.Simulator.IPEndPoint);
+ }
+
+ public void Network_SimDisconnected(object sender, SimDisconnectedEventArgs args)
+ {
+ m_log.DebugFormat(
+ "[BOT]: Bot {0} disconnected from region {1} at {2}", Name, args.Simulator.Name, args.Simulator.IPEndPoint);
}
public void Network_OnDisconnected(object sender, DisconnectedEventArgs args)
@@ -591,7 +598,7 @@ namespace pCampBot
ConnectionState = ConnectionState.Disconnected;
m_log.DebugFormat(
- "[BOT]: Bot {0} disconnected reason {1}, message {2}", Name, args.Reason, args.Message);
+ "[BOT]: Bot {0} disconnected from grid, reason {1}, message {2}", Name, args.Reason, args.Message);
// m_log.ErrorFormat("Fired Network_OnDisconnected");
--
cgit v1.1
From 8e1bf55e7b85f8c92237ef2208a4a2c31ba6153c Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 6 Nov 2013 01:02:20 +0000
Subject: Add IncomingPacketsResentCount clientstack statistics
This records how many packets were indicated to be resends by clients
Not 100% reliable since clients can lie about resends, but usually would indicate if clients are not receiving UDP acks at all or in a manner they consider timely.
---
.../Region/ClientStack/Linden/UDP/LLUDPServer.cs | 23 ++++++++++++++++++++++
1 file changed, 23 insertions(+)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index 3bd1ef1..c0a4e56 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -134,6 +134,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
StatsManager.RegisterStat(
new Stat(
+ "IncomingPacketsResentCount",
+ "Number of inbound packets that clients indicate are resends.",
+ "",
+ "",
+ "clientstack",
+ scene.Name,
+ StatType.Pull,
+ MeasuresOfInterest.AverageChangeOverTime,
+ stat => stat.Value = m_udpServer.IncomingPacketsResentCount,
+ StatVerbosity.Debug));
+
+ StatsManager.RegisterStat(
+ new Stat(
"OutgoingUDPSendsCount",
"Number of UDP sends performed",
"",
@@ -318,6 +331,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
internal int PacketsSentCount { get; set; }
///
+ /// Record how many incoming packets are indicated as resends by clients.
+ ///
+ internal int IncomingPacketsResentCount { get; set; }
+
+ ///
/// Record how many inbound packets could not be recognized as LLUDP packets.
///
public int IncomingMalformedPacketCount { get; private set; }
@@ -1467,6 +1485,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#region Incoming Packet Accounting
+ // We're not going to worry about interlock yet since its not currently critical that this total count
+ // is 100% correct
+ if (packet.Header.Resent)
+ IncomingPacketsResentCount++;
+
// Check the archive of received reliable packet IDs to see whether we already received this packet
if (packet.Header.Reliable && !udpClient.PacketArchive.TryEnqueue(packet.Header.Sequence))
{
--
cgit v1.1
From 26fd29622d602cbd63743f4f2fa0b681b00826ed Mon Sep 17 00:00:00 2001
From: Latif Khalifa
Date: Wed, 6 Nov 2013 03:48:48 +0100
Subject: Added sending (for now hard-coded) sim isze in SendMapBlockSplit()
---
OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 6 ++++++
1 file changed, 6 insertions(+)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 1a2d4de..20bc59c 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -1463,6 +1463,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
mapReply.AgentData.AgentID = AgentId;
mapReply.Data = new MapBlockReplyPacket.DataBlock[mapBlocks2.Length];
+ mapReply.Size = new MapBlockReplyPacket.SizeBlock[mapBlocks2.Length];
mapReply.AgentData.Flags = flag;
for (int i = 0; i < mapBlocks2.Length; i++)
@@ -1477,6 +1478,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
mapReply.Data[i].RegionFlags = mapBlocks2[i].RegionFlags;
mapReply.Data[i].Access = mapBlocks2[i].Access;
mapReply.Data[i].Agents = mapBlocks2[i].Agents;
+
+ // TODO: hookup varregion sim size here
+ mapReply.Size[i] = new MapBlockReplyPacket.SizeBlock();
+ mapReply.Size[i].SizeX = 256;
+ mapReply.Size[i].SizeY = 256;
}
OutPacket(mapReply, ThrottleOutPacketType.Land);
}
--
cgit v1.1