diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP')
6 files changed, 70 insertions, 46 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 0388828..5b2bad4 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -822,6 +822,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
822 | handshake.RegionInfo3.ProductName = Util.StringToBytes256(regionInfo.RegionType); | 822 | handshake.RegionInfo3.ProductName = Util.StringToBytes256(regionInfo.RegionType); |
823 | handshake.RegionInfo3.ProductSKU = Utils.EmptyBytes; | 823 | handshake.RegionInfo3.ProductSKU = Utils.EmptyBytes; |
824 | 824 | ||
825 | handshake.RegionInfo4 = new RegionHandshakePacket.RegionInfo4Block[0]; | ||
825 | // OutPacket(handshake, ThrottleOutPacketType.Task); | 826 | // OutPacket(handshake, ThrottleOutPacketType.Task); |
826 | // use same as MoveAgentIntoRegion (both should be task ) | 827 | // use same as MoveAgentIntoRegion (both should be task ) |
827 | OutPacket(handshake, ThrottleOutPacketType.Unknown); | 828 | OutPacket(handshake, ThrottleOutPacketType.Unknown); |
@@ -3604,7 +3605,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3604 | 3605 | ||
3605 | avp.Sender.IsTrial = false; | 3606 | avp.Sender.IsTrial = false; |
3606 | avp.Sender.ID = agentID; | 3607 | avp.Sender.ID = agentID; |
3607 | m_log.DebugFormat("[CLIENT]: Sending appearance for {0} to {1}", agentID.ToString(), AgentId.ToString()); | 3608 | avp.AppearanceData = new AvatarAppearancePacket.AppearanceDataBlock[0]; |
3609 | //m_log.DebugFormat("[CLIENT]: Sending appearance for {0} to {1}", agentID.ToString(), AgentId.ToString()); | ||
3608 | OutPacket(avp, ThrottleOutPacketType.Task); | 3610 | OutPacket(avp, ThrottleOutPacketType.Task); |
3609 | } | 3611 | } |
3610 | 3612 | ||
@@ -3892,6 +3894,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3892 | { | 3894 | { |
3893 | part.Shape.LightEntry = false; | 3895 | part.Shape.LightEntry = false; |
3894 | } | 3896 | } |
3897 | |||
3898 | if (part.Shape != null && (part.Shape.SculptType == (byte)SculptType.Mesh)) | ||
3899 | { | ||
3900 | // Ensure that mesh has at least 8 valid faces | ||
3901 | part.Shape.ProfileBegin = 12500; | ||
3902 | part.Shape.ProfileEnd = 0; | ||
3903 | part.Shape.ProfileHollow = 27500; | ||
3904 | } | ||
3895 | } | 3905 | } |
3896 | 3906 | ||
3897 | if (part.Shape != null && (part.Shape.SculptType == (byte)SculptType.Mesh)) | 3907 | if (part.Shape != null && (part.Shape.SculptType == (byte)SculptType.Mesh)) |
@@ -4216,7 +4226,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4216 | pack.Stat = stats.StatsBlock; | 4226 | pack.Stat = stats.StatsBlock; |
4217 | 4227 | ||
4218 | pack.Header.Reliable = false; | 4228 | pack.Header.Reliable = false; |
4219 | 4229 | pack.RegionInfo = new SimStatsPacket.RegionInfoBlock[0]; | |
4220 | OutPacket(pack, ThrottleOutPacketType.Task); | 4230 | OutPacket(pack, ThrottleOutPacketType.Task); |
4221 | } | 4231 | } |
4222 | 4232 | ||
@@ -4607,7 +4617,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4607 | rinfopack.AgentData = new RegionInfoPacket.AgentDataBlock(); | 4617 | rinfopack.AgentData = new RegionInfoPacket.AgentDataBlock(); |
4608 | rinfopack.AgentData.AgentID = AgentId; | 4618 | rinfopack.AgentData.AgentID = AgentId; |
4609 | rinfopack.AgentData.SessionID = SessionId; | 4619 | rinfopack.AgentData.SessionID = SessionId; |
4610 | 4620 | rinfopack.RegionInfo3 = new RegionInfoPacket.RegionInfo3Block[0]; | |
4611 | 4621 | ||
4612 | OutPacket(rinfopack, ThrottleOutPacketType.Task); | 4622 | OutPacket(rinfopack, ThrottleOutPacketType.Task); |
4613 | } | 4623 | } |
@@ -6587,19 +6597,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6587 | #endregion | 6597 | #endregion |
6588 | 6598 | ||
6589 | AgentRequestSit handlerAgentRequestSit = OnAgentRequestSit; | 6599 | AgentRequestSit handlerAgentRequestSit = OnAgentRequestSit; |
6590 | if (handlerAgentRequestSit != null) | ||
6591 | if (!(agentRequestSit.AgentData == null | ||
6592 | || agentRequestSit.TargetObject == null | ||
6593 | || agentRequestSit.TargetObject.TargetID == null | ||
6594 | || agentRequestSit.TargetObject.Offset == null)) | ||
6595 | { | ||
6596 | var sp = m_scene.GetScenePresence(agentRequestSit.AgentData.AgentID); | ||
6597 | if (sp == null || sp.ParentID != 0) // ignore packet if agent is already sitting | ||
6598 | return true; | ||
6599 | 6600 | ||
6600 | handlerAgentRequestSit(this, agentRequestSit.AgentData.AgentID, | 6601 | if (handlerAgentRequestSit != null) |
6601 | agentRequestSit.TargetObject.TargetID, agentRequestSit.TargetObject.Offset); | 6602 | handlerAgentRequestSit(this, agentRequestSit.AgentData.AgentID, |
6602 | } | 6603 | agentRequestSit.TargetObject.TargetID, agentRequestSit.TargetObject.Offset); |
6603 | } | 6604 | } |
6604 | return true; | 6605 | return true; |
6605 | } | 6606 | } |
@@ -7205,7 +7206,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7205 | 7206 | ||
7206 | if (handlerUpdatePrimFlags != null) | 7207 | if (handlerUpdatePrimFlags != null) |
7207 | { | 7208 | { |
7208 | byte[] data = Pack.ToBytes(); | 7209 | // byte[] data = Pack.ToBytes(); |
7209 | // 46,47,48 are special positions within the packet | 7210 | // 46,47,48 are special positions within the packet |
7210 | // This may change so perhaps we need a better way | 7211 | // This may change so perhaps we need a better way |
7211 | // of storing this (OMV.FlagUpdatePacket.UsePhysics,etc?) | 7212 | // of storing this (OMV.FlagUpdatePacket.UsePhysics,etc?) |
@@ -12254,11 +12255,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
12254 | if (logPacket) | 12255 | if (logPacket) |
12255 | m_log.DebugFormat( | 12256 | m_log.DebugFormat( |
12256 | "[CLIENT]: PACKET IN from {0} ({1}) in {2} - {3}", | 12257 | "[CLIENT]: PACKET IN from {0} ({1}) in {2} - {3}", |
12257 | Name, SceneAgent.IsChildAgent ? "child" : "root ", m_scene.RegionInfo.RegionName, packet.Type); | 12258 | Name, SceneAgent.IsChildAgent ? "child" : "root ", Scene.Name, packet.Type); |
12258 | } | 12259 | } |
12259 | 12260 | ||
12260 | if (!ProcessPacketMethod(packet)) | 12261 | if (!ProcessPacketMethod(packet)) |
12261 | m_log.Warn("[CLIENT]: unhandled packet " + packet.Type); | 12262 | m_log.WarnFormat( |
12263 | "[CLIENT]: Unhandled packet {0} from {1} ({2}) in {3}. Ignoring.", | ||
12264 | packet.Type, Name, SceneAgent.IsChildAgent ? "child" : "root ", Scene.Name); | ||
12262 | } | 12265 | } |
12263 | 12266 | ||
12264 | private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket) | 12267 | private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket) |
@@ -12466,6 +12469,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
12466 | return String.Empty; | 12469 | return String.Empty; |
12467 | } | 12470 | } |
12468 | 12471 | ||
12472 | public OSDMap OReport(string uptime, string version) | ||
12473 | { | ||
12474 | return new OSDMap(); | ||
12475 | } | ||
12476 | |||
12469 | /// <summary> | 12477 | /// <summary> |
12470 | /// Make an asset request to the asset service in response to a client request. | 12478 | /// Make an asset request to the asset service in response to a client request. |
12471 | /// </summary> | 12479 | /// </summary> |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index d49f1f7..e07ce4c 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |||
@@ -281,25 +281,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
281 | m_shouldCollectStats = false; | 281 | m_shouldCollectStats = false; |
282 | if (config != null) | 282 | if (config != null) |
283 | { | 283 | { |
284 | if (config.Contains("enabled") && config.GetBoolean("enabled")) | 284 | m_shouldCollectStats = config.GetBoolean("Enabled", false); |
285 | { | 285 | binStatsMaxFilesize = TimeSpan.FromSeconds(config.GetInt("packet_headers_period_seconds", 300)); |
286 | if (config.Contains("collect_packet_headers")) | 286 | binStatsDir = config.GetString("stats_dir", "."); |
287 | m_shouldCollectStats = config.GetBoolean("collect_packet_headers"); | 287 | m_aggregatedBWStats = config.GetBoolean("aggregatedBWStats", false); |
288 | if (config.Contains("packet_headers_period_seconds")) | 288 | } |
289 | { | 289 | #endregion BinaryStats |
290 | binStatsMaxFilesize = TimeSpan.FromSeconds(config.GetInt("region_stats_period_seconds")); | ||
291 | } | ||
292 | if (config.Contains("stats_dir")) | ||
293 | { | ||
294 | binStatsDir = config.GetString("stats_dir"); | ||
295 | } | ||
296 | } | ||
297 | else | ||
298 | { | ||
299 | m_shouldCollectStats = false; | ||
300 | } | ||
301 | } | ||
302 | #endregion BinaryStats | ||
303 | 290 | ||
304 | m_throttle = new TokenBucket(null, sceneThrottleBps); | 291 | m_throttle = new TokenBucket(null, sceneThrottleBps); |
305 | ThrottleRates = new ThrottleRates(configSource); | 292 | ThrottleRates = new ThrottleRates(configSource); |
@@ -1309,8 +1296,34 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1309 | static object binStatsLogLock = new object(); | 1296 | static object binStatsLogLock = new object(); |
1310 | static string binStatsDir = ""; | 1297 | static string binStatsDir = ""; |
1311 | 1298 | ||
1299 | //for Aggregated In/Out BW logging | ||
1300 | static bool m_aggregatedBWStats = false; | ||
1301 | static long m_aggregatedBytesIn = 0; | ||
1302 | static long m_aggregatedByestOut = 0; | ||
1303 | static object aggBWStatsLock = new object(); | ||
1304 | |||
1305 | public static long AggregatedLLUDPBytesIn | ||
1306 | { | ||
1307 | get { return m_aggregatedBytesIn; } | ||
1308 | } | ||
1309 | public static long AggregatedLLUDPBytesOut | ||
1310 | { | ||
1311 | get {return m_aggregatedByestOut;} | ||
1312 | } | ||
1313 | |||
1312 | public static void LogPacketHeader(bool incoming, uint circuit, byte flags, PacketType packetType, ushort size) | 1314 | public static void LogPacketHeader(bool incoming, uint circuit, byte flags, PacketType packetType, ushort size) |
1313 | { | 1315 | { |
1316 | if (m_aggregatedBWStats) | ||
1317 | { | ||
1318 | lock (aggBWStatsLock) | ||
1319 | { | ||
1320 | if (incoming) | ||
1321 | m_aggregatedBytesIn += size; | ||
1322 | else | ||
1323 | m_aggregatedByestOut += size; | ||
1324 | } | ||
1325 | } | ||
1326 | |||
1314 | if (!m_shouldCollectStats) return; | 1327 | if (!m_shouldCollectStats) return; |
1315 | 1328 | ||
1316 | // Binary logging format is TTTTTTTTCCCCFPPPSS, T=Time, C=Circuit, F=Flags, P=PacketType, S=size | 1329 | // Binary logging format is TTTTTTTTCCCCFPPPSS, T=Time, C=Circuit, F=Flags, P=PacketType, S=size |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs index 2aeb4cc..7035e38 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs | |||
@@ -204,9 +204,12 @@ namespace OpenMetaverse | |||
204 | { | 204 | { |
205 | UDPPacketBuffer buf; | 205 | UDPPacketBuffer buf; |
206 | 206 | ||
207 | if (UsePools) | 207 | // FIXME: Disabled for now as this causes issues with reused packet objects interfering with each other |
208 | buf = Pool.GetObject(); | 208 | // on Windows with m_asyncPacketHandling = true, though this has not been seen on Linux. |
209 | else | 209 | // Possibly some unexpected issue with fetching UDP data concurrently with multiple threads. Requires more investigation. |
210 | // if (UsePools) | ||
211 | // buf = Pool.GetObject(); | ||
212 | // else | ||
210 | buf = new UDPPacketBuffer(); | 213 | buf = new UDPPacketBuffer(); |
211 | 214 | ||
212 | if (IsRunningInbound) | 215 | if (IsRunningInbound) |
@@ -287,8 +290,8 @@ namespace OpenMetaverse | |||
287 | catch (ObjectDisposedException) { } | 290 | catch (ObjectDisposedException) { } |
288 | finally | 291 | finally |
289 | { | 292 | { |
290 | if (UsePools) | 293 | // if (UsePools) |
291 | Pool.ReturnObject(buffer); | 294 | // Pool.ReturnObject(buffer); |
292 | 295 | ||
293 | // Synchronous mode waits until the packet callback completes | 296 | // Synchronous mode waits until the packet callback completes |
294 | // before starting the receive to fetch another packet | 297 | // before starting the receive to fetch another packet |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs b/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs index af2f6f8..98ef72f 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs | |||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices; | |||
29 | // Build Number | 29 | // Build Number |
30 | // Revision | 30 | // Revision |
31 | // | 31 | // |
32 | [assembly: AssemblyVersion("0.7.5.*")] | 32 | [assembly: AssemblyVersion("0.7.6.*")] |
33 | [assembly: AssemblyFileVersion("1.0.0.0")] | 33 | |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs index 5fcf376..7d9f581 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs | |||
@@ -43,7 +43,7 @@ using OpenSim.Tests.Common.Mock; | |||
43 | namespace OpenSim.Region.ClientStack.LindenUDP.Tests | 43 | namespace OpenSim.Region.ClientStack.LindenUDP.Tests |
44 | { | 44 | { |
45 | [TestFixture] | 45 | [TestFixture] |
46 | public class LLImageManagerTests | 46 | public class LLImageManagerTests : OpenSimTestCase |
47 | { | 47 | { |
48 | private AssetBase m_testImageAsset; | 48 | private AssetBase m_testImageAsset; |
49 | private Scene scene; | 49 | private Scene scene; |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Tests/PacketHandlerTests.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/PacketHandlerTests.cs index 0f88ec6..5f73a94 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/Tests/PacketHandlerTests.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/Tests/PacketHandlerTests.cs | |||
@@ -39,7 +39,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests | |||
39 | /// Tests for the LL packet handler | 39 | /// Tests for the LL packet handler |
40 | /// </summary> | 40 | /// </summary> |
41 | [TestFixture] | 41 | [TestFixture] |
42 | public class PacketHandlerTests | 42 | public class PacketHandlerTests : OpenSimTestCase |
43 | { | 43 | { |
44 | // [Test] | 44 | // [Test] |
45 | // /// <summary> | 45 | // /// <summary> |