mirror of
https://github.com/opensim/opensim.git
synced 2026-05-28 04:45:37 +08:00
To use , both the user server and Inventory server need to be running this latest revision. (older regions should be able to still be used, just the user won't have inventory on them). Also and HERE IS THE BIG BREAK ISSUE, currently, so that the initial inventory details for a user are added to the inventory db , you need to recreate the accounts using the user server "create user" feature. It should be quite easy to manual populate the inventory database instead but I someone else will need to look into that) Also I've only tested using SQLite as the database provider, there is a Mysql inventory provider but I don't know if it works (SQLite is set as default, so you will need to change it in the inventory server config.xml)
73 lines
3.4 KiB
C#
73 lines
3.4 KiB
C#
namespace OpenSim.Framework
|
|
{
|
|
/// <summary>
|
|
/// UserConfig -- For User Server Configuration
|
|
/// </summary>
|
|
public class InventoryConfig
|
|
{
|
|
public string DefaultStartupMsg = "";
|
|
public string UserServerURL = "";
|
|
public string UserSendKey = "";
|
|
public string UserRecvKey = "";
|
|
|
|
public string DatabaseProvider = "";
|
|
public static uint DefaultHttpPort = 8004;
|
|
|
|
public int HttpPort = 8004;
|
|
|
|
private ConfigurationMember configMember;
|
|
|
|
public InventoryConfig(string description, string filename)
|
|
{
|
|
configMember =
|
|
new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration);
|
|
configMember.performConfigurationRetrieve();
|
|
}
|
|
|
|
public void loadConfigurationOptions()
|
|
{
|
|
configMember.addConfigurationOption("default_startup_message",
|
|
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
|
|
"Default Startup Message", "Welcome to OGS", false);
|
|
configMember.addConfigurationOption("default_user_server",
|
|
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
|
|
"Default User Server URI",
|
|
"http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString(), false);
|
|
configMember.addConfigurationOption("user_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
|
|
"Key to send to user server", "null", false);
|
|
configMember.addConfigurationOption("user_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
|
|
"Key to expect from user server", "null", false);
|
|
configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
|
|
"DLL for database provider", "OpenSim.Framework.Data.SQLite.dll", false);
|
|
configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
|
|
"Http Listener port", DefaultHttpPort.ToString(), false);
|
|
}
|
|
|
|
public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
|
|
{
|
|
switch (configuration_key)
|
|
{
|
|
case "default_startup_message":
|
|
DefaultStartupMsg = (string) configuration_result;
|
|
break;
|
|
case "default_user_server":
|
|
UserServerURL = (string) configuration_result;
|
|
break;
|
|
case "user_send_key":
|
|
UserSendKey = (string) configuration_result;
|
|
break;
|
|
case "user_recv_key":
|
|
UserRecvKey = (string) configuration_result;
|
|
break;
|
|
case "database_provider":
|
|
DatabaseProvider = (string) configuration_result;
|
|
break;
|
|
case "http_port":
|
|
HttpPort = (int) configuration_result;
|
|
break;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
}
|
|
} |