From 6a1b787436cc59043a26a296781e7a7b5ea0c67b Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Wed, 14 May 2008 05:33:32 +0000 Subject: More formatting cleanup. --- OpenSim/Data/MapperFactory/DataMapperFactory.cs | 3 +- OpenSim/Data/MySQL/MySQLAssetData.cs | 7 ++- OpenSim/Data/SQLite/SQLiteAssetData.cs | 3 +- OpenSim/Data/SQLite/SQLiteInventoryStore.cs | 3 +- OpenSim/Framework/PacketPool.cs | 2 +- OpenSim/Framework/Servers/BaseHttpServer.cs | 10 +++- .../ConnectToGridServerDialog.cs | 3 +- .../GridServerConnectionManager.cs | 28 +++++++--- .../Grid/Manager/OpenGridServices.Manager/Main.cs | 32 +++++++---- .../Grid/Manager/OpenGridServices.Manager/Util.cs | 2 +- ...idServices.Manager.ConnectToGridServerDialog.cs | 27 +++------ .../gtk-gui/OpenGridServices.Manager.MainWindow.cs | 49 +++------------- .../OpenGridServices.Manager/gtk-gui/generated.cs | 26 ++++----- OpenSim/Grid/MessagingServer/MessageService.cs | 2 +- .../DotNetEngine/Compiler/LSO/LSL_BaseClass.cs | 7 +-- .../Region/ClientStack/LindenUDP/LLClientView.cs | 6 +- .../Region/ClientStack/LindenUDP/LLPacketQueue.cs | 3 +- OpenSim/Region/DataSnapshot/DataSnapshotManager.cs | 65 +++++++++++----------- .../Region/Environment/Scenes/Scene.Inventory.cs | 6 +- OpenSim/Region/Environment/Scenes/SceneEvents.cs | 3 +- OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 6 +- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 4 +- .../Common/ScriptEngineBase/ScriptManager.cs | 11 ++-- .../Region/ScriptEngine/LSOEngine/LSO/LSO_Enums.cs | 3 +- OpenSim/TestSuite/Main.cs | 8 ++- OpenSim/Tools/pCampBot/pCampBot.cs | 7 ++- ThirdParty/3Di/LoadBalancer/TcpClient.cs | 8 ++- ThirdParty/3Di/LoadBalancer/TcpServer.cs | 3 +- 28 files changed, 174 insertions(+), 163 deletions(-) diff --git a/OpenSim/Data/MapperFactory/DataMapperFactory.cs b/OpenSim/Data/MapperFactory/DataMapperFactory.cs index c447be7..1d981f8 100644 --- a/OpenSim/Data/MapperFactory/DataMapperFactory.cs +++ b/OpenSim/Data/MapperFactory/DataMapperFactory.cs @@ -41,7 +41,8 @@ namespace OpenSim.Data.MapperFactory static public BaseDatabaseConnector GetDataBaseMapper(MAPPER_TYPE type, string connectionString) { - switch (type) { + switch (type) + { case MAPPER_TYPE.MySQL: return new MySQLDatabaseMapper(connectionString); case MAPPER_TYPE.MSSQL: diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs index efcf59e..7e6289b 100644 --- a/OpenSim/Data/MySQL/MySQLAssetData.cs +++ b/OpenSim/Data/MySQL/MySQLAssetData.cs @@ -174,10 +174,13 @@ namespace OpenSim.Data.MySQL { // TODO: This will let you pass in the connect string in // the config, though someone will need to write that. - if (connect == String.Empty) { + if (connect == String.Empty) + { // This is old seperate config file Initialise(); - } else { + } + else + { _dbConnection = new MySQLManager(connect); TestTables(); } diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs index f3a4bd1..34329bb 100644 --- a/OpenSim/Data/SQLite/SQLiteAssetData.cs +++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs @@ -58,7 +58,8 @@ namespace OpenSim.Data.SQLite override public void Initialise(string dbconnect) { - if (dbconnect == string.Empty) { + if (dbconnect == string.Empty) + { dbconnect = "URI=file:AssetStorage.db,version=3"; } m_conn = new SqliteConnection(dbconnect); diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs index 40978da..1ab971c 100644 --- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs +++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs @@ -52,7 +52,8 @@ namespace OpenSim.Data.SQLite /// public void Initialise(string dbconnect) { - if (dbconnect == string.Empty) { + if (dbconnect == string.Empty) + { dbconnect = "URI=file:inventoryStore.db,version=3"; } m_log.Info("[INVENTORY DB]: Sqlite - connecting: " + dbconnect); diff --git a/OpenSim/Framework/PacketPool.cs b/OpenSim/Framework/PacketPool.cs index af8efe8..4e71d5e 100644 --- a/OpenSim/Framework/PacketPool.cs +++ b/OpenSim/Framework/PacketPool.cs @@ -159,7 +159,7 @@ namespace OpenSim.Framework return; // packet pool disabled /* // Commented out to remove a compiler warning. :) - lock(pool) + lock (pool) { PacketType type=packet.Type; diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index f36b2fb..50f4e23 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs @@ -372,8 +372,14 @@ namespace OpenSim.Framework.Servers LLSD llsdRequest = null; LLSD llsdResponse = null; - try { llsdRequest = LLSDParser.DeserializeXml(requestBody); } - catch (Exception ex) { m_log.Warn("[HTTPD]: Error - " + ex.Message); } + try + { + llsdRequest = LLSDParser.DeserializeXml(requestBody); + } + catch (Exception ex) + { + m_log.Warn("[HTTPD]: Error - " + ex.Message); + } if (llsdRequest != null && m_llsdHandler != null) { diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs index b6b2b64..210e195 100644 --- a/OpenSim/Grid/Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs +++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs @@ -39,7 +39,8 @@ namespace OpenGridServices.Manager protected virtual void OnResponse(object o, Gtk.ResponseArgs args) { - switch (args.ResponseId) { + switch (args.ResponseId) + { case Gtk.ResponseType.Ok: MainClass.PendingOperations.Enqueue("connect_to_gridserver " + this.entry1.Text + " " + this.entry2.Text + " " + this.entry3.Text); break; diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/GridServerConnectionManager.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/GridServerConnectionManager.cs index a386fa8..cf44ac2 100644 --- a/OpenSim/Grid/Manager/OpenGridServices.Manager/GridServerConnectionManager.cs +++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/GridServerConnectionManager.cs @@ -46,7 +46,8 @@ namespace OpenGridServices.Manager public bool Connect(string GridServerURL, string username, string password) { - try { + try + { this.ServerURL=GridServerURL; Hashtable LoginParamsHT = new Hashtable(); LoginParamsHT["username"]=username; @@ -55,16 +56,21 @@ namespace OpenGridServices.Manager LoginParams.Add(LoginParamsHT); XmlRpcRequest GridLoginReq = new XmlRpcRequest("manager_login",LoginParams); XmlRpcResponse GridResp = GridLoginReq.Send(ServerURL,3000); - if (GridResp.IsFault) { + if (GridResp.IsFault) + { connected=false; return false; - } else { + } + else + { Hashtable gridrespData = (Hashtable)GridResp.Value; this.SessionID = new LLUUID((string)gridrespData["session_id"]); connected=true; return true; } - } catch(Exception e) { + } + catch(Exception e) + { Console.WriteLine(e.ToString()); connected=false; return false; @@ -107,20 +113,26 @@ namespace OpenGridServices.Manager public bool ShutdownServer() { - try { + try + { Hashtable ShutdownParamsHT = new Hashtable(); ArrayList ShutdownParams = new ArrayList(); ShutdownParamsHT["session_id"]=this.SessionID.ToString(); ShutdownParams.Add(ShutdownParamsHT); XmlRpcRequest GridShutdownReq = new XmlRpcRequest("shutdown",ShutdownParams); XmlRpcResponse GridResp = GridShutdownReq.Send(this.ServerURL, 3000); - if (GridResp.IsFault) { + if (GridResp.IsFault) + { return false; - } else { + } + else + { connected=false; return true; } - } catch(Exception e) { + } + catch(Exception e) + { Console.WriteLine(e.ToString()); return false; } diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/Main.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/Main.cs index 6b7a5ab..7700229 100644 --- a/OpenSim/Grid/Manager/OpenGridServices.Manager/Main.cs +++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/Main.cs @@ -62,47 +62,57 @@ namespace OpenGridServices.Manager operation=PendingOperations.Dequeue(); Console.WriteLine(operation); cmd = operation.Split(sep)[0]; - switch (cmd) { + switch (cmd) + { case "connect_to_gridserver": win.SetStatus("Connecting to grid server..."); - if (gridserverConn.Connect(operation.Split(sep)[1], operation.Split(sep)[2], operation.Split(sep)[3])) { + if (gridserverConn.Connect(operation.Split(sep)[1], operation.Split(sep)[2], operation.Split(sep)[3])) + { win.SetStatus("Connected OK with session ID:" + gridserverConn.SessionID); win.SetGridServerConnected(true); Thread.Sleep(3000); win.SetStatus("Downloading region maps..."); gridserverConn.DownloadMap(); - } else { + } + else + { win.SetStatus("Could not connect"); } - break; + break; case "restart_gridserver": win.SetStatus("Restarting grid server..."); - if (gridserverConn.RestartServer()) { + if (gridserverConn.RestartServer()) + { win.SetStatus("Restarted server OK"); Thread.Sleep(3000); win.SetStatus(""); - } else { + } + else + { win.SetStatus("Error restarting grid server!!!"); } - break; + break; case "shutdown_gridserver": win.SetStatus("Shutting down grid server..."); - if (gridserverConn.ShutdownServer()) { + if (gridserverConn.ShutdownServer()) + { win.SetStatus("Grid server shutdown"); win.SetGridServerConnected(false); Thread.Sleep(3000); win.SetStatus(""); - } else { + } + else + { win.SetStatus("Could not shutdown grid server!!!"); } - break; + break; case "disconnect_gridserver": gridserverConn.DisconnectServer(); win.SetGridServerConnected(false); - break; + break; } } } diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/Util.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/Util.cs index fcc5574..aff4719 100644 --- a/OpenSim/Grid/Manager/OpenGridServices.Manager/Util.cs +++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/Util.cs @@ -55,7 +55,7 @@ namespace OpenSim.Framework.Utilities public static uint GetNextXferID() { uint id = 0; - lock(XferLock) + lock (XferLock) { id = nextXferID; nextXferID++; diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs index d082a3b..a5a4ec8 100644 --- a/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs +++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs @@ -35,38 +35,26 @@ // // ------------------------------------------------------------------------------ -namespace OpenGridServices.Manager { - - - public partial class ConnectToGridServerDialog { - +namespace OpenGridServices.Manager +{ + public partial class ConnectToGridServerDialog + { private Gtk.VBox vbox2; - private Gtk.VBox vbox3; - private Gtk.HBox hbox1; - private Gtk.Label label1; - private Gtk.Entry entry1; - private Gtk.HBox hbox2; - private Gtk.Label label2; - private Gtk.Entry entry2; - private Gtk.HBox hbox3; - private Gtk.Label label3; - private Gtk.Entry entry3; - private Gtk.Button button2; - private Gtk.Button button8; - protected virtual void Build() { + protected virtual void Build() + { Stetic.Gui.Initialize(); // Widget OpenGridServices.Manager.ConnectToGridServerDialog this.Events = ((Gdk.EventMask)(256)); @@ -241,7 +229,8 @@ namespace OpenGridServices.Manager { w31.Position = 1; w31.Expand = false; w31.Fill = false; - if ((this.Child != null)) { + if (this.Child != null) + { this.Child.ShowAll(); } this.DefaultWidth = 476; diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs index 9d3cdaf..9707aee 100644 --- a/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs +++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs @@ -35,82 +35,48 @@ // // ------------------------------------------------------------------------------ -namespace OpenGridServices.Manager { - - - public partial class MainWindow { - +namespace OpenGridServices.Manager +{ + public partial class MainWindow + { private Gtk.Action Grid; - private Gtk.Action User; - private Gtk.Action Asset; - private Gtk.Action Region; - private Gtk.Action Services; - private Gtk.Action ConnectToGridserver; - private Gtk.Action RestartWholeGrid; - private Gtk.Action ShutdownWholeGrid; - private Gtk.Action ExitGridManager; - private Gtk.Action ConnectToUserserver; - private Gtk.Action AccountManagment; - private Gtk.Action GlobalNotice; - private Gtk.Action DisableAllLogins; - private Gtk.Action DisableNonGodUsersOnly; - private Gtk.Action ShutdownUserServer; - private Gtk.Action ShutdownGridserverOnly; - private Gtk.Action RestartGridserverOnly; - private Gtk.Action DefaultLocalGridUserserver; - private Gtk.Action CustomUserserver; - private Gtk.Action RemoteGridDefaultUserserver; - private Gtk.Action DisconnectFromGridServer; - private Gtk.Action UploadAsset; - private Gtk.Action AssetManagement; - private Gtk.Action ConnectToAssetServer; - private Gtk.Action ConnectToDefaultAssetServerForGrid; - private Gtk.Action DefaultForLocalGrid; - private Gtk.Action DefaultForRemoteGrid; - private Gtk.Action CustomAssetServer; - private Gtk.VBox vbox1; - private Gtk.MenuBar menubar2; - private Gtk.HBox hbox1; - private Gtk.ScrolledWindow scrolledwindow1; - private Gtk.DrawingArea drawingarea1; - private Gtk.TreeView treeview1; - private Gtk.Statusbar statusbar1; - protected virtual void Build() { + protected virtual void Build() + { Stetic.Gui.Initialize(); // Widget OpenGridServices.Manager.MainWindow Gtk.UIManager w1 = new Gtk.UIManager(); @@ -266,7 +232,8 @@ namespace OpenGridServices.Manager { w10.Expand = false; w10.Fill = false; this.Add(this.vbox1); - if ((this.Child != null)) { + if (this.Child != null) + { this.Child.ShowAll(); } this.DefaultWidth = 800; diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/generated.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/generated.cs index b297b16..46dec05 100644 --- a/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/generated.cs +++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/generated.cs @@ -35,27 +35,27 @@ // // ------------------------------------------------------------------------------ -namespace Stetic { - - - internal class Gui { - +namespace Stetic +{ + internal class Gui + { private static bool initialized; - internal static void Initialize() { - if ((Stetic.Gui.initialized == false)) { - Stetic.Gui.initialized = true; - } + internal static void Initialize() + { + Stetic.Gui.initialized = true; } } - internal class ActionGroups { - - public static Gtk.ActionGroup GetActionGroup(System.Type type) { + internal class ActionGroups + { + public static Gtk.ActionGroup GetActionGroup(System.Type type) + { return Stetic.ActionGroups.GetActionGroup(type.FullName); } - public static Gtk.ActionGroup GetActionGroup(string name) { + public static Gtk.ActionGroup GetActionGroup(string name) + { return null; } } diff --git a/OpenSim/Grid/MessagingServer/MessageService.cs b/OpenSim/Grid/MessagingServer/MessageService.cs index 50e06af..f9f3669 100644 --- a/OpenSim/Grid/MessagingServer/MessageService.cs +++ b/OpenSim/Grid/MessagingServer/MessageService.cs @@ -234,7 +234,7 @@ namespace OpenSim.Grid.MessagingServer for (int i = 0; i < AgentsNeedingNotification.Count; i++) { // TODO: Do Region Notifications - lock(m_presences) + lock (m_presences) { if (m_presences.Contains(AgentsNeedingNotification[i])) { diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_BaseClass.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_BaseClass.cs index 1c432f2..fd81f30 100644 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_BaseClass.cs +++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_BaseClass.cs @@ -39,7 +39,8 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSO public Dictionary GlobalVariables = new Dictionary(); public Dictionary LocalVariables = new Dictionary(); //public System.Collections.Generic.List FunctionList = new System.Collections.Generic.List(); - //public void AddFunction(String x) { + //public void AddFunction(String x) + //{ // FunctionList.Add(x); //} //public Stack LSLStack = new Stack; @@ -56,12 +57,10 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSO return LSL_Builtins; } - public LSL_BaseClass() { } - public virtual int OverrideMe() { return 0; @@ -72,8 +71,6 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSO LSL_Builtins = LSLBuiltins; Common.SendToLog("OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSO.LSL_BaseClass.Start() called"); - //LSL_Builtins.llSay(0, "Test"); - return; } public void AddToStatic(UInt32 index, object obj) diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index af20687..32432b4 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -4601,13 +4601,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP ObjectIncludeInSearchPacket packInSearch = (ObjectIncludeInSearchPacket)Pack; handlerObjectIncludeInSearch = null; - foreach (ObjectIncludeInSearchPacket.ObjectDataBlock objData in packInSearch.ObjectData) { + foreach (ObjectIncludeInSearchPacket.ObjectDataBlock objData in packInSearch.ObjectData) + { bool inSearch = objData.IncludeInSearch; uint localID = objData.ObjectLocalID; handlerObjectIncludeInSearch = OnObjectIncludeInSearch; - if (handlerObjectIncludeInSearch != null) { + if (handlerObjectIncludeInSearch != null) + { handlerObjectIncludeInSearch(this, inSearch, localID); } } diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs index c6da96e..8f90f34 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs @@ -148,7 +148,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP return; } - lock (this) { + lock (this) + { switch (item.throttleType) { case ThrottleOutPacketType.Resend: diff --git a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs index 245922c..5831ddc 100644 --- a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs +++ b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs @@ -78,43 +78,47 @@ namespace OpenSim.Region.DataSnapshot if (!m_scenes.Contains(scene)) m_scenes.Add(scene); - if (!m_configLoaded) { + if (!m_configLoaded) + { m_configLoaded = true; m_log.Info("[DATASNAPSHOT]: Loading configuration"); //Read from the config for options - lock (m_syncInit) { - try { - m_enabled = config.Configs["DataSnapshot"].GetBoolean("index_sims", m_enabled); - if (config.Configs["Startup"].GetBoolean("gridmode", true)) - { - m_gridinfo.Add("gridserverURL", config.Configs["Network"].GetString("grid_server_url", "harbl")); - m_gridinfo.Add("userserverURL", config.Configs["Network"].GetString("user_server_url", "harbl")); - m_gridinfo.Add("assetserverURL", config.Configs["Network"].GetString("asset_server_url", "harbl")); - } - else - { - //Non gridmode stuff - } - - m_gridinfo.Add("Name", config.Configs["DataSnapshot"].GetString("gridname", "harbl")); - m_maxSnapshots = config.Configs["DataSnapshot"].GetInt("max_snapshots", m_maxSnapshots); - m_period = config.Configs["DataSnapshot"].GetInt("default_snapshot_period", m_period); - m_snapsDir = config.Configs["DataSnapshot"].GetString("snapshot_cache_directory", m_snapsDir); - m_dataServices = config.Configs["DataSnapshot"].GetString("data_services", m_dataServices); - m_listener_port = config.Configs["Network"].GetString("http_listener_port", m_listener_port); - //BUG: Naming a search data module "DESUDESUDESU" will cause it to not get loaded by default. - //RESOLUTION: Wontfix, there are no Suiseiseki-loving developers - String[] annoying_string_array = config.Configs["DataSnapshot"].GetString("disable_modules", "DESUDESUDESU").Split(".".ToCharArray()); - foreach (String bloody_wanker in annoying_string_array) { - m_disabledModules.Add(bloody_wanker); - } - - } catch (Exception) { + lock (m_syncInit) + { + try + { + m_enabled = config.Configs["DataSnapshot"].GetBoolean("index_sims", m_enabled); + if (config.Configs["Startup"].GetBoolean("gridmode", true)) + { + m_gridinfo.Add("gridserverURL", config.Configs["Network"].GetString("grid_server_url", "harbl")); + m_gridinfo.Add("userserverURL", config.Configs["Network"].GetString("user_server_url", "harbl")); + m_gridinfo.Add("assetserverURL", config.Configs["Network"].GetString("asset_server_url", "harbl")); + } + else + { + //Non gridmode stuff + } + + m_gridinfo.Add("Name", config.Configs["DataSnapshot"].GetString("gridname", "harbl")); + m_maxSnapshots = config.Configs["DataSnapshot"].GetInt("max_snapshots", m_maxSnapshots); + m_period = config.Configs["DataSnapshot"].GetInt("default_snapshot_period", m_period); + m_snapsDir = config.Configs["DataSnapshot"].GetString("snapshot_cache_directory", m_snapsDir); + m_dataServices = config.Configs["DataSnapshot"].GetString("data_services", m_dataServices); + m_listener_port = config.Configs["Network"].GetString("http_listener_port", m_listener_port); + //BUG: Naming a search data module "DESUDESUDESU" will cause it to not get loaded by default. + //RESOLUTION: Wontfix, there are no Suiseiseki-loving developers + String[] annoying_string_array = config.Configs["DataSnapshot"].GetString("disable_modules", "DESUDESUDESU").Split(".".ToCharArray()); + foreach (String bloody_wanker in annoying_string_array) + { + m_disabledModules.Add(bloody_wanker); + } + } + catch (Exception) + { m_log.Info("[DATASNAPSHOT]: Could not load configuration. DataSnapshot will be disabled."); m_enabled = false; return; } - } } if (Directory.Exists(m_snapsDir)) @@ -135,7 +139,6 @@ namespace OpenSim.Region.DataSnapshot } } - if (m_enabled) { m_log.Info("[DATASNAPSHOT]: Scene added to module."); diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index efd258d..82a6b94 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs @@ -815,7 +815,8 @@ namespace OpenSim.Region.Environment.Scenes agentItem.Folder = folderId; agentItem.EveryOnePermissions = taskItem.EveryoneMask; - if (remoteClient.AgentId != taskItem.OwnerID) { + if (remoteClient.AgentId != taskItem.OwnerID) + { agentItem.BasePermissions = taskItem.NextOwnerMask; agentItem.CurrentPermissions = taskItem.NextOwnerMask; agentItem.NextPermissions = taskItem.NextOwnerMask; @@ -1038,7 +1039,8 @@ namespace OpenSim.Region.Environment.Scenes item.InvType = asset.InvType; item.Folder = DeRezPacket.AgentBlock.DestinationID; item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask; - if (remoteClient.AgentId != objectGroup.RootPart.OwnerID) { + if (remoteClient.AgentId != objectGroup.RootPart.OwnerID) + { item.BasePermissions = objectGroup.RootPart.NextOwnerMask; item.CurrentPermissions = objectGroup.RootPart.NextOwnerMask; item.NextPermissions = objectGroup.RootPart.NextOwnerMask; diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs index 88537e9..dacd609 100644 --- a/OpenSim/Region/Environment/Scenes/SceneEvents.cs +++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs @@ -195,7 +195,8 @@ namespace OpenSim.Region.Environment.Scenes public int transactiontype; public string description; - public MoneyTransferArgs(LLUUID asender, LLUUID areceiver, int aamount, int atransactiontype, string adescription) { + public MoneyTransferArgs(LLUUID asender, LLUUID areceiver, int aamount, int atransactiontype, string adescription) + { sender = asender; receiver = areceiver; amount = aamount; diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index 5008927..2e7ec15 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs @@ -579,7 +579,8 @@ namespace OpenSim.Region.Physics.Meshing if (pathShearX != 0) { - if (pathShearX > 50) { + if (pathShearX > 50) + { // Complimentary byte. Negative values wrap around the byte. Positive values go up to 50 extr.pushX = (((float)(256 - pathShearX) / 100) * -1f); // m_log.Warn("pushX: " + extr.pushX); @@ -593,7 +594,8 @@ namespace OpenSim.Region.Physics.Meshing if (pathShearY != 0) { - if (pathShearY > 50) { + if (pathShearY > 50) + { // Complimentary byte. Negative values wrap around the byte. Positive values go up to 50 extr.pushY = (((float)(256 - pathShearY) / 100) * -1f); //m_log.Warn("pushY: " + extr.pushY); diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index a54523b..c2a1c8e 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -294,7 +294,7 @@ namespace OpenSim.Region.Physics.OdePlugin internal void waitForSpaceUnlock(IntPtr space) { //if (space != (IntPtr)0) - //while (d.SpaceLockQuery(space)){ } // Wait and do nothing + //while (d.SpaceLockQuery(space)) { } // Wait and do nothing } /// @@ -952,7 +952,7 @@ namespace OpenSim.Region.Physics.OdePlugin public void addCollisionEventReporting(PhysicsActor obj) { - lock(_collisionEventPrim) + lock (_collisionEventPrim) { if (!_collisionEventPrim.Contains(obj)) _collisionEventPrim.Add(obj); diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs index da30535..2233913 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs @@ -207,7 +207,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase public void DoScriptLoadUnload() { - lock (LUQueue) { + lock (LUQueue) + { if (LUQueue.Count > 0) { LUStruct item = LUQueue.Dequeue(); @@ -216,7 +217,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase { _StopScript(item.localID, item.itemID); } - if (item.Action == LUType.Load) + else if (item.Action == LUType.Load) { _StartScript(item.localID, item.itemID, item.script); } @@ -249,7 +250,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase /// public void StartScript(uint localID, LLUUID itemID, string Script) { - lock(LUQueue) { + lock (LUQueue) + { if (LUQueue.Count >= LoadUnloadMaxQueueSize) { m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: ERROR: Load/unload queue item count is at " + LUQueue.Count + ". Config variable \"LoadUnloadMaxQueueSize\" is set to " + LoadUnloadMaxQueueSize + ", so ignoring new script."); @@ -276,7 +278,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase ls.localID = localID; ls.itemID = itemID; ls.Action = LUType.Unload; - lock (LUQueue) { + lock (LUQueue) + { LUQueue.Enqueue(ls); } } diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Enums.cs b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Enums.cs index 7b4a1af..c721267 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Enums.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Enums.cs @@ -34,7 +34,8 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO { //public System.Collections.Generic.Dictionary OpCode_Add_Types; - //LSO_Enums() { + //LSO_Enums() + //{ // OpCode_Add_Types.Add(51, typeof(String)); // OpCode_Add_Types.Add(17, typeof(UInt32)); //} diff --git a/OpenSim/TestSuite/Main.cs b/OpenSim/TestSuite/Main.cs index 213f02c..1a9aa0e 100644 --- a/OpenSim/TestSuite/Main.cs +++ b/OpenSim/TestSuite/Main.cs @@ -44,7 +44,6 @@ namespace OpenSim.TestSuite { public static void Main(string[] args) { - // TODO: config parser // TODO: load tests from addings @@ -52,9 +51,12 @@ namespace OpenSim.TestSuite // TODO: create base bot cloud for use in tests IConfig config = ParseConfig(args); - if (config.Get("help") != null || config.Get("loginuri") == null) { + if (config.Get("help") != null || config.Get("loginuri") == null) + { Help(); - } else { + } + else + { // TODO: unused: int botcount = config.GetInt("botcount", 1); // BotManager bm = new BotManager(); diff --git a/OpenSim/Tools/pCampBot/pCampBot.cs b/OpenSim/Tools/pCampBot/pCampBot.cs index d944608..81ec2b2 100644 --- a/OpenSim/Tools/pCampBot/pCampBot.cs +++ b/OpenSim/Tools/pCampBot/pCampBot.cs @@ -47,9 +47,12 @@ namespace pCampBot public static void Main(string[] args) { IConfig config = ParseConfig(args); - if (config.Get("help") != null || config.Get("loginuri") == null) { + if (config.Get("help") != null || config.Get("loginuri") == null) + { Help(); - } else { + } + else + { int botcount = config.GetInt("botcount", 1); BotManager bm = new BotManager(); diff --git a/ThirdParty/3Di/LoadBalancer/TcpClient.cs b/ThirdParty/3Di/LoadBalancer/TcpClient.cs index c794def..1acba24 100644 --- a/ThirdParty/3Di/LoadBalancer/TcpClient.cs +++ b/ThirdParty/3Di/LoadBalancer/TcpClient.cs @@ -181,8 +181,10 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer } /* - public void recevie() { - if (mConnection == null) { + public void receive() + { + if (mConnection == null) + { throw new Exception("client not initialized"); } try @@ -191,7 +193,7 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer } catch (Exception e) { - Console.WriteLine(e.ToString()); + Console.WriteLine(e.ToString()); mConnection = null; } } diff --git a/ThirdParty/3Di/LoadBalancer/TcpServer.cs b/ThirdParty/3Di/LoadBalancer/TcpServer.cs index eb57b2d..1457299 100644 --- a/ThirdParty/3Di/LoadBalancer/TcpServer.cs +++ b/ThirdParty/3Di/LoadBalancer/TcpServer.cs @@ -150,7 +150,8 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer state.ms_ptr.Read(packet, 0, state.header.numbytes); /* - for (int i=0; i