diff options
author | Sean Dague | 2007-10-05 15:45:45 +0000 |
---|---|---|
committer | Sean Dague | 2007-10-05 15:45:45 +0000 |
commit | c3d8f1f4253f72484100394940e62f2912cbc4ff (patch) | |
tree | 8a9f237ed3c1140b4059ec121e0d4ede82eae416 /OpenSim/Grid/ScriptServer | |
parent | * So, ok, maybe renaming serialized fields on a friday wasn't the smartest of... (diff) | |
download | opensim-SC-c3d8f1f4253f72484100394940e62f2912cbc4ff.zip opensim-SC-c3d8f1f4253f72484100394940e62f2912cbc4ff.tar.gz opensim-SC-c3d8f1f4253f72484100394940e62f2912cbc4ff.tar.bz2 opensim-SC-c3d8f1f4253f72484100394940e62f2912cbc4ff.tar.xz |
getting all our line endings consistant again
Diffstat (limited to 'OpenSim/Grid/ScriptServer')
7 files changed, 248 insertions, 248 deletions
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 @@ | |||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Text; | 30 | using System.Text; |
31 | 31 | ||
32 | namespace OpenSim.Grid.ScriptServer | 32 | namespace OpenSim.Grid.ScriptServer |
33 | { | 33 | { |
34 | class OpenScript_Main | 34 | class OpenScript_Main |
35 | { | 35 | { |
36 | 36 | ||
37 | public static ScriptServerMain SE; | 37 | public static ScriptServerMain SE; |
38 | 38 | ||
39 | static void Main(string[] args) | 39 | static void Main(string[] args) |
40 | { | 40 | { |
41 | // Application is starting | 41 | // Application is starting |
42 | SE = new ScriptServerMain(); | 42 | SE = new ScriptServerMain(); |
43 | 43 | ||
44 | System.AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); | 44 | System.AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); |
45 | } | 45 | } |
46 | 46 | ||
47 | static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) | 47 | static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) |
48 | { | 48 | { |
49 | Console.WriteLine(""); | 49 | Console.WriteLine(""); |
50 | Console.WriteLine("APPLICATION EXCEPTION DETECTED"); | 50 | Console.WriteLine("APPLICATION EXCEPTION DETECTED"); |
51 | Console.WriteLine(""); | 51 | Console.WriteLine(""); |
52 | Console.WriteLine("Application is terminating: " + e.IsTerminating.ToString()); | 52 | Console.WriteLine("Application is terminating: " + e.IsTerminating.ToString()); |
53 | Console.WriteLine("Exception:"); | 53 | Console.WriteLine("Exception:"); |
54 | Console.WriteLine(e.ExceptionObject.ToString()); | 54 | Console.WriteLine(e.ExceptionObject.ToString()); |
55 | } | 55 | } |
56 | 56 | ||
57 | } | 57 | } |
58 | } | 58 | } |
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 @@ | |||
1 | using System.Reflection; | 1 | using System.Reflection; |
2 | using System.Runtime.CompilerServices; | 2 | using System.Runtime.CompilerServices; |
3 | using System.Runtime.InteropServices; | 3 | using System.Runtime.InteropServices; |
4 | 4 | ||
5 | // General Information about an assembly is controlled through the following | 5 | // General Information about an assembly is controlled through the following |
6 | // set of attributes. Change these attribute values to modify the information | 6 | // set of attributes. Change these attribute values to modify the information |
7 | // associated with an assembly. | 7 | // associated with an assembly. |
8 | [assembly: AssemblyTitle("OpenSim.Grid.ScriptServer")] | 8 | [assembly: AssemblyTitle("OpenSim.Grid.ScriptServer")] |
9 | [assembly: AssemblyDescription("")] | 9 | [assembly: AssemblyDescription("")] |
10 | [assembly: AssemblyConfiguration("")] | 10 | [assembly: AssemblyConfiguration("")] |
11 | [assembly: AssemblyCompany("")] | 11 | [assembly: AssemblyCompany("")] |
12 | [assembly: AssemblyProduct("OpenSim.Grid.ScriptServer")] | 12 | [assembly: AssemblyProduct("OpenSim.Grid.ScriptServer")] |
13 | [assembly: AssemblyCopyright("Copyright © 2007")] | 13 | [assembly: AssemblyCopyright("Copyright © 2007")] |
14 | [assembly: AssemblyTrademark("")] | 14 | [assembly: AssemblyTrademark("")] |
15 | [assembly: AssemblyCulture("")] | 15 | [assembly: AssemblyCulture("")] |
16 | 16 | ||
17 | // Setting ComVisible to false makes the types in this assembly not visible | 17 | // Setting ComVisible to false makes the types in this assembly not visible |
18 | // to COM components. If you need to access a type in this assembly from | 18 | // to COM components. If you need to access a type in this assembly from |
19 | // COM, set the ComVisible attribute to true on that type. | 19 | // COM, set the ComVisible attribute to true on that type. |
20 | [assembly: ComVisible(false)] | 20 | [assembly: ComVisible(false)] |
21 | 21 | ||
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM |
23 | [assembly: Guid("b6861b87-5203-4040-b756-fd4774932f82")] | 23 | [assembly: Guid("b6861b87-5203-4040-b756-fd4774932f82")] |
24 | 24 | ||
25 | // Version information for an assembly consists of the following four values: | 25 | // Version information for an assembly consists of the following four values: |
26 | // | 26 | // |
27 | // Major Version | 27 | // Major Version |
28 | // Minor Version | 28 | // Minor Version |
29 | // Build Number | 29 | // Build Number |
30 | // Revision | 30 | // Revision |
31 | // | 31 | // |
32 | [assembly: AssemblyVersion("1.0.0.0")] | 32 | [assembly: AssemblyVersion("1.0.0.0")] |
33 | [assembly: AssemblyFileVersion("1.0.0.0")] | 33 | [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 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
3 | using System.Text; | 3 | using System.Text; |
4 | 4 | ||
5 | namespace OpenSim.Grid.ScriptServer | 5 | namespace OpenSim.Grid.ScriptServer |
6 | { | 6 | { |
7 | // Maintains connection and communication to a region | 7 | // Maintains connection and communication to a region |
8 | internal class RegionConnectionManager | 8 | internal class RegionConnectionManager |
9 | { | 9 | { |
10 | 10 | ||
11 | public RegionConnectionManager() | 11 | public RegionConnectionManager() |
12 | { | 12 | { |
13 | } | 13 | } |
14 | 14 | ||
15 | } | 15 | } |
16 | } | 16 | } |
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 @@ | |||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Text; | 30 | using System.Text; |
31 | using System.Threading; | 31 | using System.Threading; |
32 | using OpenSim.Framework.Console; | 32 | using OpenSim.Framework.Console; |
33 | 33 | ||
34 | namespace OpenSim.Grid.ScriptServer | 34 | namespace OpenSim.Grid.ScriptServer |
35 | { | 35 | { |
36 | // Waiting for incoming script requests from region | 36 | // Waiting for incoming script requests from region |
37 | internal class RegionCommManager | 37 | internal class RegionCommManager |
38 | { | 38 | { |
39 | private Thread listenThread; | 39 | private Thread listenThread; |
40 | 40 | ||
41 | private List<RegionConnectionManager> Regions = new List<RegionConnectionManager>(); | 41 | private List<RegionConnectionManager> Regions = new List<RegionConnectionManager>(); |
42 | 42 | ||
43 | private LogBase m_log; | 43 | private LogBase m_log; |
44 | private ScriptServerMain m_ScriptServerMain; | 44 | private ScriptServerMain m_ScriptServerMain; |
45 | public RegionCommManager(ScriptServerMain scm, LogBase logger) | 45 | public RegionCommManager(ScriptServerMain scm, LogBase logger) |
46 | { | 46 | { |
47 | m_ScriptServerMain = scm; | 47 | m_ScriptServerMain = scm; |
48 | m_log = logger; | 48 | m_log = logger; |
49 | } | 49 | } |
50 | ~RegionCommManager() | 50 | ~RegionCommManager() |
51 | { | 51 | { |
52 | Stop(); | 52 | Stop(); |
53 | } | 53 | } |
54 | 54 | ||
55 | /// <summary> | 55 | /// <summary> |
56 | /// Starts listening for region requests | 56 | /// Starts listening for region requests |
57 | /// </summary> | 57 | /// </summary> |
58 | public void Start() | 58 | public void Start() |
59 | { | 59 | { |
60 | // Start listener | 60 | // Start listener |
61 | Stop(); | 61 | Stop(); |
62 | listenThread = new Thread(ListenThreadLoop); | 62 | listenThread = new Thread(ListenThreadLoop); |
63 | listenThread.Name = "listenThread"; | 63 | listenThread.Name = "listenThread"; |
64 | listenThread.IsBackground = true; | 64 | listenThread.IsBackground = true; |
65 | listenThread.Start(); | 65 | listenThread.Start(); |
66 | } | 66 | } |
67 | /// <summary> | 67 | /// <summary> |
68 | /// Stops listening for region requests | 68 | /// Stops listening for region requests |
69 | /// </summary> | 69 | /// </summary> |
70 | public void Stop() | 70 | public void Stop() |
71 | { | 71 | { |
72 | // Stop listener, clean up | 72 | // Stop listener, clean up |
73 | if (listenThread != null) | 73 | if (listenThread != null) |
74 | { | 74 | { |
75 | try | 75 | try |
76 | { | 76 | { |
77 | if (listenThread.IsAlive) | 77 | if (listenThread.IsAlive) |
78 | listenThread.Abort(); | 78 | listenThread.Abort(); |
79 | listenThread.Join(1000); // Wait 1 second for thread to shut down | 79 | listenThread.Join(1000); // Wait 1 second for thread to shut down |
80 | } | 80 | } |
81 | catch { } | 81 | catch { } |
82 | listenThread = null; | 82 | listenThread = null; |
83 | } | 83 | } |
84 | } | 84 | } |
85 | 85 | ||
86 | private void ListenThreadLoop() | 86 | private void ListenThreadLoop() |
87 | { | 87 | { |
88 | // * Listen for requests from regions | 88 | // * Listen for requests from regions |
89 | // * When a request is received: | 89 | // * When a request is received: |
90 | // - Authenticate region | 90 | // - Authenticate region |
91 | // - Authenticate user | 91 | // - Authenticate user |
92 | // - Have correct scriptengine load script | 92 | // - Have correct scriptengine load script |
93 | // ~ ask scriptengines if they will accept script? | 93 | // ~ ask scriptengines if they will accept script? |
94 | // - Add script to shared communication channel towards that region | 94 | // - Add script to shared communication channel towards that region |
95 | 95 | ||
96 | } | 96 | } |
97 | 97 | ||
98 | } | 98 | } |
99 | } | 99 | } |
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 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.IO; | 29 | using System.IO; |
30 | using System.Reflection; | 30 | using System.Reflection; |
31 | using OpenSim.Framework.Console; | 31 | using OpenSim.Framework.Console; |
32 | 32 | ||
33 | namespace OpenSim.Grid.ScriptServer | 33 | namespace OpenSim.Grid.ScriptServer |
34 | { | 34 | { |
35 | internal class ScriptEngineLoader | 35 | internal class ScriptEngineLoader |
@@ -39,7 +39,7 @@ namespace OpenSim.Grid.ScriptServer | |||
39 | 39 | ||
40 | public ScriptEngineLoader(LogBase logger) | 40 | public ScriptEngineLoader(LogBase logger) |
41 | { | 41 | { |
42 | m_log = logger; | 42 | m_log = logger; |
43 | } | 43 | } |
44 | 44 | ||
45 | public ScriptEngineInterface LoadScriptEngine(string EngineName) | 45 | public ScriptEngineInterface LoadScriptEngine(string EngineName) |
@@ -121,5 +121,5 @@ namespace OpenSim.Grid.ScriptServer | |||
121 | return ret; | 121 | return ret; |
122 | } | 122 | } |
123 | } | 123 | } |
124 | } | 124 | } |
125 | 125 | ||
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 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
3 | using System.Text; | 3 | using System.Text; |
4 | using OpenSim.Framework.Console; | 4 | using OpenSim.Framework.Console; |
5 | 5 | ||
6 | namespace OpenSim.Grid.ScriptServer | 6 | namespace OpenSim.Grid.ScriptServer |
7 | { | 7 | { |
8 | internal class ScriptEngineManager | 8 | internal class ScriptEngineManager |
9 | { | 9 | { |
10 | private LogBase m_log; | 10 | private LogBase m_log; |
11 | private ScriptEngineLoader ScriptEngineLoader; | 11 | private ScriptEngineLoader ScriptEngineLoader; |
12 | private List<ScriptEngineInterface> scriptEngines = new List<ScriptEngineInterface>(); | 12 | private List<ScriptEngineInterface> scriptEngines = new List<ScriptEngineInterface>(); |
13 | private ScriptServerMain m_ScriptServerMain; | 13 | private ScriptServerMain m_ScriptServerMain; |
14 | 14 | ||
15 | // Initialize | 15 | // Initialize |
16 | public ScriptEngineManager(ScriptServerMain scm, LogBase logger) | 16 | public ScriptEngineManager(ScriptServerMain scm, LogBase logger) |
17 | { | 17 | { |
18 | m_ScriptServerMain = scm; | 18 | m_ScriptServerMain = scm; |
19 | m_log = logger; | 19 | m_log = logger; |
20 | ScriptEngineLoader = new ScriptEngineLoader(m_log); | 20 | ScriptEngineLoader = new ScriptEngineLoader(m_log); |
21 | 21 | ||
22 | // Temp - we should not load during initialize... Loading should be done later. | 22 | // Temp - we should not load during initialize... Loading should be done later. |
23 | LoadEngine("DotNetScriptEngine"); | 23 | LoadEngine("DotNetScriptEngine"); |
24 | } | 24 | } |
25 | ~ScriptEngineManager() | 25 | ~ScriptEngineManager() |
26 | { | 26 | { |
27 | } | 27 | } |
28 | 28 | ||
29 | public void LoadEngine(string engineName) | 29 | public void LoadEngine(string engineName) |
30 | { | 30 | { |
31 | // Load and add to list of ScriptEngines | 31 | // Load and add to list of ScriptEngines |
32 | ScriptEngineInterface sei = ScriptEngineLoader.LoadScriptEngine(engineName); | 32 | ScriptEngineInterface sei = ScriptEngineLoader.LoadScriptEngine(engineName); |
33 | if (sei != null) | 33 | if (sei != null) |
34 | { | 34 | { |
35 | scriptEngines.Add(sei); | 35 | scriptEngines.Add(sei); |
36 | } | 36 | } |
37 | } | 37 | } |
38 | 38 | ||
39 | 39 | ||
40 | } | 40 | } |
41 | } | 41 | } |
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 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
3 | using System.Text; | 3 | using System.Text; |
4 | using System.IO; | 4 | using System.IO; |
5 | using OpenSim.Framework.Console; | 5 | using OpenSim.Framework.Console; |
6 | using OpenSim.Framework.Utilities; | 6 | using OpenSim.Framework.Utilities; |
7 | 7 | ||
8 | namespace OpenSim.Grid.ScriptServer | 8 | namespace OpenSim.Grid.ScriptServer |
9 | { | 9 | { |
10 | public class ScriptServerMain : conscmd_callback | 10 | public class ScriptServerMain : conscmd_callback |
11 | { | 11 | { |
12 | private readonly string m_logFilename = ("region-console.log"); | 12 | private readonly string m_logFilename = ("region-console.log"); |
13 | internal RegionCommManager RegionScriptDaemon; // Listen for incoming from region | 13 | internal RegionCommManager RegionScriptDaemon; // Listen for incoming from region |
14 | internal ScriptEngineManager ScriptEngines; // Loads scriptengines | 14 | internal ScriptEngineManager ScriptEngines; // Loads scriptengines |
15 | private LogBase m_log; | 15 | private LogBase m_log; |
16 | 16 | ||
17 | public ScriptServerMain() | 17 | public ScriptServerMain() |
18 | { | 18 | { |
19 | m_log = CreateLog(); | 19 | m_log = CreateLog(); |
20 | 20 | ||
21 | RegionScriptDaemon = new RegionCommManager(this, m_log); | 21 | RegionScriptDaemon = new RegionCommManager(this, m_log); |
22 | ScriptEngines = new ScriptEngineManager(this, m_log); | 22 | ScriptEngines = new ScriptEngineManager(this, m_log); |
23 | 23 | ||
24 | } | 24 | } |
25 | 25 | ||
26 | ~ScriptServerMain() | 26 | ~ScriptServerMain() |
27 | { | 27 | { |
28 | } | 28 | } |
29 | 29 | ||
30 | protected LogBase CreateLog() | 30 | protected LogBase CreateLog() |
31 | { | 31 | { |
32 | if (!Directory.Exists(Util.logDir())) | 32 | if (!Directory.Exists(Util.logDir())) |
33 | { | 33 | { |
34 | Directory.CreateDirectory(Util.logDir()); | 34 | Directory.CreateDirectory(Util.logDir()); |
35 | } | 35 | } |
36 | 36 | ||
37 | return new LogBase((Path.Combine(Util.logDir(), m_logFilename)), "Region", this, false); | 37 | return new LogBase((Path.Combine(Util.logDir(), m_logFilename)), "Region", this, false); |
38 | } | 38 | } |
39 | 39 | ||
40 | public void RunCmd(string command, string[] cmdparams) | 40 | public void RunCmd(string command, string[] cmdparams) |
41 | { | 41 | { |
42 | } | 42 | } |
43 | public void Show(string ShowWhat) | 43 | public void Show(string ShowWhat) |
44 | { | 44 | { |
45 | } | 45 | } |
46 | 46 | ||
47 | } | 47 | } |
48 | } | 48 | } |