From c3d8f1f4253f72484100394940e62f2912cbc4ff Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Fri, 5 Oct 2007 15:45:45 +0000 Subject: getting all our line endings consistant again --- OpenSim/Grid/ScriptServer/Application.cs | 64 ++++----- .../Grid/ScriptServer/Properties/AssemblyInfo.cs | 66 +++++----- .../ScriptServer/Region/RegionConnectionManager.cs | 32 ++--- .../ScriptServer/ScriptServer/RegionCommManager.cs | 146 ++++++++++----------- .../ScriptEngineManager/ScriptEngineLoader.cs | 10 +- .../ScriptServer/ScriptEnginesManager.cs | 82 ++++++------ OpenSim/Grid/ScriptServer/ScriptServerMain.cs | 96 +++++++------- 7 files changed, 248 insertions(+), 248 deletions(-) (limited to 'OpenSim/Grid/ScriptServer') diff --git a/OpenSim/Grid/ScriptServer/Application.cs b/OpenSim/Grid/ScriptServer/Application.cs index 780f037..7fc9a53 100644 --- a/OpenSim/Grid/ScriptServer/Application.cs +++ b/OpenSim/Grid/ScriptServer/Application.cs @@ -24,35 +24,35 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * -*/ -using System; -using System.Collections.Generic; -using System.Text; - -namespace OpenSim.Grid.ScriptServer -{ - class OpenScript_Main - { - - public static ScriptServerMain SE; - - static void Main(string[] args) - { - // Application is starting - SE = new ScriptServerMain(); - - System.AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); - } - - static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) - { - Console.WriteLine(""); - Console.WriteLine("APPLICATION EXCEPTION DETECTED"); - Console.WriteLine(""); - Console.WriteLine("Application is terminating: " + e.IsTerminating.ToString()); - Console.WriteLine("Exception:"); - Console.WriteLine(e.ExceptionObject.ToString()); - } - - } -} +*/ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenSim.Grid.ScriptServer +{ + class OpenScript_Main + { + + public static ScriptServerMain SE; + + static void Main(string[] args) + { + // Application is starting + SE = new ScriptServerMain(); + + System.AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); + } + + static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) + { + Console.WriteLine(""); + Console.WriteLine("APPLICATION EXCEPTION DETECTED"); + Console.WriteLine(""); + Console.WriteLine("Application is terminating: " + e.IsTerminating.ToString()); + Console.WriteLine("Exception:"); + Console.WriteLine(e.ExceptionObject.ToString()); + } + + } +} diff --git a/OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs b/OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs index d60dbb4..63f40d4 100644 --- a/OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs +++ b/OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs @@ -1,33 +1,33 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OpenSim.Grid.ScriptServer")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OpenSim.Grid.ScriptServer")] -[assembly: AssemblyCopyright("Copyright © 2007")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("b6861b87-5203-4040-b756-fd4774932f82")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OpenSim.Grid.ScriptServer")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OpenSim.Grid.ScriptServer")] +[assembly: AssemblyCopyright("Copyright © 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("b6861b87-5203-4040-b756-fd4774932f82")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs index 7171b82..e808f82 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs @@ -1,16 +1,16 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace OpenSim.Grid.ScriptServer -{ - // Maintains connection and communication to a region - internal class RegionConnectionManager - { - - public RegionConnectionManager() - { - } - - } -} +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenSim.Grid.ScriptServer +{ + // Maintains connection and communication to a region + internal class RegionConnectionManager + { + + public RegionConnectionManager() + { + } + + } +} diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs index d609d63..c6564ad 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs @@ -24,76 +24,76 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * -*/ -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading; -using OpenSim.Framework.Console; - -namespace OpenSim.Grid.ScriptServer -{ - // Waiting for incoming script requests from region - internal class RegionCommManager - { - private Thread listenThread; - - private List Regions = new List(); - - private LogBase m_log; - private ScriptServerMain m_ScriptServerMain; - public RegionCommManager(ScriptServerMain scm, LogBase logger) - { - m_ScriptServerMain = scm; - m_log = logger; - } - ~RegionCommManager() - { - Stop(); - } - - /// - /// Starts listening for region requests - /// - public void Start() - { - // Start listener - Stop(); - listenThread = new Thread(ListenThreadLoop); - listenThread.Name = "listenThread"; - listenThread.IsBackground = true; - listenThread.Start(); - } - /// - /// Stops listening for region requests - /// - public void Stop() - { - // Stop listener, clean up - if (listenThread != null) - { - try - { - if (listenThread.IsAlive) - listenThread.Abort(); - listenThread.Join(1000); // Wait 1 second for thread to shut down - } - catch { } - listenThread = null; - } - } - - private void ListenThreadLoop() - { - // * Listen for requests from regions - // * When a request is received: - // - Authenticate region - // - Authenticate user - // - Have correct scriptengine load script - // ~ ask scriptengines if they will accept script? - // - Add script to shared communication channel towards that region - - } - - } -} +*/ +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading; +using OpenSim.Framework.Console; + +namespace OpenSim.Grid.ScriptServer +{ + // Waiting for incoming script requests from region + internal class RegionCommManager + { + private Thread listenThread; + + private List Regions = new List(); + + private LogBase m_log; + private ScriptServerMain m_ScriptServerMain; + public RegionCommManager(ScriptServerMain scm, LogBase logger) + { + m_ScriptServerMain = scm; + m_log = logger; + } + ~RegionCommManager() + { + Stop(); + } + + /// + /// Starts listening for region requests + /// + public void Start() + { + // Start listener + Stop(); + listenThread = new Thread(ListenThreadLoop); + listenThread.Name = "listenThread"; + listenThread.IsBackground = true; + listenThread.Start(); + } + /// + /// Stops listening for region requests + /// + public void Stop() + { + // Stop listener, clean up + if (listenThread != null) + { + try + { + if (listenThread.IsAlive) + listenThread.Abort(); + listenThread.Join(1000); // Wait 1 second for thread to shut down + } + catch { } + listenThread = null; + } + } + + private void ListenThreadLoop() + { + // * Listen for requests from regions + // * When a request is received: + // - Authenticate region + // - Authenticate user + // - Have correct scriptengine load script + // ~ ask scriptengines if they will accept script? + // - Add script to shared communication channel towards that region + + } + + } +} diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineManager/ScriptEngineLoader.cs b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineManager/ScriptEngineLoader.cs index 8b07ab0..a259b1b 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineManager/ScriptEngineLoader.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineManager/ScriptEngineLoader.cs @@ -28,8 +28,8 @@ using System; using System.IO; using System.Reflection; -using OpenSim.Framework.Console; - +using OpenSim.Framework.Console; + namespace OpenSim.Grid.ScriptServer { internal class ScriptEngineLoader @@ -39,7 +39,7 @@ namespace OpenSim.Grid.ScriptServer public ScriptEngineLoader(LogBase logger) { - m_log = logger; + m_log = logger; } public ScriptEngineInterface LoadScriptEngine(string EngineName) @@ -121,5 +121,5 @@ namespace OpenSim.Grid.ScriptServer return ret; } } -} - +} + diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs index faa859d..bfcee79 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs @@ -1,41 +1,41 @@ -using System; -using System.Collections.Generic; -using System.Text; -using OpenSim.Framework.Console; - -namespace OpenSim.Grid.ScriptServer -{ - internal class ScriptEngineManager - { - private LogBase m_log; - private ScriptEngineLoader ScriptEngineLoader; - private List scriptEngines = new List(); - private ScriptServerMain m_ScriptServerMain; - - // Initialize - public ScriptEngineManager(ScriptServerMain scm, LogBase logger) - { - m_ScriptServerMain = scm; - m_log = logger; - ScriptEngineLoader = new ScriptEngineLoader(m_log); - - // Temp - we should not load during initialize... Loading should be done later. - LoadEngine("DotNetScriptEngine"); - } - ~ScriptEngineManager() - { - } - - public void LoadEngine(string engineName) - { - // Load and add to list of ScriptEngines - ScriptEngineInterface sei = ScriptEngineLoader.LoadScriptEngine(engineName); - if (sei != null) - { - scriptEngines.Add(sei); - } - } - - - } -} +using System; +using System.Collections.Generic; +using System.Text; +using OpenSim.Framework.Console; + +namespace OpenSim.Grid.ScriptServer +{ + internal class ScriptEngineManager + { + private LogBase m_log; + private ScriptEngineLoader ScriptEngineLoader; + private List scriptEngines = new List(); + private ScriptServerMain m_ScriptServerMain; + + // Initialize + public ScriptEngineManager(ScriptServerMain scm, LogBase logger) + { + m_ScriptServerMain = scm; + m_log = logger; + ScriptEngineLoader = new ScriptEngineLoader(m_log); + + // Temp - we should not load during initialize... Loading should be done later. + LoadEngine("DotNetScriptEngine"); + } + ~ScriptEngineManager() + { + } + + public void LoadEngine(string engineName) + { + // Load and add to list of ScriptEngines + ScriptEngineInterface sei = ScriptEngineLoader.LoadScriptEngine(engineName); + if (sei != null) + { + scriptEngines.Add(sei); + } + } + + + } +} diff --git a/OpenSim/Grid/ScriptServer/ScriptServerMain.cs b/OpenSim/Grid/ScriptServer/ScriptServerMain.cs index 8352859..37541c9 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServerMain.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServerMain.cs @@ -1,48 +1,48 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.IO; -using OpenSim.Framework.Console; -using OpenSim.Framework.Utilities; - -namespace OpenSim.Grid.ScriptServer -{ - public class ScriptServerMain : conscmd_callback - { - private readonly string m_logFilename = ("region-console.log"); - internal RegionCommManager RegionScriptDaemon; // Listen for incoming from region - internal ScriptEngineManager ScriptEngines; // Loads scriptengines - private LogBase m_log; - - public ScriptServerMain() - { - m_log = CreateLog(); - - RegionScriptDaemon = new RegionCommManager(this, m_log); - ScriptEngines = new ScriptEngineManager(this, m_log); - - } - - ~ScriptServerMain() - { - } - - protected LogBase CreateLog() - { - if (!Directory.Exists(Util.logDir())) - { - Directory.CreateDirectory(Util.logDir()); - } - - return new LogBase((Path.Combine(Util.logDir(), m_logFilename)), "Region", this, false); - } - - public void RunCmd(string command, string[] cmdparams) - { - } - public void Show(string ShowWhat) - { - } - - } -} +using System; +using System.Collections.Generic; +using System.Text; +using System.IO; +using OpenSim.Framework.Console; +using OpenSim.Framework.Utilities; + +namespace OpenSim.Grid.ScriptServer +{ + public class ScriptServerMain : conscmd_callback + { + private readonly string m_logFilename = ("region-console.log"); + internal RegionCommManager RegionScriptDaemon; // Listen for incoming from region + internal ScriptEngineManager ScriptEngines; // Loads scriptengines + private LogBase m_log; + + public ScriptServerMain() + { + m_log = CreateLog(); + + RegionScriptDaemon = new RegionCommManager(this, m_log); + ScriptEngines = new ScriptEngineManager(this, m_log); + + } + + ~ScriptServerMain() + { + } + + protected LogBase CreateLog() + { + if (!Directory.Exists(Util.logDir())) + { + Directory.CreateDirectory(Util.logDir()); + } + + return new LogBase((Path.Combine(Util.logDir(), m_logFilename)), "Region", this, false); + } + + public void RunCmd(string command, string[] cmdparams) + { + } + public void Show(string ShowWhat) + { + } + + } +} -- cgit v1.1