From 6d774339d9c51c1635e96cd92f57a8bc13021e5f Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Fri, 29 Feb 2008 10:51:40 +0000 Subject: [PATCH] More compiler warning cleanup. Removed verbose flag, since it doesn't do anything any more. --- OpenSim/Framework/Servers/BaseHttpServer.cs | 20 +++++++------------ OpenSim/Region/Application/Application.cs | 1 - OpenSim/Region/Application/OpenSimMain.cs | 5 ----- .../Modules/AssetDownloadModule.cs | 8 +++----- bin/OpenSim.ini.example | 5 +---- 5 files changed, 11 insertions(+), 28 deletions(-) diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index e61cc804fb..a61c177169 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs @@ -25,6 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ + using System; using System.Collections; using System.Collections.Generic; @@ -121,7 +122,6 @@ namespace OpenSim.Framework.Servers HttpListenerRequest request = context.Request; HttpListenerResponse response = context.Response; - response.KeepAlive = false; response.SendChunked = false; @@ -160,7 +160,7 @@ namespace OpenSim.Framework.Servers response.OutputStream.Write(buffer, 0, buffer.Length); response.OutputStream.Close(); } - catch (HttpListenerException e) + catch (HttpListenerException) { m_log.InfoFormat("[BASEHTTPSERVER] Http request abnormally terminated."); } @@ -263,9 +263,8 @@ namespace OpenSim.Framework.Servers { xmlRprcRequest = (XmlRpcRequest) (new XmlRpcRequestDeserializer()).Deserialize(requestBody); } - catch (XmlException e) + catch (XmlException) { - } if (xmlRprcRequest != null) @@ -407,8 +406,6 @@ namespace OpenSim.Framework.Servers reader.Close(); requestStream.Close(); - string responseString = String.Empty; - Hashtable keysvals = new Hashtable(); Hashtable headervals = new Hashtable(); string host = String.Empty; @@ -416,11 +413,9 @@ namespace OpenSim.Framework.Servers string[] querystringkeys = request.QueryString.AllKeys; string[] rHeaders = request.Headers.AllKeys; - foreach (string queryname in querystringkeys) { keysvals.Add(queryname, request.QueryString[queryname]); - } foreach (string headername in rHeaders) @@ -447,7 +442,6 @@ namespace OpenSim.Framework.Servers DoHTTPGruntWork(responsedata,response); //SendHTML500(response); - } else { @@ -484,6 +478,7 @@ namespace OpenSim.Framework.Servers response.SendChunked = false; response.ContentLength64 = buffer.Length; response.ContentEncoding = Encoding.UTF8; + try { response.OutputStream.Write(buffer, 0, buffer.Length); @@ -496,9 +491,8 @@ namespace OpenSim.Framework.Servers { response.OutputStream.Close(); } - - } + public void SendHTML404(HttpListenerResponse response, string host) { // I know this statuscode is dumb, but the client doesn't respond to 404s and 500s @@ -511,6 +505,7 @@ namespace OpenSim.Framework.Servers response.SendChunked = false; response.ContentLength64 = buffer.Length; response.ContentEncoding = Encoding.UTF8; + try { response.OutputStream.Write(buffer, 0, buffer.Length); @@ -524,6 +519,7 @@ namespace OpenSim.Framework.Servers response.OutputStream.Close(); } } + public void SendHTML500(HttpListenerResponse response) { // I know this statuscode is dumb, but the client doesn't respond to 404s and 500s @@ -592,7 +588,6 @@ namespace OpenSim.Framework.Servers } } - public void RemoveStreamHandler(string httpMethod, string path) { m_streamHandlers.Remove(GetHandlerKey(httpMethod, path)); @@ -637,6 +632,5 @@ namespace OpenSim.Framework.Servers { return "500 Internal Server Error

Ooops!

The server you requested is overun by knomes! Find hippos quick!

"; } - } } diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index 0e2608ae7e..6faca1b93a 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs @@ -68,7 +68,6 @@ namespace OpenSim configSource.AddSwitch("Startup", "inifile"); configSource.AddSwitch("Startup", "gridmode"); configSource.AddSwitch("Startup", "physics"); - configSource.AddSwitch("Startup", "verbose"); configSource.AddSwitch("Startup", "useexecutepath"); configSource.AddConfig("StandAlone"); diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 6e891435ae..bdefd0f4fb 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -78,7 +78,6 @@ namespace OpenSim protected List m_udpServers = new List(); protected List m_regionData = new List(); - private bool m_verbose; private bool m_physicalPrim; private bool m_permissions = false; @@ -173,7 +172,6 @@ namespace OpenSim { config.Set("gridmode", false); config.Set("physics", "basicphysics"); - config.Set("verbose", true); config.Set("physical_prim", true); config.Set("see_into_this_sim_from_neighbor", true); config.Set("serverside_object_permissions", false); @@ -241,9 +239,6 @@ namespace OpenSim m_physicsEngine = startupConfig.GetString("physics", "basicphysics"); m_meshEngineName = startupConfig.GetString("meshing", "ZeroMesher"); - // TODO: since log4net changes, verbose flag doesn't do anything - m_verbose = startupConfig.GetBoolean("verbose", true); - m_physicalPrim = startupConfig.GetBoolean("physical_prim", true); m_see_into_region_from_neighbor = startupConfig.GetBoolean("see_into_this_sim_from_neighbor", true); diff --git a/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs b/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs index f53be4157c..33c0ce27be 100644 --- a/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs +++ b/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs @@ -131,7 +131,6 @@ namespace OpenSim.Region.Environment.Modules { if (!userRequests.ContainsKey(requestID)) { - AssetRequest request = new AssetRequest(); request.RequestUser = userInfo; request.RequestAssetID = requestID; @@ -154,9 +153,7 @@ namespace OpenSim.Region.Environment.Modules userRequests.Add(requestID, request); RequestedAssets[userInfo.AgentId] = userRequests; m_scene.AssetCache.GetAsset(requestID, AssetCallback, false); - } - return; } public void AssetCallback(LLUUID assetID, AssetBase asset) @@ -190,7 +187,7 @@ namespace OpenSim.Region.Environment.Modules ProcessAssetQueue(); Thread.Sleep(500); } - catch (Exception e) + catch (Exception) { // m_log.Error("[ASSET CACHE]: " + e.ToString()); } @@ -292,6 +289,7 @@ namespace OpenSim.Region.Environment.Modules AssetRequests.RemoveAt(0); } } + /// /// Calculate the number of packets required to send the asset to the client. /// @@ -335,4 +333,4 @@ namespace OpenSim.Region.Environment.Modules } } } -} \ No newline at end of file +} diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 084d9f7805..ff86bdf63e 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -61,13 +61,11 @@ physics = basicphysics ;physics = modified_BulletX -verbose = true startup_console_commands_file = "startup_commands.txt" shutdown_console_commands_file = "shutdown_commands.txt" serverside_object_permissions = false - -; if you would like to allow prim to be physical and move by physics with the physical checkbox in the client set this to true. +; if you would like to allow prims to be physical and move by physics with the physical checkbox in the client set this to true. physical_prim = true ; To run a script every few minutes, set the script filename here @@ -264,4 +262,3 @@ CleanUpOldScriptsOnStartup=true [LL-Functions] ; Set the following to true to allow administrator owned scripts to execute console commands AllowosConsoleCommand=false -