diff options
Diffstat (limited to 'OpenSim/Grid/ScriptServer')
11 files changed, 30 insertions, 38 deletions
diff --git a/OpenSim/Grid/ScriptServer/Application.cs b/OpenSim/Grid/ScriptServer/Application.cs index dc0bf62..ef93f65 100644 --- a/OpenSim/Grid/ScriptServer/Application.cs +++ b/OpenSim/Grid/ScriptServer/Application.cs | |||
@@ -39,7 +39,7 @@ namespace OpenSim.Grid.ScriptServer | |||
39 | XmlConfigurator.Configure(); | 39 | XmlConfigurator.Configure(); |
40 | 40 | ||
41 | AppDomain.CurrentDomain.UnhandledException += | 41 | AppDomain.CurrentDomain.UnhandledException += |
42 | CurrentDomain_UnhandledException; | 42 | new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); |
43 | 43 | ||
44 | // Application is starting | 44 | // Application is starting |
45 | SE = new ScriptServerMain(); | 45 | SE = new ScriptServerMain(); |
@@ -50,9 +50,9 @@ namespace OpenSim.Grid.ScriptServer | |||
50 | Console.WriteLine(String.Empty); | 50 | Console.WriteLine(String.Empty); |
51 | Console.WriteLine("APPLICATION EXCEPTION DETECTED"); | 51 | Console.WriteLine("APPLICATION EXCEPTION DETECTED"); |
52 | Console.WriteLine(String.Empty); | 52 | Console.WriteLine(String.Empty); |
53 | Console.WriteLine("Application is terminating: " + e.IsTerminating); | 53 | Console.WriteLine("Application is terminating: " + e.IsTerminating.ToString()); |
54 | //Console.WriteLine("Exception:"); | 54 | //Console.WriteLine("Exception:"); |
55 | //Console.WriteLine(e.ExceptionObject.ToString()); | 55 | //Console.WriteLine(e.ExceptionObject.ToString()); |
56 | } | 56 | } |
57 | } | 57 | } |
58 | } \ No newline at end of file | 58 | } |
diff --git a/OpenSim/Grid/ScriptServer/FakeScene.cs b/OpenSim/Grid/ScriptServer/FakeScene.cs index e037698..480050d 100644 --- a/OpenSim/Grid/ScriptServer/FakeScene.cs +++ b/OpenSim/Grid/ScriptServer/FakeScene.cs | |||
@@ -34,7 +34,7 @@ using OpenSim.Region.Environment.Scenes; | |||
34 | 34 | ||
35 | namespace OpenSim.Grid.ScriptServer | 35 | namespace OpenSim.Grid.ScriptServer |
36 | { | 36 | { |
37 | public class FakeScene : Scene | 37 | public class FakeScene: Scene |
38 | { | 38 | { |
39 | public FakeScene(RegionInfo regInfo, AgentCircuitManager authen, PermissionManager permissionManager, | 39 | public FakeScene(RegionInfo regInfo, AgentCircuitManager authen, PermissionManager permissionManager, |
40 | CommunicationsManager commsMan, SceneCommunicationService sceneGridService, | 40 | CommunicationsManager commsMan, SceneCommunicationService sceneGridService, |
@@ -48,4 +48,4 @@ namespace OpenSim.Grid.ScriptServer | |||
48 | 48 | ||
49 | // What does a scene have to do? :P | 49 | // What does a scene have to do? :P |
50 | } | 50 | } |
51 | } \ No newline at end of file | 51 | } |
diff --git a/OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs b/OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs index bb33e02..e4161d3 100644 --- a/OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs +++ b/OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs | |||
@@ -60,4 +60,4 @@ using System.Runtime.InteropServices; | |||
60 | // | 60 | // |
61 | 61 | ||
62 | [assembly : AssemblyVersion("1.0.0.0")] | 62 | [assembly : AssemblyVersion("1.0.0.0")] |
63 | [assembly : AssemblyFileVersion("1.0.0.0")] \ No newline at end of file | 63 | [assembly : AssemblyFileVersion("1.0.0.0")] |
diff --git a/OpenSim/Grid/ScriptServer/RemotingObject.cs b/OpenSim/Grid/ScriptServer/RemotingObject.cs index 6686b26..9d3065b 100644 --- a/OpenSim/Grid/ScriptServer/RemotingObject.cs +++ b/OpenSim/Grid/ScriptServer/RemotingObject.cs | |||
@@ -34,13 +34,9 @@ namespace OpenSim.Grid.ScriptServer | |||
34 | { | 34 | { |
35 | // This object will be exposed over remoting. It is a singleton, so it exists only in as one instance. | 35 | // This object will be exposed over remoting. It is a singleton, so it exists only in as one instance. |
36 | 36 | ||
37 | #region ServerRemotingObject Members | ||
38 | |||
39 | ScriptServerInterfaces.RemoteEvents ScriptServerInterfaces.ServerRemotingObject.Events() | 37 | ScriptServerInterfaces.RemoteEvents ScriptServerInterfaces.ServerRemotingObject.Events() |
40 | { | 38 | { |
41 | return ScriptServerMain.Engine.EventManager(); | 39 | return ScriptServerMain.Engine.EventManager(); |
42 | } | 40 | } |
43 | |||
44 | #endregion | ||
45 | } | 41 | } |
46 | } \ No newline at end of file | 42 | } |
diff --git a/OpenSim/Grid/ScriptServer/RemotingServer.cs b/OpenSim/Grid/ScriptServer/RemotingServer.cs index 9d75a83..7d0e334 100644 --- a/OpenSim/Grid/ScriptServer/RemotingServer.cs +++ b/OpenSim/Grid/ScriptServer/RemotingServer.cs | |||
@@ -31,10 +31,9 @@ using System.Runtime.Remoting.Channels.Tcp; | |||
31 | 31 | ||
32 | namespace OpenSim.Grid.ScriptServer | 32 | namespace OpenSim.Grid.ScriptServer |
33 | { | 33 | { |
34 | internal class RemotingServer | 34 | class RemotingServer |
35 | { | 35 | { |
36 | private readonly TcpChannel channel; | 36 | TcpChannel channel; |
37 | |||
38 | public RemotingServer(int port, string instanceName) | 37 | public RemotingServer(int port, string instanceName) |
39 | { | 38 | { |
40 | // Create an instance of a channel | 39 | // Create an instance of a channel |
@@ -43,9 +42,9 @@ namespace OpenSim.Grid.ScriptServer | |||
43 | 42 | ||
44 | // Register as an available service with the name HelloWorld | 43 | // Register as an available service with the name HelloWorld |
45 | RemotingConfiguration.RegisterWellKnownServiceType( | 44 | RemotingConfiguration.RegisterWellKnownServiceType( |
46 | typeof (RemotingObject), | 45 | typeof(RemotingObject), |
47 | instanceName, | 46 | instanceName, |
48 | WellKnownObjectMode.Singleton); | 47 | WellKnownObjectMode.Singleton); |
49 | } | 48 | } |
50 | } | 49 | } |
51 | } \ No newline at end of file | 50 | } |
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionBase.cs b/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionBase.cs index 4f9f2e7..a02429c 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionBase.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionBase.cs | |||
@@ -32,13 +32,8 @@ namespace OpenSim.Grid.ScriptServer.ScriptServer.Region | |||
32 | // These are events that the region needs to have | 32 | // These are events that the region needs to have |
33 | 33 | ||
34 | // TEMP: Using System.Delegate -- needs replacing with a real delegate | 34 | // TEMP: Using System.Delegate -- needs replacing with a real delegate |
35 | |||
36 | #region Delegates | ||
37 | |||
38 | public delegate void DefaultDelegate(); | 35 | public delegate void DefaultDelegate(); |
39 | 36 | ||
40 | #endregion | ||
41 | |||
42 | public event DefaultDelegate onScriptRez; | 37 | public event DefaultDelegate onScriptRez; |
43 | public event DefaultDelegate onstate_entry; | 38 | public event DefaultDelegate onstate_entry; |
44 | public event DefaultDelegate onstate_exit; | 39 | public event DefaultDelegate onstate_exit; |
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs index 3c20272..8c31b9b 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs | |||
@@ -29,8 +29,8 @@ namespace OpenSim.Grid.ScriptServer.ScriptServer.Region | |||
29 | { | 29 | { |
30 | public class RegionConnectionManager : RegionBase | 30 | public class RegionConnectionManager : RegionBase |
31 | { | 31 | { |
32 | private object m_Connection; | ||
33 | private ScriptServerMain m_ScriptServerMain; | 32 | private ScriptServerMain m_ScriptServerMain; |
33 | private object m_Connection; | ||
34 | 34 | ||
35 | public RegionConnectionManager(ScriptServerMain scm, object Connection) | 35 | public RegionConnectionManager(ScriptServerMain scm, object Connection) |
36 | { | 36 | { |
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs index c1449bf..8422bea 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs | |||
@@ -34,10 +34,12 @@ namespace OpenSim.Grid.ScriptServer.ScriptServer | |||
34 | { | 34 | { |
35 | internal class RegionCommManager | 35 | internal class RegionCommManager |
36 | { | 36 | { |
37 | private readonly ScriptServerMain m_ScriptServerMain; | ||
38 | private readonly List<RegionConnectionManager> Regions = new List<RegionConnectionManager>(); | ||
39 | private Thread listenThread; | 37 | private Thread listenThread; |
40 | 38 | ||
39 | private List<RegionConnectionManager> Regions = new List<RegionConnectionManager>(); | ||
40 | |||
41 | private ScriptServerMain m_ScriptServerMain; | ||
42 | |||
41 | public RegionCommManager(ScriptServerMain scm) | 43 | public RegionCommManager(ScriptServerMain scm) |
42 | { | 44 | { |
43 | m_ScriptServerMain = scm; | 45 | m_ScriptServerMain = scm; |
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineLoader.cs b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineLoader.cs index dce92ce..4d8c559 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineLoader.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineLoader.cs | |||
@@ -51,7 +51,7 @@ namespace OpenSim.Grid.ScriptServer.ScriptServer | |||
51 | { | 51 | { |
52 | m_log.Error("[ScriptEngine]: " + | 52 | m_log.Error("[ScriptEngine]: " + |
53 | "Error loading assembly \"" + EngineName + "\": " + e.Message + ", " + | 53 | "Error loading assembly \"" + EngineName + "\": " + e.Message + ", " + |
54 | e.StackTrace); | 54 | e.StackTrace.ToString()); |
55 | } | 55 | } |
56 | return ret; | 56 | return ret; |
57 | } | 57 | } |
@@ -104,7 +104,7 @@ namespace OpenSim.Grid.ScriptServer.ScriptServer | |||
104 | ScriptServerInterfaces.ScriptEngine ret; | 104 | ScriptServerInterfaces.ScriptEngine ret; |
105 | //try | 105 | //try |
106 | //{ | 106 | //{ |
107 | ret = (ScriptServerInterfaces.ScriptEngine) Activator.CreateInstance(t); | 107 | ret = (ScriptServerInterfaces.ScriptEngine)Activator.CreateInstance(t); |
108 | //} | 108 | //} |
109 | //catch (Exception e) | 109 | //catch (Exception e) |
110 | //{ | 110 | //{ |
@@ -114,4 +114,4 @@ namespace OpenSim.Grid.ScriptServer.ScriptServer | |||
114 | return ret; | 114 | return ret; |
115 | } | 115 | } |
116 | } | 116 | } |
117 | } \ No newline at end of file | 117 | } |
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs index 9ecd179..9d67602 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs | |||
@@ -32,8 +32,8 @@ namespace OpenSim.Grid.ScriptServer.ScriptServer | |||
32 | { | 32 | { |
33 | internal class ScriptEngineManager | 33 | internal class ScriptEngineManager |
34 | { | 34 | { |
35 | private readonly ScriptEngineLoader ScriptEngineLoader; | 35 | private ScriptEngineLoader ScriptEngineLoader; |
36 | private readonly List<ScriptServerInterfaces.ScriptEngine> scriptEngines = new List<ScriptServerInterfaces.ScriptEngine>(); | 36 | private List<ScriptServerInterfaces.ScriptEngine> scriptEngines = new List<ScriptServerInterfaces.ScriptEngine>(); |
37 | private ScriptServerMain m_ScriptServerMain; | 37 | private ScriptServerMain m_ScriptServerMain; |
38 | 38 | ||
39 | // Initialize | 39 | // Initialize |
@@ -58,4 +58,4 @@ namespace OpenSim.Grid.ScriptServer.ScriptServer | |||
58 | return sei; | 58 | return sei; |
59 | } | 59 | } |
60 | } | 60 | } |
61 | } \ No newline at end of file | 61 | } |
diff --git a/OpenSim/Grid/ScriptServer/ScriptServerMain.cs b/OpenSim/Grid/ScriptServer/ScriptServerMain.cs index 131ff34..528b51c 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServerMain.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServerMain.cs | |||
@@ -44,20 +44,20 @@ namespace OpenSim.Grid.ScriptServer | |||
44 | // | 44 | // |
45 | // Root object. Creates objects used. | 45 | // Root object. Creates objects used. |
46 | // | 46 | // |
47 | private int listenPort = 8010; | ||
47 | 48 | ||
48 | // TEMP | 49 | // TEMP |
49 | public static ScriptServerInterfaces.ScriptEngine Engine; | 50 | public static ScriptServerInterfaces.ScriptEngine Engine; |
50 | private int listenPort = 8010; | ||
51 | //public static FakeScene m_Scene = new FakeScene(null,null,null,null,null,null,null,null,null,false, false, false); | 51 | //public static FakeScene m_Scene = new FakeScene(null,null,null,null,null,null,null,null,null,false, false, false); |
52 | 52 | ||
53 | // Objects we use | 53 | // Objects we use |
54 | internal RegionCommManager RegionScriptDaemon; // Listen for incoming from region | ||
55 | internal ScriptEngineManager ScriptEngines; // Loads scriptengines | ||
54 | //internal RemotingServer m_RemotingServer; | 56 | //internal RemotingServer m_RemotingServer; |
55 | internal TCPServer m_TCPServer; | 57 | internal TCPServer m_TCPServer; |
56 | internal RegionCommManager RegionScriptDaemon; // Listen for incoming from region | ||
57 | internal TRPC_Remote RPC; | 58 | internal TRPC_Remote RPC; |
58 | internal ScriptEngineManager ScriptEngines; // Loads scriptengines | ||
59 | 59 | ||
60 | public ScriptServerMain() | 60 | public ScriptServerMain() |
61 | { | 61 | { |
62 | m_console = CreateConsole(); | 62 | m_console = CreateConsole(); |
63 | 63 | ||
@@ -68,13 +68,13 @@ namespace OpenSim.Grid.ScriptServer | |||
68 | Engine = ScriptEngines.LoadEngine("DotNetEngine"); | 68 | Engine = ScriptEngines.LoadEngine("DotNetEngine"); |
69 | 69 | ||
70 | Engine.InitializeEngine(null, null, false, Engine.GetScriptManager()); | 70 | Engine.InitializeEngine(null, null, false, Engine.GetScriptManager()); |
71 | 71 | ||
72 | 72 | ||
73 | // Set up server | 73 | // Set up server |
74 | //m_RemotingServer = new RemotingServer(listenPort, "DotNetEngine"); | 74 | //m_RemotingServer = new RemotingServer(listenPort, "DotNetEngine"); |
75 | m_TCPServer = new TCPServer(listenPort); | 75 | m_TCPServer = new TCPServer(listenPort); |
76 | RPC = new TRPC_Remote(m_TCPServer); | 76 | RPC = new TRPC_Remote(m_TCPServer); |
77 | RPC.ReceiveCommand += RPC_ReceiveCommand; | 77 | RPC.ReceiveCommand += new TRPC_Remote.ReceiveCommandDelegate(RPC_ReceiveCommand); |
78 | m_TCPServer.StartListen(); | 78 | m_TCPServer.StartListen(); |
79 | 79 | ||
80 | Console.ReadLine(); | 80 | Console.ReadLine(); |
@@ -93,7 +93,7 @@ namespace OpenSim.Grid.ScriptServer | |||
93 | 93 | ||
94 | if (Command == "OnRezScript") | 94 | if (Command == "OnRezScript") |
95 | { | 95 | { |
96 | Engine.EventManager().OnRezScript((uint) p[0], new LLUUID((string) p[1]), (string) p[2]); | 96 | Engine.EventManager().OnRezScript((uint)p[0], new LLUUID((string)p[1]), (string)p[2]); |
97 | } | 97 | } |
98 | } | 98 | } |
99 | 99 | ||
@@ -106,4 +106,4 @@ namespace OpenSim.Grid.ScriptServer | |||
106 | return new ConsoleBase("ScriptServer", this); | 106 | return new ConsoleBase("ScriptServer", this); |
107 | } | 107 | } |
108 | } | 108 | } |
109 | } \ No newline at end of file | 109 | } |