From e9c2beadecf8f531d2bbfcd3f44636cfeff08667 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 11 Apr 2011 20:43:11 +0100 Subject: Add more instructions to OpenSim.ini.example to try and make it more understandable for new users. --- bin/OpenSim.ini.example | 103 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 68 insertions(+), 35 deletions(-) diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 5bac56e..390fe09 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -1,4 +1,22 @@ -;; A note on the format of this file +;; This is the main configuration file for OpenSimulator. If it's named OpenSim.ini +;; then it will be loaded by OpenSimulator. If it's named OpenSim.ini.example then +;; you will need to copy it to OpenSim.ini first (if that file does not already exist) +;; +;; If you are copying, then once you have copied OpenSim.ini.example to OpenSim.ini you will +;; need to pick an architecture in the [Architecture] section at the end of this file. +;; +;; The settings in this file are in the form " = ". For example, save_crashes = false +;; in the [Startup] section below. +;; +;; All settings are initially commented out and the default value used, as found in +;; OpenSimDefaults.ini. To change a setting, first uncomment it by deleting the initial semicolon (;) +;; and then change the value. This will override the value in OpenSimDefaults.ini +;; +;; If you want to find out what configuration OpenSimulator has used then type "config get" on the +;; region console command line. +;; +;; +;; NOTES FOR DEVELOPERS REGARDING FORMAT OF TIHS FILE ;; ;; All leading white space is ignored, but preserved. ;; @@ -8,15 +26,14 @@ ;; formatted as: ;; {option} {depends on} {question to ask} {choices} default value ;; Any text comments following the declaration, up to the next blank line. -;; will be copied to the generated file. -;; A * in the choices list will allow an empty entry.\ +;; will be copied to the generated file (NOTE: generation is not yet implemented) +;; A * in the choices list will allow an empty entry. ;; An empty question will set the default if the dependencies are ;; satisfied. ;; -;; ; denotes a commented out option. Uncomment it to actvate it -;; and change it to the desired value -;; Any options added to OpenSim.ini.exmaple must be commented out, -;; and their value must represent the default. +;; ; denotes a commented out option. +;; Any options added to OpenSim.ini.example should be initially commented out. + [Startup] ;# {save_crashes} {} {Save crashes to disk?} {true false} false @@ -35,7 +52,7 @@ ;; Determine where OpenSimulator looks for the files which tell it ;; which regions to server - ;; Defaults to "filesystem" if this setting isn't present + ;; Default is "filesystem" ; region_info_source = "filesystem" ; region_info_source = "web" @@ -131,6 +148,7 @@ ;; ZeroMesher is faster but leaves the physics engine to model the mesh ;; using the basic shapes that it supports. ;; Usually this is only a box. + ;; Default is Meshmerizer ; meshing = Meshmerizer ; meshing = ZeroMesher @@ -138,6 +156,7 @@ ;; OpenDynamicsEngine is by some distance the most developed physics engine ;; basicphysics effectively does not model physics at all, making all ;; objects phantom + ;; Default is OpenDynamicsEngine ; physics = OpenDynamicsEngine ; physics = basicphysics ; physics = POS @@ -154,7 +173,6 @@ ;; permission checks (allowing anybody to copy ;; any item, etc. This may not yet be implemented uniformally. ;; If set to true, then all permissions checks are carried out - ;; Default is false ; serverside_object_permissions = false ;; This allows users with a UserLevel of 200 or more to assume god @@ -188,6 +206,7 @@ ;; server to send mail through. ; emailmodule = DefaultEmailModule + [SMTP] ;; The SMTP server enabled the email module to send email to external ;; destinations. @@ -214,6 +233,7 @@ ;# {SMTP_SERVER_PASSWORD} {[Startup]emailmodule:DefaultEmailModule enabled:true} {SMTP server password} {} ; SMTP_SERVER_PASSWORD = "" + [Network] ;; Configure the remote console user here. This will not actually be used ;; unless you use -console=rest at startup. @@ -247,6 +267,7 @@ ;; " (Mozilla Compatible)" to the text where there are problems with a web server ; user_agent = "OpenSim LSL (Mozilla Compatible)" + [ClientStack.LindenUDP] ;; See OpensSimDefaults.ini for the throttle options. You can copy the ;; relevant sections and override them here. @@ -263,17 +284,18 @@ ;; building's lights to possibly not be rendered. ; DisableFacelights = "false" + [Chat] ;# {whisper_distance} {} {Distance at which a whisper is heard, in meters?} {} 10 - ;; Distance in meters that whispers should travel. Default is 10m + ;; Distance in meters that whispers should travel. ; whisper_distance = 10 ;# {say_distance} {} {Distance at which normal chat is heard, in meters? (SL uses 20 here)} {} 30 - ;; Distance in meters that ordinary chat should travel. Default is 30m + ;; Distance in meters that ordinary chat should travel. ; say_distance = 30 ;# {shout_distance} {Distance at which a shout is heard, in meters?} {} 100 - ;; Distance in meters that shouts should travel. Default is 100m + ;; Distance in meters that shouts should travel. ; shout_distance = 100 @@ -337,13 +359,13 @@ ;# {create_region_enable_voice} {enabled:true} {Enable voice for newly created regions?} {true false} false ;; set this variable to true if you want the create_region XmlRpc ;; call to unconditionally enable voice on all parcels for a newly - ;; created region [default: false] + ;; created region ; create_region_enable_voice = false ;# {create_region_public} {enabled:true} {Make newly created regions public?} {true false} false ;; set this variable to false if you want the create_region XmlRpc ;; call to create all regions as private per default (can be - ;; overridden in the XmlRpc call) [default: true] + ;; overridden in the XmlRpc call) ; create_region_public = false ;# {enabled_methods} {enabled:true} {List of methods to allow, separated by |} {} all @@ -372,15 +394,16 @@ ;; default avatars ; default_appearance = default_appearance.xml + [Wind] ;# {enabled} {} {Enable wind module?} {true false} true - ;; Enables the wind module. Default is true - ;enabled = true + ;; Enables the wind module. + ; enabled = true ;# {wind_update_rate} {enabled:true} {Wind update rate in frames?} {} 150 ;; How often should wind be updated, as a function of world frames. ;; Approximately 50 frames a second - wind_update_rate = 150 + ; wind_update_rate = 150 ;; The Default Wind Plugin to load ; wind_plugin = SimpleRandomWind @@ -396,9 +419,10 @@ ;# {strength} {enabled:true wind_plugin:SimpleRandomWind} {Wind strength?} {} 1.0 ;; This setting is specific to the SimpleRandomWind plugin - ;; Adjusts wind strength. 0.0 = no wind, 1.0 = normal wind. Default is 1.0 + ;; Adjusts wind strength. 0.0 = no wind, 1.0 = normal wind. ; strength = 1.0 + [LightShare] ;# {enable_windlight} {} {Enable LightShare technology?} {true false} false ;; This enables the transmission of Windlight scenes to supporting clients, @@ -406,7 +430,8 @@ ;; It has no ill effect on viewers which do not support server-side ;; windlight settings. ;; Currently we only have support for MySQL databases. - ; enable_windlight = false; + ; enable_windlight = false + [DataSnapshot] ;# {index_sims} {} {Enable data snapshotting (search)?} {true false} false @@ -417,7 +442,6 @@ ;; and you can ignore the rest of these search-related configs. ; index_sims = false - ;# {data_exposure} {index_sims:true} {How much data should be exposed?} {minimum all} minimum ;; The variable data_exposure controls what the regions expose: ;; minimum: exposes only things explicitly marked for search @@ -462,6 +486,7 @@ ;; Money Unit fee to create groups ; PriceGroupCreate = 0 + [XEngine] ;# {Enabled} {} {Enable the XEngine scripting engine?} {true false} true ;; Enable this engine in this OpenSim instance @@ -556,9 +581,9 @@ ;; Default is ./bin/ScriptEngines ; ScriptEnginesPath = "ScriptEngines" + [MRM] ;; Enables the Mini Region Modules Script Engine. - ;; default is false ; Enabled = false ;; Runs MRM in a Security Sandbox @@ -580,6 +605,7 @@ ;; May represent a security risk if you disable this. ; OwnerOnly = true + [FreeSwitchVoice] ;; In order for this to work you need a functioning FreeSWITCH PBX set up. ;; Configuration details at http://opensimulator.org/wiki/Freeswitch_Module @@ -593,6 +619,7 @@ ;; If using a remote module, specify the server URL ; FreeswitchServiceURL = http://my.grid.server:8003/fsapi + [FreeswitchService] ;; !!!!!!!!!!!!!!!!!!!!!!!!!!! ;; !!!!!!STANDALONE ONLY!!!!!! @@ -611,6 +638,7 @@ ; UserName = "freeswitch" ; Password = "password" + [Groups] ;# {Enabled} {} {Enable groups?} {true false} false ;; Enables the groups module @@ -634,7 +662,7 @@ ;# {ServicesConnectorModule} {Module:GroupsModule} {Service connector to use for groups} {XmlRpcGroupsServicesConnector SimianGroupsServicesConnector} XmlRpcGroupsServicesConnector ;; Service connectors to the Groups Service as used in the GroupsModule. Select one depending on ;; whether you're using a Flotsam XmlRpc backend or a SimianGrid backend - ; ServicesConnectorModule = SimianGroupsServicesConnector + ; ServicesConnectorModule = XmlRpcGroupsServicesConnector ;# {GroupsServerURI} {Module:GroupsModule} {Groups Server URI} {} ;; URI for the groups services @@ -654,6 +682,7 @@ ; XmlRpcServiceReadKey = 1234 ; XmlRpcServiceWriteKey = 1234 + [InterestManagement] ;# {UpdatePrioritizationScheme} {} {Update prioritization scheme?} {BestAvatarResponsiveness Time Distance SimpleAngularDistance FrontBack} BestAvatarResponsiveness ;; This section controls how state updates are prioritized for each client @@ -661,24 +690,28 @@ ;; SimpleAngularDistance, FrontBack ; UpdatePrioritizationScheme = BestAvatarResponsiveness + [MediaOnAPrim] ;# {Enabled} {} {Enable Media-on-a-Prim (MOAP)} {true false} true ;; Enable media on a prim facilities ; Enabled = true; + [Architecture] ;# {Include-Architecture} {} {Choose one of the following architectures} {config-include/Standalone.ini config-include/StandaloneHypergrid.ini config-include/Grid.ini config-include/GridHypergrid.ini config-include/SimianGrid.ini config-include/HyperSimianGrid.ini} config-include/Standalone.ini - ;; Choose one of these architecture includes: - ;; Include-Architecture = "config-include/Standalone.ini" - ;; Include-Architecture = "config-include/StandaloneHypergrid.ini" - ;; Include-Architecture = "config-include/Grid.ini" - ;; Include-Architecture = "config-include/GridHypergrid.ini" - ;; Include-Architecture = "config-include/SimianGrid.ini" - ;; Include-Architecture = "config-include/HyperSimianGrid.ini" + ;; Uncomment one of the following includes as required. For instance, to create a standalone OpenSim, + ;; uncomment Include-Architecture = "config-include/Standalone.ini" + ;; + ;; Then you will need to copy and edit the corresponding *Common.example file in config-include/ + ;; that the referenced .ini file goes on to include. + ;; + ;; For instance, if you chose "config-include/Standalone.ini" then you will need to copy + ;; "config-include/StandaloneCommon.ini.example" to "config-include/StandaloneCommon.ini" before + ;; editing it to set the database and backend services that OpenSim will use. + ;; ; Include-Architecture = "config-include/Standalone.ini" - - ;; Then choose - ;; config-include/StandaloneCommon.ini.example (if you're in standlone) OR - ;; config-include/GridCommon.ini.example (if you're connected to a grid) - ;; Copy to your own .ini there (without .example extension) and edit it - ;; to customize your data + ; Include-Architecture = "config-include/StandaloneHypergrid.ini" + ; Include-Architecture = "config-include/Grid.ini" + ; Include-Architecture = "config-include/GridHypergrid.ini" + ; Include-Architecture = "config-include/SimianGrid.ini" + ; Include-Architecture = "config-include/HyperSimianGrid.ini" -- cgit v1.1 From fda393b088e625b5811520af6bd502e2471cd8e7 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 11 Apr 2011 21:42:28 +0100 Subject: Add information comment to top of OpenSimDefaults.ini and make file consistent --- bin/OpenSimDefaults.ini | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 96ffb7e..d6eee0e 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -1,3 +1,7 @@ +; This file contains defaults for various settings in OpenSimulator. These can be overriden +; by changing the same setting in OpenSim.ini (once OpenSim.ini.example has been copied to OpenSim.ini). + + [Startup] ; Set this to true if you want to log crashes to disk ; this can be useful when submitting bug reports. @@ -287,6 +291,7 @@ ;SMTP_SERVER_LOGIN=foo ;SMTP_SERVER_PASSWORD=bar + [Network] ConsoleUser = "Test" ConsolePass = "secret" @@ -317,6 +322,7 @@ ; " (Mozilla Compatible)" to the text where there are problems with a web server ;user_agent = "OpenSim LSL (Mozilla Compatible)" + [XMLRPC] ; ## ; ## Scripting XMLRPC mapper @@ -330,6 +336,7 @@ ;XmlRpcRouterModule = "XmlRpcRouterModule" ;XmlRpcPort = 20800 + [ClientStack.LindenUDP] ; Set this to true to process incoming packets asynchronously. Networking is ; already separated from packet handling with a queue, so this will only @@ -422,6 +429,7 @@ ; ;DisableFacelights = "false" + [Chat] ; Controls whether the chat module is enabled. Default is true. enabled = true; @@ -680,6 +688,7 @@ ; path to default appearance XML file that specifies the look of the default avatars ;default_appearance = default_appearance.xml + [RestPlugins] ; Change this to true to enable REST Plugins. This must be true if you wish to use ; REST Region or REST Asset and Inventory Plugins @@ -706,11 +715,10 @@ flush-on-error = true -; Uncomment the following for IRC bridge -; experimental, so if it breaks... keep both parts... yada yada +; IRC bridge is experimental, so if it breaks... keep both parts... yada yada ; also, not good error detection when it fails -;[IRC] - ;enabled = true ; you need to set this otherwise it won't connect +[IRC] + enabled = false; you need to set this to true otherwise it won't connect ;server = name.of.irc.server.on.the.net ;; user password - only use this if the server requires one ;password = mypass @@ -767,14 +775,14 @@ ;exclude_list=User 1,User 2,User 3 -;[CMS] - ;enabled = true +[CMS] + enabled = false ;channel = 345 -; Uncomment the following to control the progression of daytime -; in the Sim. The defaults are what is shown below -;[Sun] +; The following settings control the progression of daytime +; in the Sim. The defaults are the same as the commented out settings +[Sun] ; number of wall clock hours for an opensim day. 24.0 would mean realtime ;day_length = 4 ; Year length in days @@ -821,12 +829,13 @@ ; default is 1000 cloud_update_rate = 1000 -[LightShare] +[LightShare] ; This enables the transmission of Windlight scenes to supporting clients, such as the Meta7 viewer. ; It has no ill effect on viewers which do not support server-side windlight settings. ; Currently we only have support for MySQL databases. - enable_windlight = false; + enable_windlight = false + [Trees] ; Enable this to allow the tree module to manage your sim trees, including growing, reproducing and dying @@ -838,7 +847,6 @@ [VectorRender] - ; the font to use for rendering text (default: Arial) ; font_name = "Arial" @@ -1032,6 +1040,7 @@ ;; Path to script assemblies ; ScriptEnginesPath = "ScriptEngines" + [OpenGridProtocol] ;These are the settings for the Open Grid Protocol.. the Agent Domain, Region Domain, you know.. ;On/true or Off/false @@ -1240,11 +1249,11 @@ ChildReprioritizationDistance = 20.0 -[WebStats] ; View region statistics via a web page ; See http://opensimulator.org/wiki/FAQ#Region_Statistics_on_a_Web_Page ; Use a web browser and type in the "Login URI" + "/SStats/" ; For example- http://127.0.0.1:9000/SStats/ +[WebStats] ; enabled=false -- cgit v1.1 From d6948b15c47fd067be6d7cef31caf8e49e9c9afa Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 11 Apr 2011 21:51:17 +0100 Subject: Make it more obvious when it happens that DLL plugin loading fails. Improve exception output on Windows. --- OpenSim/Region/Framework/ModuleLoader.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Framework/ModuleLoader.cs b/OpenSim/Region/Framework/ModuleLoader.cs index 23be9c2..14ecd44 100644 --- a/OpenSim/Region/Framework/ModuleLoader.cs +++ b/OpenSim/Region/Framework/ModuleLoader.cs @@ -223,7 +223,8 @@ namespace OpenSim.Region.Framework catch (Exception e) { m_log.ErrorFormat( - "[MODULES]: Could not load types for [{0}]. Exception {1}", pluginAssembly.FullName, e); + "[MODULES]: Could not load types for plugin DLL {0}. Exception {1} {2}", + pluginAssembly.FullName, e.Message, e.StackTrace); // justincc: Right now this is fatal to really get the user's attention throw e; -- cgit v1.1 From 0bd6bc8fba1ed35344218e2aa25e30a3294f2ed1 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 11 Apr 2011 21:59:26 +0100 Subject: create "config show" as a region console command synonym for "config get". This is to create greater consistency with all the other show commands. --- OpenSim/Region/Application/OpenSim.cs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index ec1fb04..39004d4 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -341,10 +341,15 @@ namespace OpenSim m_console.Commands.AddCommand("region", false, "config get", "config get [
] []", - "Show a config option", + "Synonym for config show", + HandleConfig); + + m_console.Commands.AddCommand("region", false, "config show", + "config show [
] []", + "Show config information", "If neither section nor field are specified, then the whole current configuration is printed." + Environment.NewLine + "If a section is given but not a field, then all fields in that section are printed.", - HandleConfig); + HandleConfig); m_console.Commands.AddCommand("region", false, "config save", "config save ", @@ -593,7 +598,9 @@ namespace OpenSim if (cmdparams.Length > 0) { - switch (cmdparams[0].ToLower()) + string firstParam = cmdparams[0].ToLower(); + + switch (firstParam) { case "set": if (cmdparams.Length < 4) @@ -618,6 +625,7 @@ namespace OpenSim break; case "get": + case "show": if (cmdparams.Length == 1) { foreach (IConfig config in m_config.Source.Configs) @@ -654,8 +662,8 @@ namespace OpenSim } else { - Notice("Syntax: config get [
] []"); - Notice("Example: config get ScriptEngine.DotNetEngine NumberOfScriptThreads"); + Notice("Syntax: config {0} [
] []", firstParam); + Notice("Example: config {0} ScriptEngine.DotNetEngine NumberOfScriptThreads", firstParam); } break; -- cgit v1.1 From 333a2913cfb8b536939b1d9d4b3ac6ea59dd55ca Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 11 Apr 2011 22:02:12 +0100 Subject: slightly tweak OpenSim.ini.example text --- bin/OpenSim.ini.example | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 390fe09..55723d1 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -12,8 +12,8 @@ ;; OpenSimDefaults.ini. To change a setting, first uncomment it by deleting the initial semicolon (;) ;; and then change the value. This will override the value in OpenSimDefaults.ini ;; -;; If you want to find out what configuration OpenSimulator has used then type "config get" on the -;; region console command line. +;; If you want to find out what configuration OpenSimulator has finished with once all the configuration +;; files are loaded then type "config show" on the region console command line. ;; ;; ;; NOTES FOR DEVELOPERS REGARDING FORMAT OF TIHS FILE -- cgit v1.1 From 464fa45ec90767af13bd8edcc7c67de4ec3db6a7 Mon Sep 17 00:00:00 2001 From: E. Allen Soard Date: Fri, 8 Apr 2011 18:30:20 -0700 Subject: Implimented HTTP_VERIFY_CERT for llHttpRequest --- .../Scripting/HttpRequest/ScriptsHttpRequests.cs | 34 ++++++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs index d78931a..a37c781 100644 --- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs +++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs @@ -29,8 +29,10 @@ using System; using System.Collections.Generic; using System.IO; using System.Net; +using System.Net.Security; using System.Text; using System.Threading; +using System.Security.Cryptography.X509Certificates; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; @@ -84,6 +86,7 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.CoreModules.Scripting.HttpRequest { + public class HttpRequestModule : IRegionModule, IHttpRequestModule { private object HttpListLock = new object(); @@ -100,8 +103,23 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest public HttpRequestModule() { + ServicePointManager.ServerCertificateValidationCallback +=ValidateServerCertificate; } + public static bool ValidateServerCertificate( + object sender, + X509Certificate certificate, + X509Chain chain, + SslPolicyErrors sslPolicyErrors) + { + HttpWebRequest Request = (HttpWebRequest)sender; + + if(Request.Headers.Get("NoVerifyCert") != null) + { + return true; + } + return chain.Build(new X509Certificate2(certificate)); + } #region IHttpRequestModule Members public UUID MakeHttpRequest(string url, string parameters, string body) @@ -141,8 +159,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest break; case (int)HttpRequestConstants.HTTP_VERIFY_CERT: - - // TODO implement me + htc.HttpVerifyCert = (int.Parse(parms[i + 1]) != 0); break; } } @@ -282,7 +299,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest public string HttpMethod = "GET"; public string HttpMIMEType = "text/plain;charset=utf-8"; public int HttpTimeout; - // public bool HttpVerifyCert = true; // not implemented + public bool HttpVerifyCert = true; // not implemented private Thread httpThread; // Request info @@ -344,6 +361,17 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest Request.Method = HttpMethod; Request.ContentType = HttpMIMEType; + if(!HttpVerifyCert) + { + // Connection Group Name is probably not used so we hijack it to identify + // a desired security exception +// Request.ConnectionGroupName="NoVerify"; + Request.Headers.Add("NoVerifyCert" , "true"); + } +// else +// { +// Request.ConnectionGroupName="Verify"; +// } if (proxyurl != null && proxyurl.Length > 0) { if (proxyexcepts != null && proxyexcepts.Length > 0) -- cgit v1.1 From 3a98fb080a751d21999bb2baa769462426b5d776 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 11 Apr 2011 22:29:08 +0100 Subject: minor: adjust some spacing and indentation --- .../Scripting/HttpRequest/ScriptsHttpRequests.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs index a37c781..23e15ef 100644 --- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs +++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs @@ -86,7 +86,6 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.CoreModules.Scripting.HttpRequest { - public class HttpRequestModule : IRegionModule, IHttpRequestModule { private object HttpListLock = new object(); @@ -114,10 +113,11 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest { HttpWebRequest Request = (HttpWebRequest)sender; - if(Request.Headers.Get("NoVerifyCert") != null) + if (Request.Headers.Get("NoVerifyCert") != null) { return true; } + return chain.Build(new X509Certificate2(certificate)); } #region IHttpRequestModule Members @@ -206,7 +206,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest * Not sure how important ordering is is here - the next first * one completed in the list is returned, based soley on its list * position, not the order in which the request was started or - * finsihed. I thought about setting up a queue for this, but + * finished. I thought about setting up a queue for this, but * it will need some refactoring and this works 'enough' right now */ @@ -254,8 +254,8 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest m_scene.RegisterModuleInterface(this); - m_proxyurl = config.Configs["Startup"].GetString("HttpProxy"); - m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions"); + m_proxyurl = config.Configs["Startup"].GetString("HttpProxy"); + m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions"); m_pendingRequests = new Dictionary(); } @@ -363,10 +363,10 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest if(!HttpVerifyCert) { - // Connection Group Name is probably not used so we hijack it to identify - // a desired security exception -// Request.ConnectionGroupName="NoVerify"; - Request.Headers.Add("NoVerifyCert" , "true"); + // We could hijack Connection Group Name to identify + // a desired security exception. But at the moment we'll use a dummy header instead. +// Request.ConnectionGroupName = "NoVerify"; + Request.Headers.Add("NoVerifyCert", "true"); } // else // { @@ -464,4 +464,4 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest } } } -} +} \ No newline at end of file -- cgit v1.1 From e8ecb2898c55bb97d47e9b1efb7dac98d40609cd Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 11 Apr 2011 22:33:24 +0100 Subject: minor: remove some mono compiler warnings --- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index c16a985..aa28fa0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -10289,12 +10289,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { UUID rq = UUID.Random(); - UUID tid = AsyncCommands. - DataserverPlugin.RegisterRequest(m_localID, - m_itemID, rq.ToString()); + AsyncCommands.DataserverPlugin.RegisterRequest(m_localID, m_itemID, rq.ToString()); - AsyncCommands. - DataserverPlugin.DataserverReply(rq.ToString(), Name2Username(llKey2Name(id))); + AsyncCommands.DataserverPlugin.DataserverReply(rq.ToString(), Name2Username(llKey2Name(id))); return rq.ToString(); } @@ -10308,12 +10305,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { UUID rq = UUID.Random(); - UUID tid = AsyncCommands. - DataserverPlugin.RegisterRequest(m_localID, - m_itemID, rq.ToString()); + AsyncCommands.DataserverPlugin.RegisterRequest(m_localID, m_itemID, rq.ToString()); - AsyncCommands. - DataserverPlugin.DataserverReply(rq.ToString(), llKey2Name(id)); + AsyncCommands.DataserverPlugin.DataserverReply(rq.ToString(), llKey2Name(id)); return rq.ToString(); } -- cgit v1.1 From 64dc7e9f141fd0f168ed90c11f932a8bdb077dc7 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 11 Apr 2011 22:35:07 +0100 Subject: minor: remove now inaccurate comment --- OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs index 23e15ef..4c8424d 100644 --- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs +++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs @@ -299,7 +299,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest public string HttpMethod = "GET"; public string HttpMIMEType = "text/plain;charset=utf-8"; public int HttpTimeout; - public bool HttpVerifyCert = true; // not implemented + public bool HttpVerifyCert = true; private Thread httpThread; // Request info -- cgit v1.1 From 49d80f5711e1bc1afb6c650038619ade6d9a9e97 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 11 Apr 2011 23:07:56 +0100 Subject: Include code to return more information about the NullReferenceException seen in http://opensimulator.org/mantis/view.php?id=5403 prior to doing something about it. --- OpenSim/Data/MySQL/MySQLGenericTableHandler.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs index 8efe4e9..50b6dbe 100644 --- a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs +++ b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs @@ -39,6 +39,8 @@ namespace OpenSim.Data.MySQL { public class MySQLGenericTableHandler : MySqlFramework where T: class, new() { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + protected Dictionary m_Fields = new Dictionary(); @@ -217,7 +219,6 @@ namespace OpenSim.Data.MySQL { using (MySqlCommand cmd = new MySqlCommand()) { - string query = ""; List names = new List(); List values = new List(); @@ -226,6 +227,16 @@ namespace OpenSim.Data.MySQL { names.Add(fi.Name); values.Add("?" + fi.Name); + + // Temporarily return more information about what field is unexpectedly null for + // http://opensimulator.org/mantis/view.php?id=5403. This might be due to a bug in the + // InventoryTransferModule or we may be required to substitute a DBNull here. + if (fi.GetValue(row) == null) + throw new NullReferenceException( + string.Format( + "[MYSQL GENERIC TABLE HANDLER]: Trying to store field {0} for {1} which is unexpectedly null", + fi.Name, row)); + cmd.Parameters.AddWithValue(fi.Name, fi.GetValue(row).ToString()); } @@ -268,4 +279,4 @@ namespace OpenSim.Data.MySQL } } } -} +} \ No newline at end of file -- cgit v1.1 From 621d5b58e1a9bc24aab384a5e9bd6eb881928505 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 11 Apr 2011 23:56:04 +0100 Subject: minor: add a bit more method doc to IInventoryService.GetItem() --- OpenSim/Services/Interfaces/IInventoryService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Services/Interfaces/IInventoryService.cs b/OpenSim/Services/Interfaces/IInventoryService.cs index d19faed..a8bfe47 100644 --- a/OpenSim/Services/Interfaces/IInventoryService.cs +++ b/OpenSim/Services/Interfaces/IInventoryService.cs @@ -169,7 +169,7 @@ namespace OpenSim.Services.Interfaces /// Get an item, given by its UUID /// /// - /// + /// null if no item was found, otherwise the found item InventoryItemBase GetItem(InventoryItemBase item); /// -- cgit v1.1