aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/ScriptServer
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Grid/ScriptServer/Application.cs6
-rw-r--r--OpenSim/Grid/ScriptServer/FakeScene.cs4
-rw-r--r--OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs2
-rw-r--r--OpenSim/Grid/ScriptServer/RemotingObject.cs6
-rw-r--r--OpenSim/Grid/ScriptServer/RemotingServer.cs9
-rw-r--r--OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionBase.cs5
-rw-r--r--OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs2
-rw-r--r--OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs6
-rw-r--r--OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineLoader.cs6
-rw-r--r--OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs6
-rw-r--r--OpenSim/Grid/ScriptServer/ScriptServerMain.cs16
11 files changed, 38 insertions, 30 deletions
diff --git a/OpenSim/Grid/ScriptServer/Application.cs b/OpenSim/Grid/ScriptServer/Application.cs
index ef93f65..dc0bf62 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 new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); 42 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.ToString()); 53 Console.WriteLine("Application is terminating: " + e.IsTerminating);
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} 58} \ No newline at end of file
diff --git a/OpenSim/Grid/ScriptServer/FakeScene.cs b/OpenSim/Grid/ScriptServer/FakeScene.cs
index 480050d..e037698 100644
--- a/OpenSim/Grid/ScriptServer/FakeScene.cs
+++ b/OpenSim/Grid/ScriptServer/FakeScene.cs
@@ -34,7 +34,7 @@ using OpenSim.Region.Environment.Scenes;
34 34
35namespace OpenSim.Grid.ScriptServer 35namespace 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} 51} \ No newline at end of file
diff --git a/OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs b/OpenSim/Grid/ScriptServer/Properties/AssemblyInfo.cs
index e4161d3..bb33e02 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")] 63[assembly : AssemblyFileVersion("1.0.0.0")] \ No newline at end of file
diff --git a/OpenSim/Grid/ScriptServer/RemotingObject.cs b/OpenSim/Grid/ScriptServer/RemotingObject.cs
index 9d3065b..6686b26 100644
--- a/OpenSim/Grid/ScriptServer/RemotingObject.cs
+++ b/OpenSim/Grid/ScriptServer/RemotingObject.cs
@@ -34,9 +34,13 @@ 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
37 ScriptServerInterfaces.RemoteEvents ScriptServerInterfaces.ServerRemotingObject.Events() 39 ScriptServerInterfaces.RemoteEvents ScriptServerInterfaces.ServerRemotingObject.Events()
38 { 40 {
39 return ScriptServerMain.Engine.EventManager(); 41 return ScriptServerMain.Engine.EventManager();
40 } 42 }
43
44 #endregion
41 } 45 }
42} 46} \ No newline at end of file
diff --git a/OpenSim/Grid/ScriptServer/RemotingServer.cs b/OpenSim/Grid/ScriptServer/RemotingServer.cs
index 7d0e334..9d75a83 100644
--- a/OpenSim/Grid/ScriptServer/RemotingServer.cs
+++ b/OpenSim/Grid/ScriptServer/RemotingServer.cs
@@ -31,9 +31,10 @@ using System.Runtime.Remoting.Channels.Tcp;
31 31
32namespace OpenSim.Grid.ScriptServer 32namespace OpenSim.Grid.ScriptServer
33{ 33{
34 class RemotingServer 34 internal class RemotingServer
35 { 35 {
36 TcpChannel channel; 36 private readonly TcpChannel channel;
37
37 public RemotingServer(int port, string instanceName) 38 public RemotingServer(int port, string instanceName)
38 { 39 {
39 // Create an instance of a channel 40 // Create an instance of a channel
@@ -42,9 +43,9 @@ namespace OpenSim.Grid.ScriptServer
42 43
43 // Register as an available service with the name HelloWorld 44 // Register as an available service with the name HelloWorld
44 RemotingConfiguration.RegisterWellKnownServiceType( 45 RemotingConfiguration.RegisterWellKnownServiceType(
45 typeof(RemotingObject), 46 typeof (RemotingObject),
46 instanceName, 47 instanceName,
47 WellKnownObjectMode.Singleton); 48 WellKnownObjectMode.Singleton);
48 } 49 }
49 } 50 }
50} 51} \ No newline at end of file
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionBase.cs b/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionBase.cs
index a02429c..4f9f2e7 100644
--- a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionBase.cs
+++ b/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionBase.cs
@@ -32,8 +32,13 @@ 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
35 public delegate void DefaultDelegate(); 38 public delegate void DefaultDelegate();
36 39
40 #endregion
41
37 public event DefaultDelegate onScriptRez; 42 public event DefaultDelegate onScriptRez;
38 public event DefaultDelegate onstate_entry; 43 public event DefaultDelegate onstate_entry;
39 public event DefaultDelegate onstate_exit; 44 public event DefaultDelegate onstate_exit;
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs
index 8c31b9b..3c20272 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 ScriptServerMain m_ScriptServerMain;
33 private object m_Connection; 32 private object m_Connection;
33 private ScriptServerMain m_ScriptServerMain;
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 8422bea..c1449bf 100644
--- a/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs
+++ b/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs
@@ -34,12 +34,10 @@ 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>();
37 private Thread listenThread; 39 private Thread listenThread;
38 40
39 private List<RegionConnectionManager> Regions = new List<RegionConnectionManager>();
40
41 private ScriptServerMain m_ScriptServerMain;
42
43 public RegionCommManager(ScriptServerMain scm) 41 public RegionCommManager(ScriptServerMain scm)
44 { 42 {
45 m_ScriptServerMain = scm; 43 m_ScriptServerMain = scm;
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineLoader.cs b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineLoader.cs
index 4d8c559..dce92ce 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.ToString()); 54 e.StackTrace);
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} 117} \ No newline at end of file
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs
index 9d67602..9ecd179 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 ScriptEngineLoader ScriptEngineLoader; 35 private readonly ScriptEngineLoader ScriptEngineLoader;
36 private List<ScriptServerInterfaces.ScriptEngine> scriptEngines = new List<ScriptServerInterfaces.ScriptEngine>(); 36 private readonly 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} 61} \ No newline at end of file
diff --git a/OpenSim/Grid/ScriptServer/ScriptServerMain.cs b/OpenSim/Grid/ScriptServer/ScriptServerMain.cs
index 528b51c..131ff34 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;
48 47
49 // TEMP 48 // TEMP
50 public static ScriptServerInterfaces.ScriptEngine Engine; 49 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
56 //internal RemotingServer m_RemotingServer; 54 //internal RemotingServer m_RemotingServer;
57 internal TCPServer m_TCPServer; 55 internal TCPServer m_TCPServer;
56 internal RegionCommManager RegionScriptDaemon; // Listen for incoming from region
58 internal TRPC_Remote RPC; 57 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 += new TRPC_Remote.ReceiveCommandDelegate(RPC_ReceiveCommand); 77 RPC.ReceiveCommand += 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} 109} \ No newline at end of file