Merge branch 'master' into queuetest

bulletsim
Mic Bowman 2011-04-12 12:38:47 -07:00
commit 0e97629ee7
8 changed files with 158 additions and 74 deletions

View File

@ -39,6 +39,8 @@ namespace OpenSim.Data.MySQL
{
public class MySQLGenericTableHandler<T> : MySqlFramework where T: class, new()
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
protected Dictionary<string, FieldInfo> m_Fields =
new Dictionary<string, FieldInfo>();
@ -217,7 +219,6 @@ namespace OpenSim.Data.MySQL
{
using (MySqlCommand cmd = new MySqlCommand())
{
string query = "";
List<String> names = new List<String>();
List<String> values = new List<String>();
@ -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());
}

View File

@ -341,7 +341,12 @@ namespace OpenSim
m_console.Commands.AddCommand("region", false, "config get",
"config get [<section>] [<key>]",
"Show a config option",
"Synonym for config show",
HandleConfig);
m_console.Commands.AddCommand("region", false, "config show",
"config show [<section>] [<key>]",
"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);
@ -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 [<section>] [<key>]");
Notice("Example: config get ScriptEngine.DotNetEngine NumberOfScriptThreads");
Notice("Syntax: config {0} [<section>] [<key>]", firstParam);
Notice("Example: config {0} ScriptEngine.DotNetEngine NumberOfScriptThreads", firstParam);
}
break;

View File

@ -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;
@ -100,8 +102,24 @@ 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;
}
}
@ -189,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
*/
@ -237,8 +254,8 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
m_scene.RegisterModuleInterface<IHttpRequestModule>(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<UUID, HttpRequestClass>();
}
@ -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;
private Thread httpThread;
// Request info
@ -344,6 +361,17 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
Request.Method = HttpMethod;
Request.ContentType = HttpMIMEType;
if(!HttpVerifyCert)
{
// 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
// {
// Request.ConnectionGroupName="Verify";
// }
if (proxyurl != null && proxyurl.Length > 0)
{
if (proxyexcepts != null && proxyexcepts.Length > 0)

View File

@ -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;

View File

@ -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();
}

View File

@ -169,7 +169,7 @@ namespace OpenSim.Services.Interfaces
/// Get an item, given by its UUID
/// </summary>
/// <param name="item"></param>
/// <returns></returns>
/// <returns>null if no item was found, otherwise the found item</returns>
InventoryItemBase GetItem(InventoryItemBase item);
/// <summary>

View File

@ -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 "<key> = <value>". 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 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
;;
;; 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"

View File

@ -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