From 8c55f3eaa671f22012a567138b6ee55b4c3e4941 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Fri, 3 Oct 2008 14:18:17 +0000 Subject: * minor: remove warnings (the code cleaners strike again) --- OpenSim/Data/Tests/BasicRegionTest.cs | 18 +++++++++--------- OpenSim/Framework/Servers/BaseHttpServer.cs | 8 ++++---- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 6 +++--- .../Region/ClientStack/LindenUDP/LLPacketHandler.cs | 1 - OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs | 3 +-- .../Modules/Framework/EventQueueGetModule.cs | 7 +++---- 6 files changed, 20 insertions(+), 23 deletions(-) diff --git a/OpenSim/Data/Tests/BasicRegionTest.cs b/OpenSim/Data/Tests/BasicRegionTest.cs index 6fd0191..9a73cc2 100644 --- a/OpenSim/Data/Tests/BasicRegionTest.cs +++ b/OpenSim/Data/Tests/BasicRegionTest.cs @@ -395,14 +395,14 @@ namespace OpenSim.Data.Tests return i; } - private InventoryFolderBase NewFolder(UUID id, UUID parent, UUID owner, string name) - { - InventoryFolderBase f = new InventoryFolderBase(); - f.ID = id; - f.ParentID = parent; - f.Owner = owner; - f.Name = name; - return f; - } +// private InventoryFolderBase NewFolder(UUID id, UUID parent, UUID owner, string name) +// { +// InventoryFolderBase f = new InventoryFolderBase(); +// f.ID = id; +// f.ParentID = parent; +// f.Owner = owner; +// f.Name = name; +// return f; +// } } } \ No newline at end of file diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index da0ce79..15bc646 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs @@ -594,10 +594,10 @@ namespace OpenSim.Framework.Servers case "application/xml": default: // Point of note.. the DoWeHaveA methods check for an EXACT path - if (request.RawUrl.Contains("/CAPS/EQG")) - { - int i = 1; - } +// if (request.RawUrl.Contains("/CAPS/EQG")) +// { +// int i = 1; +// } if (DoWeHaveALLSDHandler(request.RawUrl)) { HandleLLSDRequests(request, response); diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 1c7bbec..af760ae 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -783,8 +783,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP ClientLoop(); } - } - //Todo set as Generic Exception again. + } catch (System.Exception e) { if (e is ThreadAbortException) @@ -794,7 +793,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP StatsManager.SimExtraStats.AddAbnormalClientThreadTermination(); // Don't let a failure in an individual client thread crash the whole sim. - m_log.ErrorFormat("[CLIENT]: Client thread for {0} {1} crashed. Logging them out. Exception {2}", Name, AgentId, e); + m_log.ErrorFormat( + "[CLIENT]: Client thread for {0} {1} crashed. Logging them out. Exception {2}", Name, AgentId, e); try { diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs index a1118cb..78a916d 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs @@ -762,7 +762,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP { Packet packet = item.Packet; - // Assign sequence number here to prevent out of order packets if (packet.Header.Sequence == 0) { diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs index 81c789a..39ade56 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs @@ -413,10 +413,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } - private static int ScaleThrottle(int value, int curmax, int newmax) { - return (value / curmax) * newmax; + return (int)((value / (float)curmax) * newmax); } public byte[] GetThrottlesPacked(float multiplier) diff --git a/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs b/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs index 2eb1618..76fb141 100644 --- a/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs +++ b/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs @@ -268,10 +268,9 @@ namespace OpenSim.Region.Environment.Modules.Framework { return ProcessQueue(m_dhttpMethod,agentID, caps); })); - - bool boolval = false; + // This will persist this beyond the expiry of the caps handlers - boolval = m_scene.AddHTTPHandler(capsBase + EventQueueGetUUID.ToString() + "/", EventQueuePath2); + m_scene.AddHTTPHandler(capsBase + EventQueueGetUUID.ToString() + "/", EventQueuePath2); Random rnd = new Random(System.Environment.TickCount); lock (m_ids) @@ -421,7 +420,7 @@ namespace OpenSim.Region.Environment.Modules.Framework string capuuid = path.Replace("/CAPS/EQG/",""); capuuid = capuuid.Substring(0, capuuid.Length - 1); - UUID AvatarID = UUID.Zero; +// UUID AvatarID = UUID.Zero; UUID capUUID = UUID.Zero; if (UUID.TryParse(capuuid, out capUUID)) { -- cgit v1.1