diff --git a/OpenSim/Framework/Communications/Cache/AssetTransactions.cs b/OpenSim/Framework/Communications/Cache/AssetTransactions.cs index cea6e6e2d9..7f527393b7 100644 --- a/OpenSim/Framework/Communications/Cache/AssetTransactions.cs +++ b/OpenSim/Framework/Communications/Cache/AssetTransactions.cs @@ -262,7 +262,7 @@ namespace OpenSim.Framework.Communications.Caches { DoCreateItem(); } - Console.WriteLine("upload complete "+ this.TransactionID); + // Console.WriteLine("upload complete "+ this.TransactionID); //SaveAssetToFile("testudpupload" + Util.RandomClass.Next(1, 1000) + ".dat", this.Asset.Data); } private void SaveAssetToFile(string filename, byte[] data) @@ -319,6 +319,11 @@ namespace OpenSim.Framework.Communications.Caches ourClient.SendInventoryItemUpdate(item); } } + + public void UpdateInventoryItem(LLUUID itemID) + { + + } } public class NoteCardCapsUpdate diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 2ca3f466df..0114cc6a69 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -74,7 +74,9 @@ namespace OpenSim private string m_logFilename = ("region-console.log"); private bool standaloneAuthenticate = false; - private string welcomeMessage = null; + private string standaloneWelcomeMessage = null; + private string standaloneInventoryPlugin = ""; + private string standaloneUserPlugin = ""; public ConsoleCommand CreateAccount = null; @@ -109,8 +111,10 @@ namespace OpenSim m_startupCommandsFile = configSource.Configs["Startup"].GetString("startup_console_commands_file", ""); - standaloneAuthenticate = configSource.Configs["Startup"].GetBoolean("standalone_authenticate", false); - welcomeMessage = configSource.Configs["Startup"].GetString("standalone_welcome", "Welcome to OpenSim"); + standaloneAuthenticate = configSource.Configs["StandAlone"].GetBoolean("accounts_authenticate", false); + standaloneWelcomeMessage = configSource.Configs["StandAlone"].GetString("welcome_message", "Welcome to OpenSim"); + standaloneInventoryPlugin = configSource.Configs["StandAlone"].GetString("inventory_plugin", "OpenSim.Framework.Data.SQLite.dll"); + standaloneUserPlugin = configSource.Configs["StandAlone"].GetString("userDatabase_plugin", "OpenSim.Framework.Data.DB4o.dll"); } /// @@ -130,7 +134,8 @@ namespace OpenSim if (m_sandbox) { - CommunicationsLocal localComms = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, standaloneAuthenticate, welcomeMessage); + CommunicationsLocal.LocalSettings settings = new CommunicationsLocal.LocalSettings(standaloneWelcomeMessage, standaloneAuthenticate, standaloneInventoryPlugin, standaloneUserPlugin); + CommunicationsLocal localComms = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, settings); m_commsManager = localComms; if(standaloneAuthenticate) { diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs index 9ff91336b1..66779a2f2d 100644 --- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs +++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs @@ -44,16 +44,19 @@ namespace OpenSim.Region.Communications.Local public LocalLoginService LoginServices; public LocalInventoryService InvenServices; // public CAPSService CapsServices; + private LocalSettings m_settings; - public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, bool accountsAuthenticate, string welcomeMessage ) + public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, LocalSettings settings ) : base(serversInfo, httpServer, assetCache) { + m_settings = settings; + InvenServices = new LocalInventoryService(); - InvenServices.AddPlugin("OpenSim.Framework.Data.SQLite.dll"); + InvenServices.AddPlugin(m_settings.InventoryPlugin); InventoryServer = InvenServices; UserServices = new LocalUserServices(this, serversInfo); - UserServices.AddPlugin("OpenSim.Framework.Data.DB4o.dll"); + UserServices.AddPlugin(m_settings.UserDatabasePlugin); UserServer = UserServices; InstanceServices = new LocalBackEndServices(); @@ -62,7 +65,7 @@ namespace OpenSim.Region.Communications.Local //CapsServices = new CAPSService(httpServer); - LoginServices = new LocalLoginService(UserServices, welcomeMessage, this, serversInfo, accountsAuthenticate); + LoginServices = new LocalLoginService(UserServices, m_settings.WelcomeMessage, this, serversInfo, m_settings.AccountAuthentication); httpServer.AddXmlRPCHandler("login_to_simulator", LoginServices.XmlRpcLoginMethod); } @@ -101,5 +104,27 @@ namespace OpenSim.Region.Communications.Local } } + public class LocalSettings + { + public string WelcomeMessage = ""; + public bool AccountAuthentication = false; + public string InventoryPlugin = "OpenSim.Framework.Data.SQLite.dll"; + public string UserDatabasePlugin = "OpenSim.Framework.Data.DB4o.dll"; + + public LocalSettings(string welcomeMessage, bool accountsAuthenticate, string inventoryPlugin, string userPlugin) + { + WelcomeMessage = welcomeMessage; + AccountAuthentication = accountsAuthenticate; + if (inventoryPlugin != "") + { + InventoryPlugin = inventoryPlugin; + } + if (userPlugin != "") + { + UserDatabasePlugin = userPlugin; + } + } + } + } } diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs index f064eaa925..64fe975613 100644 --- a/OpenSim/Region/Examples/SimpleApp/Program.cs +++ b/OpenSim/Region/Examples/SimpleApp/Program.cs @@ -47,7 +47,8 @@ namespace SimpleApp { base.StartUp(); - m_commsManager = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, false, ""); + CommunicationsLocal.LocalSettings settings = new CommunicationsLocal.LocalSettings("", false, "", ""); + m_commsManager = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, settings); m_log.Notice(m_log.LineInfo);