aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-02-04 18:52:24 +0000
committerJustin Clarke Casey2008-02-04 18:52:24 +0000
commitbaefa05b575b28e1ed08670e9c937ca307f09269 (patch)
tree8f9703391fe86df4ecc1008a140e1ea760c1ae1b
parentChange sim command from "stats" to "show stats" for consistency (diff)
downloadopensim-SC_OLD-baefa05b575b28e1ed08670e9c937ca307f09269.zip
opensim-SC_OLD-baefa05b575b28e1ed08670e9c937ca307f09269.tar.gz
opensim-SC_OLD-baefa05b575b28e1ed08670e9c937ca307f09269.tar.bz2
opensim-SC_OLD-baefa05b575b28e1ed08670e9c937ca307f09269.tar.xz
* Rebase all current servers on common abstract BaseOpenSimServer class
* The immediate upshot is that "show uptime" from the console will now show uptime on all server types (user, asset, grid, etc) * DEV: This refactoring is far from complete - only just enough to makes the "show uptime" command common accross the servers. More is needed, but in this case it's somewhat like eating cabbage, which I prefer not to do all at once
-rw-r--r--OpenSim/Framework/Servers/BaseOpenSimServer.cs47
-rw-r--r--OpenSim/Grid/AssetServer/Main.cs44
-rw-r--r--OpenSim/Grid/GridServer/Main.cs34
-rw-r--r--OpenSim/Grid/InventoryServer/Main.cs23
-rw-r--r--OpenSim/Grid/MessagingServer/Main.cs27
-rw-r--r--OpenSim/Grid/ScriptServer/ScriptServerMain.cs14
-rw-r--r--OpenSim/Grid/UserServer/Main.cs43
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs149
-rw-r--r--OpenSim/Region/ClientStack/RegionApplicationBase.cs9
9 files changed, 201 insertions, 189 deletions
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index d04dbd7..3016715 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -28,16 +28,59 @@
28 28
29using System; 29using System;
30 30
31using OpenSim.Framework.Console;
32
31namespace OpenSim.Framework.Servers 33namespace OpenSim.Framework.Servers
32{ 34{
33 /// <summary> 35 /// <summary>
34 /// Common base for the main OpenSimServers (user, grid, inventory, region, etc) 36 /// Common base for the main OpenSimServers (user, grid, inventory, region, etc)
35 /// XXX Not yet implemented, may not grow up for some time
36 /// </summary> 37 /// </summary>
37 public class BaseOpenSimServer 38 public abstract class BaseOpenSimServer
38 { 39 {
40 protected LogBase m_log;
41
42 protected DateTime m_startuptime;
43
39 public BaseOpenSimServer() 44 public BaseOpenSimServer()
40 { 45 {
46 m_startuptime = DateTime.Now;
47 }
48
49 /// <summary>
50 /// Runs commands issued by the server console from the operator
51 /// </summary>
52 /// <param name="command">The first argument of the parameter (the command)</param>
53 /// <param name="cmdparams">Additional arguments passed to the command</param>
54 public virtual void RunCmd(string command, string[] cmdparams)
55 {
56 switch (command)
57 {
58 case "help":
59 m_log.Notice("show uptime - show server startup and uptime.");
60 break;
61
62 case "show":
63 if (cmdparams.Length > 0)
64 {
65 Show(cmdparams[0]);
66 }
67 break;
68 }
69 }
70
71 /// <summary>
72 /// Outputs to the console information about the region
73 /// </summary>
74 /// <param name="ShowWhat">What information to display (valid arguments are "uptime", "users")</param>
75 public virtual void Show(string ShowWhat)
76 {
77 switch (ShowWhat)
78 {
79 case "uptime":
80 m_log.Notice("Server has been running since " + m_startuptime.ToString());
81 m_log.Notice("That is " + (DateTime.Now - m_startuptime).ToString());
82 break;
83 }
41 } 84 }
42 } 85 }
43} 86}
diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs
index 23b0afa..a95ea71 100644
--- a/OpenSim/Grid/AssetServer/Main.cs
+++ b/OpenSim/Grid/AssetServer/Main.cs
@@ -41,13 +41,11 @@ namespace OpenSim.Grid.AssetServer
41 /// <summary> 41 /// <summary>
42 /// An asset server 42 /// An asset server
43 /// </summary> 43 /// </summary>
44 public class OpenAsset_Main : conscmd_callback 44 public class OpenAsset_Main : BaseOpenSimServer, conscmd_callback
45 { 45 {
46 public AssetConfig m_config; 46 public AssetConfig m_config;
47 47
48 public static OpenAsset_Main assetserver; 48 public static OpenAsset_Main assetserver;
49
50 private LogBase m_console;
51 49
52 // Temporarily hardcoded - should be a plugin 50 // Temporarily hardcoded - should be a plugin
53 protected IAssetLoader assetLoader = new AssetLoaderFileSystem(); 51 protected IAssetLoader assetLoader = new AssetLoaderFileSystem();
@@ -67,11 +65,11 @@ namespace OpenSim.Grid.AssetServer
67 65
68 private void Work() 66 private void Work()
69 { 67 {
70 m_console.Notice("Enter help for a list of commands"); 68 m_log.Notice("Enter help for a list of commands");
71 69
72 while (true) 70 while (true)
73 { 71 {
74 m_console.MainLogPrompt(); 72 m_log.MainLogPrompt();
75 } 73 }
76 } 74 }
77 75
@@ -81,22 +79,28 @@ namespace OpenSim.Grid.AssetServer
81 { 79 {
82 Directory.CreateDirectory(Util.logDir()); 80 Directory.CreateDirectory(Util.logDir());
83 } 81 }
84 m_console = 82
85 new LogBase((Path.Combine(Util.logDir(), "opengrid-AssetServer-console.log")), "OpenAsset", this, true); 83 m_log =
86 MainLog.Instance = m_console; 84 new LogBase(
85 (Path.Combine(Util.logDir(), "opengrid-AssetServer-console.log")),
86 "OpenAsset",
87 this,
88 true);
89
90 MainLog.Instance = m_log;
87 } 91 }
88 92
89 public void Startup() 93 public void Startup()
90 { 94 {
91 m_config = new AssetConfig("ASSET SERVER", (Path.Combine(Util.configDir(), "AssetServer_Config.xml"))); 95 m_config = new AssetConfig("ASSET SERVER", (Path.Combine(Util.configDir(), "AssetServer_Config.xml")));
92 96
93 m_console.Verbose("ASSET", "Setting up asset DB"); 97 m_log.Verbose("ASSET", "Setting up asset DB");
94 setupDB(m_config); 98 setupDB(m_config);
95 99
96 m_console.Verbose("ASSET", "Loading default asset set.."); 100 m_log.Verbose("ASSET", "Loading default asset set..");
97 LoadDefaultAssets(); 101 LoadDefaultAssets();
98 102
99 m_console.Verbose("ASSET", "Starting HTTP process"); 103 m_log.Verbose("ASSET", "Starting HTTP process");
100 BaseHttpServer httpServer = new BaseHttpServer(m_config.HttpPort); 104 BaseHttpServer httpServer = new BaseHttpServer(m_config.HttpPort);
101 105
102 StatsManager.StartCollectingAssetStats(); 106 StatsManager.StartCollectingAssetStats();
@@ -170,30 +174,28 @@ namespace OpenSim.Grid.AssetServer
170 m_assetProvider.CreateAsset(asset); 174 m_assetProvider.CreateAsset(asset);
171 } 175 }
172 176
173 public void RunCmd(string cmd, string[] cmdparams) 177 public override void RunCmd(string cmd, string[] cmdparams)
174 { 178 {
179 base.RunCmd(cmd, cmdparams);
180
175 switch (cmd) 181 switch (cmd)
176 { 182 {
177 case "help": 183 case "help":
178 m_console.Notice( 184 m_log.Notice(
179 @"shutdown - shutdown this asset server (USE CAUTION!) 185 @"shutdown - shutdown this asset server (USE CAUTION!)
180 stats - statistical information for this server"); 186 stats - statistical information for this server");
181 187
182 break; 188 break;
183 189
184 case "stats": 190 case "stats":
185 m_console.Notice("STATS", Environment.NewLine + StatsManager.AssetStats.Report()); 191 m_log.Notice("STATS", Environment.NewLine + StatsManager.AssetStats.Report());
186 break; 192 break;
187 193
188 case "shutdown": 194 case "shutdown":
189 m_console.Close(); 195 m_log.Close();
190 Environment.Exit(0); 196 Environment.Exit(0);
191 break; 197 break;
192 } 198 }
193 } 199 }
194
195 public void Show(string ShowWhat)
196 {
197 }
198 } 200 }
199} 201}
diff --git a/OpenSim/Grid/GridServer/Main.cs b/OpenSim/Grid/GridServer/Main.cs
index d4947b3..8a522c2 100644
--- a/OpenSim/Grid/GridServer/Main.cs
+++ b/OpenSim/Grid/GridServer/Main.cs
@@ -37,7 +37,7 @@ namespace OpenSim.Grid.GridServer
37{ 37{
38 /// <summary> 38 /// <summary>
39 /// </summary> 39 /// </summary>
40 public class OpenGrid_Main : conscmd_callback 40 public class OpenGrid_Main : BaseOpenSimServer, conscmd_callback
41 { 41 {
42 public GridConfig Cfg; 42 public GridConfig Cfg;
43 43
@@ -51,8 +51,6 @@ namespace OpenSim.Grid.GridServer
51 51
52 private GridManager m_gridManager; 52 private GridManager m_gridManager;
53 53
54 private LogBase m_console;
55
56 [STAThread] 54 [STAThread]
57 public static void Main(string[] args) 55 public static void Main(string[] args)
58 { 56 {
@@ -70,11 +68,11 @@ namespace OpenSim.Grid.GridServer
70 68
71 private void Work() 69 private void Work()
72 { 70 {
73 m_console.Notice("Enter help for a list of commands\n"); 71 m_log.Notice("Enter help for a list of commands\n");
74 72
75 while (true) 73 while (true)
76 { 74 {
77 m_console.MainLogPrompt(); 75 m_log.MainLogPrompt();
78 } 76 }
79 } 77 }
80 78
@@ -84,9 +82,9 @@ namespace OpenSim.Grid.GridServer
84 { 82 {
85 Directory.CreateDirectory(Util.logDir()); 83 Directory.CreateDirectory(Util.logDir());
86 } 84 }
87 m_console = 85 m_log =
88 new LogBase((Path.Combine(Util.logDir(), "opengrid-gridserver-console.log")), "OpenGrid", this, true); 86 new LogBase((Path.Combine(Util.logDir(), "opengrid-gridserver-console.log")), "OpenGrid", this, true);
89 MainLog.Instance = m_console; 87 MainLog.Instance = m_log;
90 } 88 }
91 89
92 public void managercallback(string cmd) 90 public void managercallback(string cmd)
@@ -106,12 +104,12 @@ namespace OpenSim.Grid.GridServer
106 //Yeah srsly, that's it. 104 //Yeah srsly, that's it.
107 if (setuponly) Environment.Exit(0); 105 if (setuponly) Environment.Exit(0);
108 106
109 m_console.Verbose("GRID", "Connecting to Storage Server"); 107 m_log.Verbose("GRID", "Connecting to Storage Server");
110 m_gridManager = new GridManager(); 108 m_gridManager = new GridManager();
111 m_gridManager.AddPlugin(Cfg.DatabaseProvider); // Made of win 109 m_gridManager.AddPlugin(Cfg.DatabaseProvider); // Made of win
112 m_gridManager.config = Cfg; 110 m_gridManager.config = Cfg;
113 111
114 m_console.Verbose("GRID", "Starting HTTP process"); 112 m_log.Verbose("GRID", "Starting HTTP process");
115 BaseHttpServer httpServer = new BaseHttpServer(Cfg.HttpPort); 113 BaseHttpServer httpServer = new BaseHttpServer(Cfg.HttpPort);
116 //GridManagementAgent GridManagerAgent = new GridManagementAgent(httpServer, "gridserver", Cfg.SimSendKey, Cfg.SimRecvKey, managercallback); 114 //GridManagementAgent GridManagerAgent = new GridManagementAgent(httpServer, "gridserver", Cfg.SimSendKey, Cfg.SimRecvKey, managercallback);
117 115
@@ -137,7 +135,7 @@ namespace OpenSim.Grid.GridServer
137 135
138 httpServer.Start(); 136 httpServer.Start();
139 137
140 m_console.Verbose("GRID", "Starting sim status checker"); 138 m_log.Verbose("GRID", "Starting sim status checker");
141 139
142 Timer simCheckTimer = new Timer(3600000*3); // 3 Hours between updates. 140 Timer simCheckTimer = new Timer(3600000*3); // 3 Hours between updates.
143 simCheckTimer.Elapsed += new ElapsedEventHandler(CheckSims); 141 simCheckTimer.Elapsed += new ElapsedEventHandler(CheckSims);
@@ -181,25 +179,23 @@ namespace OpenSim.Grid.GridServer
181 */ 179 */
182 } 180 }
183 181
184 public void RunCmd(string cmd, string[] cmdparams) 182 public override void RunCmd(string cmd, string[] cmdparams)
185 { 183 {
184 base.RunCmd(cmd, cmdparams);
185
186 switch (cmd) 186 switch (cmd)
187 { 187 {
188 case "help": 188 case "help":
189 m_console.Notice("shutdown - shutdown the grid (USE CAUTION!)"); 189 m_log.Notice("shutdown - shutdown the grid (USE CAUTION!)");
190 break; 190 break;
191 191
192 case "shutdown": 192 case "shutdown":
193 m_console.Close(); 193 m_log.Close();
194 Environment.Exit(0); 194 Environment.Exit(0);
195 break; 195 break;
196 } 196 }
197 } 197 }
198 198
199 public void Show(string ShowWhat)
200 {
201 }
202
203 /*private void ConfigDB(IGenericConfig configData) 199 /*private void ConfigDB(IGenericConfig configData)
204 { 200 {
205 try 201 try
@@ -223,4 +219,4 @@ namespace OpenSim.Grid.GridServer
223 } 219 }
224 }*/ 220 }*/
225 } 221 }
226} \ No newline at end of file 222}
diff --git a/OpenSim/Grid/InventoryServer/Main.cs b/OpenSim/Grid/InventoryServer/Main.cs
index ce371bf..b62c696 100644
--- a/OpenSim/Grid/InventoryServer/Main.cs
+++ b/OpenSim/Grid/InventoryServer/Main.cs
@@ -36,9 +36,8 @@ using OpenSim.Framework.Servers;
36 36
37namespace OpenSim.Grid.InventoryServer 37namespace OpenSim.Grid.InventoryServer
38{ 38{
39 public class OpenInventory_Main : conscmd_callback 39 public class OpenInventory_Main : BaseOpenSimServer, conscmd_callback
40 { 40 {
41 private LogBase m_console;
42 private InventoryManager m_inventoryManager; 41 private InventoryManager m_inventoryManager;
43 private InventoryConfig m_config; 42 private InventoryConfig m_config;
44 private GridInventoryService m_inventoryService; 43 private GridInventoryService m_inventoryService;
@@ -56,8 +55,8 @@ namespace OpenSim.Grid.InventoryServer
56 55
57 public OpenInventory_Main() 56 public OpenInventory_Main()
58 { 57 {
59 m_console = new LogBase("opengrid-inventory-console.log", LogName, this, true); 58 m_log = new LogBase("opengrid-inventory-console.log", LogName, this, true);
60 MainLog.Instance = m_console; 59 MainLog.Instance = m_log;
61 } 60 }
62 61
63 public void Startup() 62 public void Startup()
@@ -104,16 +103,18 @@ namespace OpenSim.Grid.InventoryServer
104 103
105 private void Work() 104 private void Work()
106 { 105 {
107 m_console.Notice("Enter help for a list of commands\n"); 106 m_log.Notice("Enter help for a list of commands\n");
108 107
109 while (true) 108 while (true)
110 { 109 {
111 m_console.MainLogPrompt(); 110 m_log.MainLogPrompt();
112 } 111 }
113 } 112 }
114 113
115 public void RunCmd(string cmd, string[] cmdparams) 114 public override void RunCmd(string cmd, string[] cmdparams)
116 { 115 {
116 base.RunCmd(cmd, cmdparams);
117
117 switch (cmd) 118 switch (cmd)
118 { 119 {
119 case "quit": 120 case "quit":
@@ -121,14 +122,10 @@ namespace OpenSim.Grid.InventoryServer
121 m_inventoryService.CreateUsersInventory(LLUUID.Random().UUID); 122 m_inventoryService.CreateUsersInventory(LLUUID.Random().UUID);
122 break; 123 break;
123 case "shutdown": 124 case "shutdown":
124 m_console.Close(); 125 m_log.Close();
125 Environment.Exit(0); 126 Environment.Exit(0);
126 break; 127 break;
127 } 128 }
128 } 129 }
129
130 public void Show(string ShowWhat)
131 {
132 }
133 } 130 }
134} \ No newline at end of file 131}
diff --git a/OpenSim/Grid/MessagingServer/Main.cs b/OpenSim/Grid/MessagingServer/Main.cs
index a7c3a2a..3d5ceb4 100644
--- a/OpenSim/Grid/MessagingServer/Main.cs
+++ b/OpenSim/Grid/MessagingServer/Main.cs
@@ -39,14 +39,13 @@ namespace OpenSim.Grid.MessagingServer
39{ 39{
40 /// <summary> 40 /// <summary>
41 /// </summary> 41 /// </summary>
42 public class OpenMessage_Main : conscmd_callback 42 public class OpenMessage_Main : BaseOpenSimServer, conscmd_callback
43 { 43 {
44 private MessageServerConfig Cfg; 44 private MessageServerConfig Cfg;
45 45
46 //public UserManager m_userManager; 46 //public UserManager m_userManager;
47 //public UserLoginService m_loginService; 47 //public UserLoginService m_loginService;
48 48
49 private LogBase m_console;
50 private LLUUID m_lastCreatedUser = LLUUID.Random(); 49 private LLUUID m_lastCreatedUser = LLUUID.Random();
51 50
52 [STAThread] 51 [STAThread]
@@ -66,18 +65,18 @@ namespace OpenSim.Grid.MessagingServer
66 { 65 {
67 Directory.CreateDirectory(Util.logDir()); 66 Directory.CreateDirectory(Util.logDir());
68 } 67 }
69 m_console = 68 m_log =
70 new LogBase((Path.Combine(Util.logDir(), "opengrid-messagingserver-console.log")), "OpenMessage", this, true); 69 new LogBase((Path.Combine(Util.logDir(), "opengrid-messagingserver-console.log")), "OpenMessage", this, true);
71 MainLog.Instance = m_console; 70 MainLog.Instance = m_log;
72 } 71 }
73 72
74 private void Work() 73 private void Work()
75 { 74 {
76 m_console.Notice("Enter help for a list of commands\n"); 75 m_log.Notice("Enter help for a list of commands\n");
77 76
78 while (true) 77 while (true)
79 { 78 {
80 m_console.MainLogPrompt(); 79 m_log.MainLogPrompt();
81 } 80 }
82 } 81 }
83 82
@@ -105,7 +104,7 @@ namespace OpenSim.Grid.MessagingServer
105 //new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod)); 104 //new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod));
106 105
107 httpServer.Start(); 106 httpServer.Start();
108 m_console.Status("SERVER", "Messageserver 0.4 - Startup complete"); 107 m_log.Status("SERVER", "Messageserver 0.4 - Startup complete");
109 } 108 }
110 109
111 110
@@ -121,7 +120,7 @@ namespace OpenSim.Grid.MessagingServer
121 //m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); 120 //m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY);
122 } catch (Exception ex) 121 } catch (Exception ex)
123 { 122 {
124 m_console.Error("SERVER", "Error creating user: {0}", ex.ToString()); 123 m_log.Error("SERVER", "Error creating user: {0}", ex.ToString());
125 } 124 }
126 125
127 try 126 try
@@ -131,23 +130,25 @@ namespace OpenSim.Grid.MessagingServer
131 } 130 }
132 catch (Exception ex) 131 catch (Exception ex)
133 { 132 {
134 m_console.Error("SERVER", "Error creating inventory for user: {0}", ex.ToString()); 133 m_log.Error("SERVER", "Error creating inventory for user: {0}", ex.ToString());
135 } 134 }
136 // m_lastCreatedUser = userID; 135 // m_lastCreatedUser = userID;
137 break; 136 break;
138 } 137 }
139 } 138 }
140 139
141 public void RunCmd(string cmd, string[] cmdparams) 140 public override void RunCmd(string cmd, string[] cmdparams)
142 { 141 {
142 base.RunCmd(cmd, cmdparams);
143
143 switch (cmd) 144 switch (cmd)
144 { 145 {
145 case "help": 146 case "help":
146 m_console.Notice("shutdown - shutdown the message server (USE CAUTION!)"); 147 m_log.Notice("shutdown - shutdown the message server (USE CAUTION!)");
147 break; 148 break;
148 149
149 case "shutdown": 150 case "shutdown":
150 m_console.Close(); 151 m_log.Close();
151 Environment.Exit(0); 152 Environment.Exit(0);
152 break; 153 break;
153 } 154 }
diff --git a/OpenSim/Grid/ScriptServer/ScriptServerMain.cs b/OpenSim/Grid/ScriptServer/ScriptServerMain.cs
index 5757be4..421467d 100644
--- a/OpenSim/Grid/ScriptServer/ScriptServerMain.cs
+++ b/OpenSim/Grid/ScriptServer/ScriptServerMain.cs
@@ -31,20 +31,20 @@ using libsecondlife;
31using Nini.Config; 31using Nini.Config;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Framework.Console; 33using OpenSim.Framework.Console;
34using OpenSim.Framework.Servers;
34using OpenSim.Grid.ScriptServer.ScriptServer; 35using OpenSim.Grid.ScriptServer.ScriptServer;
35using OpenSim.Region.ScriptEngine.Common; 36using OpenSim.Region.ScriptEngine.Common;
36using OpenSim.Region.ScriptEngine.Common.TRPC; 37using OpenSim.Region.ScriptEngine.Common.TRPC;
37 38
38namespace OpenSim.Grid.ScriptServer 39namespace OpenSim.Grid.ScriptServer
39{ 40{
40 public class ScriptServerMain : conscmd_callback 41 public class ScriptServerMain : BaseOpenSimServer, conscmd_callback
41 { 42 {
42 // 43 //
43 // Root object. Creates objects used. 44 // Root object. Creates objects used.
44 // 45 //
45 private int listenPort = 8010; 46 private int listenPort = 8010;
46 private readonly string m_logFilename = ("scriptserver.log"); 47 private readonly string m_logFilename = ("scriptserver.log");
47 private LogBase m_log;
48 48
49 // TEMP 49 // TEMP
50 public static ScriptServerInterfaces.ScriptEngine Engine; 50 public static ScriptServerInterfaces.ScriptEngine Engine;
@@ -111,13 +111,5 @@ namespace OpenSim.Grid.ScriptServer
111 111
112 return new LogBase((Path.Combine(Util.logDir(), m_logFilename)), "ScriptServer", this, true); 112 return new LogBase((Path.Combine(Util.logDir(), m_logFilename)), "ScriptServer", this, true);
113 } 113 }
114
115 public void RunCmd(string command, string[] cmdparams)
116 {
117 }
118
119 public void Show(string ShowWhat)
120 {
121 }
122 } 114 }
123} \ No newline at end of file 115}
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs
index 20828ba..32cefc1 100644
--- a/OpenSim/Grid/UserServer/Main.cs
+++ b/OpenSim/Grid/UserServer/Main.cs
@@ -40,7 +40,7 @@ namespace OpenSim.Grid.UserServer
40{ 40{
41 /// <summary> 41 /// <summary>
42 /// </summary> 42 /// </summary>
43 public class OpenUser_Main : conscmd_callback 43 public class OpenUser_Main : BaseOpenSimServer, conscmd_callback
44 { 44 {
45 private UserConfig Cfg; 45 private UserConfig Cfg;
46 46
@@ -48,7 +48,6 @@ namespace OpenSim.Grid.UserServer
48 public UserLoginService m_loginService; 48 public UserLoginService m_loginService;
49 public MessageServersConnector m_messagesService; 49 public MessageServersConnector m_messagesService;
50 50
51 private LogBase m_console;
52 private LLUUID m_lastCreatedUser = LLUUID.Random(); 51 private LLUUID m_lastCreatedUser = LLUUID.Random();
53 52
54 [STAThread] 53 [STAThread]
@@ -68,18 +67,18 @@ namespace OpenSim.Grid.UserServer
68 { 67 {
69 Directory.CreateDirectory(Util.logDir()); 68 Directory.CreateDirectory(Util.logDir());
70 } 69 }
71 m_console = 70 m_log =
72 new LogBase((Path.Combine(Util.logDir(), "opengrid-userserver-console.log")), "OpenUser", this, true); 71 new LogBase((Path.Combine(Util.logDir(), "opengrid-userserver-console.log")), "OpenUser", this, true);
73 MainLog.Instance = m_console; 72 MainLog.Instance = m_log;
74 } 73 }
75 74
76 private void Work() 75 private void Work()
77 { 76 {
78 m_console.Notice("Enter help for a list of commands\n"); 77 m_log.Notice("Enter help for a list of commands\n");
79 78
80 while (true) 79 while (true)
81 { 80 {
82 m_console.MainLogPrompt(); 81 m_log.MainLogPrompt();
83 } 82 }
84 } 83 }
85 84
@@ -129,7 +128,7 @@ namespace OpenSim.Grid.UserServer
129 new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod)); 128 new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod));
130 129
131 httpServer.Start(); 130 httpServer.Start();
132 m_console.Status("SERVER", "Userserver 0.4 - Startup complete"); 131 m_log.Status("SERVER", "Userserver 0.4 - Startup complete");
133 } 132 }
134 133
135 134
@@ -144,11 +143,11 @@ namespace OpenSim.Grid.UserServer
144 uint regX = 1000; 143 uint regX = 1000;
145 uint regY = 1000; 144 uint regY = 1000;
146 145
147 tempfirstname = m_console.CmdPrompt("First name"); 146 tempfirstname = m_log.CmdPrompt("First name");
148 templastname = m_console.CmdPrompt("Last name"); 147 templastname = m_log.CmdPrompt("Last name");
149 tempMD5Passwd = m_console.PasswdPrompt("Password"); 148 tempMD5Passwd = m_log.PasswdPrompt("Password");
150 regX = Convert.ToUInt32(m_console.CmdPrompt("Start Region X")); 149 regX = Convert.ToUInt32(m_log.CmdPrompt("Start Region X"));
151 regY = Convert.ToUInt32(m_console.CmdPrompt("Start Region Y")); 150 regY = Convert.ToUInt32(m_log.CmdPrompt("Start Region Y"));
152 151
153 tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + String.Empty); 152 tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + String.Empty);
154 153
@@ -159,7 +158,7 @@ namespace OpenSim.Grid.UserServer
159 m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); 158 m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY);
160 } catch (Exception ex) 159 } catch (Exception ex)
161 { 160 {
162 m_console.Error("SERVER", "Error creating user: {0}", ex.ToString()); 161 m_log.Error("SERVER", "Error creating user: {0}", ex.ToString());
163 } 162 }
164 163
165 try 164 try
@@ -169,21 +168,23 @@ namespace OpenSim.Grid.UserServer
169 } 168 }
170 catch (Exception ex) 169 catch (Exception ex)
171 { 170 {
172 m_console.Error("SERVER", "Error creating inventory for user: {0}", ex.ToString()); 171 m_log.Error("SERVER", "Error creating inventory for user: {0}", ex.ToString());
173 } 172 }
174 m_lastCreatedUser = userID; 173 m_lastCreatedUser = userID;
175 break; 174 break;
176 } 175 }
177 } 176 }
178 177
179 public void RunCmd(string cmd, string[] cmdparams) 178 public override void RunCmd(string cmd, string[] cmdparams)
180 { 179 {
180 base.RunCmd(cmd, cmdparams);
181
181 switch (cmd) 182 switch (cmd)
182 { 183 {
183 case "help": 184 case "help":
184 m_console.Notice("create user - create a new user"); 185 m_log.Notice("create user - create a new user");
185 m_console.Notice("stats - statistical information for this server"); 186 m_log.Notice("stats - statistical information for this server");
186 m_console.Notice("shutdown - shutdown the grid (USE CAUTION!)"); 187 m_log.Notice("shutdown - shutdown the grid (USE CAUTION!)");
187 break; 188 break;
188 189
189 case "create": 190 case "create":
@@ -192,7 +193,7 @@ namespace OpenSim.Grid.UserServer
192 193
193 case "shutdown": 194 case "shutdown":
194 m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation; 195 m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation;
195 m_console.Close(); 196 m_log.Close();
196 Environment.Exit(0); 197 Environment.Exit(0);
197 break; 198 break;
198 199
@@ -246,9 +247,5 @@ namespace OpenSim.Grid.UserServer
246 247
247 } 248 }
248 }*/ 249 }*/
249
250 public void Show(string ShowWhat)
251 {
252 }
253 } 250 }
254} 251}
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index 0d182fe..ec7aa18 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -360,7 +360,7 @@ namespace OpenSim
360 m_moduleLoader = new ModuleLoader(m_log, m_config); 360 m_moduleLoader = new ModuleLoader(m_log, m_config);
361 361
362 ExtensionNodeList nodes = AddinManager.GetExtensionNodes("/OpenSim/Startup"); 362 ExtensionNodeList nodes = AddinManager.GetExtensionNodes("/OpenSim/Startup");
363 MainLog.Instance.Verbose("PLUGINS", "Loading {0} OpenSim application plugins", nodes.Count); 363 m_log.Verbose("PLUGINS", "Loading {0} OpenSim application plugins", nodes.Count);
364 364
365 foreach (TypeExtensionNode node in nodes) 365 foreach (TypeExtensionNode node in nodes)
366 { 366 {
@@ -383,7 +383,7 @@ namespace OpenSim
383 } 383 }
384 else 384 else
385 { 385 {
386 MainLog.Instance.Verbose("STARTUP", "No startup command script specified. Moving on..."); 386 m_log.Verbose("STARTUP", "No startup command script specified. Moving on...");
387 } 387 }
388 388
389 // Start timer script (run a script every xx seconds) 389 // Start timer script (run a script every xx seconds)
@@ -396,7 +396,7 @@ namespace OpenSim
396 } 396 }
397 397
398 // We are done with startup 398 // We are done with startup
399 MainLog.Instance.Status("STARTUP", 399 m_log.Status("STARTUP",
400 "Startup complete, serving " + m_udpServers.Count.ToString() + " region(s)"); 400 "Startup complete, serving " + m_udpServers.Count.ToString() + " region(s)");
401 401
402 // When we return now we will be in a wait for input command loop. 402 // When we return now we will be in a wait for input command loop.
@@ -448,23 +448,23 @@ namespace OpenSim
448 UDPServer udpServer; 448 UDPServer udpServer;
449 Scene scene = SetupScene(regionInfo, out udpServer, m_permissions); 449 Scene scene = SetupScene(regionInfo, out udpServer, m_permissions);
450 450
451 MainLog.Instance.Verbose("MODULES", "Loading Region's modules"); 451 m_log.Verbose("MODULES", "Loading Region's modules");
452 452
453 m_moduleLoader.PickupModules(scene, "."); 453 m_moduleLoader.PickupModules(scene, ".");
454 //m_moduleLoader.PickupModules(scene, "ScriptEngines"); 454 //m_moduleLoader.PickupModules(scene, "ScriptEngines");
455 //m_moduleLoader.LoadRegionModules(Path.Combine("ScriptEngines", m_scriptEngine), scene); 455 //m_moduleLoader.LoadRegionModules(Path.Combine("ScriptEngines", m_scriptEngine), scene);
456 MainLog.Instance.Verbose("MODULES", "Loading scripting engine modules"); 456 m_log.Verbose("MODULES", "Loading scripting engine modules");
457 foreach (string module in m_scriptEngine.Split(',')) 457 foreach (string module in m_scriptEngine.Split(','))
458 { 458 {
459 string mod = module.Trim(" \t".ToCharArray()); // Clean up name 459 string mod = module.Trim(" \t".ToCharArray()); // Clean up name
460 MainLog.Instance.Verbose("MODULES", "Loading scripting engine: " + mod); 460 m_log.Verbose("MODULES", "Loading scripting engine: " + mod);
461 try 461 try
462 { 462 {
463 m_moduleLoader.LoadRegionModules(Path.Combine("ScriptEngines", mod), scene); 463 m_moduleLoader.LoadRegionModules(Path.Combine("ScriptEngines", mod), scene);
464 } 464 }
465 catch (Exception ex) 465 catch (Exception ex)
466 { 466 {
467 MainLog.Instance.Error("MODULES", "Failed to load script engine: " + ex.ToString()); 467 m_log.Error("MODULES", "Failed to load script engine: " + ex.ToString());
468 } 468 }
469 } 469 }
470 470
@@ -503,7 +503,7 @@ namespace OpenSim
503 SceneCommunicationService sceneGridService = new SceneCommunicationService(m_commsManager); 503 SceneCommunicationService sceneGridService = new SceneCommunicationService(m_commsManager);
504 if (m_SendChildAgentTaskData) 504 if (m_SendChildAgentTaskData)
505 { 505 {
506 MainLog.Instance.Error("WARNING", 506 m_log.Error("WARNING",
507 "Send Child Agent Task Updates is enabled. This is for testing only."); 507 "Send Child Agent Task Updates is enabled. This is for testing only.");
508 //Thread.Sleep(12000); 508 //Thread.Sleep(12000);
509 } 509 }
@@ -516,7 +516,7 @@ namespace OpenSim
516 516
517 public void handleRestartRegion(RegionInfo whichRegion) 517 public void handleRestartRegion(RegionInfo whichRegion)
518 { 518 {
519 MainLog.Instance.Error("MAIN", "Got restart signal from SceneManager"); 519 m_log.Error("MAIN", "Got restart signal from SceneManager");
520 // Shutting down the UDP server 520 // Shutting down the UDP server
521 bool foundUDPServer = false; 521 bool foundUDPServer = false;
522 int UDPServerElement = 0; 522 int UDPServerElement = 0;
@@ -637,7 +637,7 @@ namespace OpenSim
637 /// <param name="fileName"></param> 637 /// <param name="fileName"></param>
638 private void RunCommandScript(string fileName) 638 private void RunCommandScript(string fileName)
639 { 639 {
640 MainLog.Instance.Verbose("COMMANDFILE", "Running " + fileName); 640 m_log.Verbose("COMMANDFILE", "Running " + fileName);
641 if (File.Exists(fileName)) 641 if (File.Exists(fileName))
642 { 642 {
643 StreamReader readFile = File.OpenText(fileName); 643 StreamReader readFile = File.OpenText(fileName);
@@ -646,14 +646,14 @@ namespace OpenSim
646 { 646 {
647 if (currentCommand != String.Empty) 647 if (currentCommand != String.Empty)
648 { 648 {
649 MainLog.Instance.Verbose("COMMANDFILE", "Running '" + currentCommand + "'"); 649 m_log.Verbose("COMMANDFILE", "Running '" + currentCommand + "'");
650 MainLog.Instance.MainLogRunCommand(currentCommand); 650 m_log.MainLogRunCommand(currentCommand);
651 } 651 }
652 } 652 }
653 } 653 }
654 else 654 else
655 { 655 {
656 MainLog.Instance.Error("COMMANDFILE", "Command script missing. Can not run commands"); 656 m_log.Error("COMMANDFILE", "Command script missing. Can not run commands");
657 } 657 }
658 } 658 }
659 659
@@ -662,10 +662,10 @@ namespace OpenSim
662 /// </summary> 662 /// </summary>
663 /// <param name="command">The first argument of the parameter (the command)</param> 663 /// <param name="command">The first argument of the parameter (the command)</param>
664 /// <param name="cmdparams">Additional arguments passed to the command</param> 664 /// <param name="cmdparams">Additional arguments passed to the command</param>
665 public void RunCmd(string command, string[] cmdparams) 665 public override void RunCmd(string command, string[] cmdparams)
666 { 666 {
667 string result = String.Empty; 667 base.RunCmd(command, cmdparams);
668 668
669 switch (command) 669 switch (command)
670 { 670 {
671 case "set-time": 671 case "set-time":
@@ -692,44 +692,36 @@ namespace OpenSim
692 break; 692 break;
693 693
694 case "help": 694 case "help":
695 m_log.Error("alert - send alert to a designated user or all users."); 695 m_log.Notice("alert - send alert to a designated user or all users.");
696 m_log.Error(" alert [First] [Last] [Message] - send an alert to a user. Case sensitive."); 696 m_log.Notice(" alert [First] [Last] [Message] - send an alert to a user. Case sensitive.");
697 m_log.Error(" alert general [Message] - send an alert to all users."); 697 m_log.Notice(" alert general [Message] - send an alert to all users.");
698 m_log.Error("backup - trigger a simulator backup"); 698 m_log.Notice("backup - trigger a simulator backup");
699 m_log.Error("create user - adds a new user"); 699 m_log.Notice("create user - adds a new user");
700 m_log.Error("change-region [name] - sets the region that many of these commands affect."); 700 m_log.Notice("change-region [name] - sets the region that many of these commands affect.");
701 m_log.Error("command-script [filename] - Execute command in a file."); 701 m_log.Notice("command-script [filename] - Execute command in a file.");
702 m_log.Error("debug - debugging commands"); 702 m_log.Notice("debug - debugging commands");
703 m_log.Error(" packet 0..255 - print incoming/outgoing packets (0=off)"); 703 m_log.Notice(" packet 0..255 - print incoming/outgoing packets (0=off)");
704 m_log.Error("edit-scale [prim name] [x] [y] [z] - resize given prim"); 704 m_log.Notice("edit-scale [prim name] [x] [y] [z] - resize given prim");
705 m_log.Error("export-map [filename] - save image of world map"); 705 m_log.Notice("export-map [filename] - save image of world map");
706 m_log.Error("force-update - force an update of prims in the scene"); 706 m_log.Notice("force-update - force an update of prims in the scene");
707 m_log.Error("load-xml [filename] - load prims from XML"); 707 m_log.Notice("load-xml [filename] - load prims from XML");
708 m_log.Error("load-xml2 [filename] - load prims from XML using version 2 format"); 708 m_log.Notice("load-xml2 [filename] - load prims from XML using version 2 format");
709 m_log.Error("permissions [true/false] - turn on/off permissions on the scene"); 709 m_log.Notice("permissions [true/false] - turn on/off permissions on the scene");
710 m_log.Error("quit - equivalent to shutdown."); 710 m_log.Notice("quit - equivalent to shutdown.");
711 m_log.Error("restart - disconnects all clients and restarts the sims in the instance."); 711 m_log.Notice("restart - disconnects all clients and restarts the sims in the instance.");
712 m_log.Error("remove-region [name] - remove a region"); 712 m_log.Notice("remove-region [name] - remove a region");
713 m_log.Error("save-xml [filename] - save prims to XML"); 713 m_log.Notice("save-xml [filename] - save prims to XML");
714 m_log.Error("save-xml2 [filename] - save prims to XML using version 2 format"); 714 m_log.Notice("save-xml2 [filename] - save prims to XML using version 2 format");
715 m_log.Error("script - manually trigger scripts? or script commands?"); 715 m_log.Notice("script - manually trigger scripts? or script commands?");
716 m_log.Error("set-time [x] - set the current scene time phase"); 716 m_log.Notice("set-time [x] - set the current scene time phase");
717 m_log.Error("show uptime - show simulator startup and uptime."); 717 m_log.Notice("show users - show info about connected users.");
718 m_log.Error("show users - show info about connected users."); 718 m_log.Notice("show modules - shows info aboutloaded modules.");
719 m_log.Error("show modules - shows info aboutloaded modules."); 719 m_log.Notice("show stats - statistical information for this server not displayed in the client");
720 m_log.Error("show stats - statistical information for this server not displayed in the client"); 720 m_log.Notice("shutdown - disconnect all clients and shutdown.");
721 m_log.Error("shutdown - disconnect all clients and shutdown."); 721 m_log.Notice("config set section field value - set a config value");
722 m_log.Error("config set section field value - set a config value"); 722 m_log.Notice("config get section field - get a config value");
723 m_log.Error("config get section field - get a config value"); 723 m_log.Notice("config save - save OpenSim.ini");
724 m_log.Error("config save - save OpenSim.ini"); 724 m_log.Notice("terrain help - show help for terrain commands.");
725 m_log.Error("terrain help - show help for terrain commands.");
726 break;
727
728 case "show":
729 if (cmdparams.Length > 0)
730 {
731 Show(cmdparams[0]);
732 }
733 break; 725 break;
734 726
735 case "save-xml": 727 case "save-xml":
@@ -800,6 +792,8 @@ namespace OpenSim
800 break; 792 break;
801 793
802 case "terrain": 794 case "terrain":
795 string result = String.Empty;
796
803 if (!m_sceneManager.RunTerrainCmdOnCurrentScene(cmdparams, ref result)) 797 if (!m_sceneManager.RunTerrainCmdOnCurrentScene(cmdparams, ref result))
804 { 798 {
805 m_log.Error(result); 799 m_log.Error(result);
@@ -873,20 +867,20 @@ namespace OpenSim
873 867
874 if (!m_sceneManager.TrySetCurrentScene(regionName)) 868 if (!m_sceneManager.TrySetCurrentScene(regionName))
875 { 869 {
876 MainLog.Instance.Error("Couldn't set current region to: " + regionName); 870 m_log.Error("Couldn't set current region to: " + regionName);
877 } 871 }
878 } 872 }
879 873
880 if (m_sceneManager.CurrentScene == null) 874 if (m_sceneManager.CurrentScene == null)
881 { 875 {
882 MainLog.Instance.Verbose("CONSOLE", 876 m_log.Notice("CONSOLE",
883 "Currently at Root level. To change region please use 'change-region <regioname>'"); 877 "Currently at Root level. To change region please use 'change-region <regioname>'");
884 } 878 }
885 else 879 else
886 { 880 {
887 MainLog.Instance.Verbose("CONSOLE", 881 m_log.Notice("CONSOLE",
888 "Current Region: " + m_sceneManager.CurrentScene.RegionInfo.RegionName + 882 "Current Region: " + m_sceneManager.CurrentScene.RegionInfo.RegionName +
889 ". To change region please use 'change-region <regioname>'"); 883 ". To change region please use 'change-region <regioname>'");
890 } 884 }
891 885
892 break; 886 break;
@@ -911,8 +905,8 @@ namespace OpenSim
911 case "set": 905 case "set":
912 if (cmdparams.Length < 4) 906 if (cmdparams.Length < 4)
913 { 907 {
914 MainLog.Instance.Notice(n, "SYNTAX: " + n + " SET SECTION KEY VALUE"); 908 m_log.Notice(n, "SYNTAX: " + n + " SET SECTION KEY VALUE");
915 MainLog.Instance.Notice(n, "EXAMPLE: " + n + " SET ScriptEngine.DotNetEngine NumberOfScriptThreads 5"); 909 m_log.Notice(n, "EXAMPLE: " + n + " SET ScriptEngine.DotNetEngine NumberOfScriptThreads 5");
916 } 910 }
917 else 911 else
918 { 912 {
@@ -923,7 +917,7 @@ namespace OpenSim
923 c.Set(cmdparams[2], _value); 917 c.Set(cmdparams[2], _value);
924 m_config.Merge(c.ConfigSource); 918 m_config.Merge(c.ConfigSource);
925 919
926 MainLog.Instance.Notice(n, 920 m_log.Notice(n,
927 n + " " + n + " " + cmdparams[1] + " " + cmdparams[2] + " " + 921 n + " " + n + " " + cmdparams[1] + " " + cmdparams[2] + " " +
928 _value); 922 _value);
929 } 923 }
@@ -931,20 +925,20 @@ namespace OpenSim
931 case "get": 925 case "get":
932 if (cmdparams.Length < 3) 926 if (cmdparams.Length < 3)
933 { 927 {
934 MainLog.Instance.Notice(n, "SYNTAX: " + n + " GET SECTION KEY"); 928 m_log.Notice(n, "SYNTAX: " + n + " GET SECTION KEY");
935 MainLog.Instance.Notice(n, "EXAMPLE: " + n + " GET ScriptEngine.DotNetEngine NumberOfScriptThreads"); 929 m_log.Notice(n, "EXAMPLE: " + n + " GET ScriptEngine.DotNetEngine NumberOfScriptThreads");
936 } 930 }
937 else 931 else
938 { 932 {
939 IConfig c = DefaultConfig().Configs[cmdparams[1]]; 933 IConfig c = DefaultConfig().Configs[cmdparams[1]];
940 if (c == null) 934 if (c == null)
941 { 935 {
942 MainLog.Instance.Notice(n, "Section \"" + cmdparams[1] + "\" does not exist."); 936 m_log.Notice(n, "Section \"" + cmdparams[1] + "\" does not exist.");
943 break; 937 break;
944 } 938 }
945 else 939 else
946 { 940 {
947 MainLog.Instance.Notice(n, 941 m_log.Notice(n,
948 n + " GET " + cmdparams[1] + " " + cmdparams[2] + ": " + 942 n + " GET " + cmdparams[1] + " " + cmdparams[2] + ": " +
949 c.GetString(cmdparams[2])); 943 c.GetString(cmdparams[2]));
950 } 944 }
@@ -952,18 +946,20 @@ namespace OpenSim
952 946
953 break; 947 break;
954 case "save": 948 case "save":
955 MainLog.Instance.Notice(n, "Saving configuration file: " + Application.iniFilePath); 949 m_log.Notice(n, "Saving configuration file: " + Application.iniFilePath);
956 m_config.Save(Application.iniFilePath); 950 m_config.Save(Application.iniFilePath);
957 break; 951 break;
958 } 952 }
959 } 953 }
960 else
961 {
962 }
963 break; 954 break;
955
956 /*
957 * Temporarily disabled but it would be good to have this - needs to be levered
958 * in to BaseOpenSimServer (which requires a RunCmd method restrcuture probably)
964 default: 959 default:
965 m_log.Error("Unknown command"); 960 m_log.Error("Unknown command");
966 break; 961 break;
962 */
967 } 963 }
968 } 964 }
969 965
@@ -993,18 +989,13 @@ namespace OpenSim
993 } 989 }
994 } 990 }
995 991
996 /// <summary> 992 // see BaseOpenSimServer
997 /// Outputs to the console information about the region
998 /// </summary>
999 /// <param name="ShowWhat">What information to display (valid arguments are "uptime", "users")</param>
1000 public void Show(string ShowWhat) 993 public void Show(string ShowWhat)
1001 { 994 {
995 base.Show(ShowWhat);
996
1002 switch (ShowWhat) 997 switch (ShowWhat)
1003 { 998 {
1004 case "uptime":
1005 m_log.Error("OpenSim has been running since " + m_startuptime.ToString());
1006 m_log.Error("That is " + (DateTime.Now - m_startuptime).ToString());
1007 break;
1008 case "users": 999 case "users":
1009 m_log.Error( 1000 m_log.Error(
1010 String.Format("{0,-16}{1,-16}{2,-37}{3,-16}{4,-22}{5,-16}", "Firstname", "Lastname", 1001 String.Format("{0,-16}{1,-16}{2,-37}{3,-16}{4,-22}{5,-16}", "Firstname", "Lastname",
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
index d6cf7c3..72917d1 100644
--- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs
+++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
@@ -40,17 +40,15 @@ using OpenSim.Region.Physics.Manager;
40 40
41namespace OpenSim.Region.ClientStack 41namespace OpenSim.Region.ClientStack
42{ 42{
43 public abstract class RegionApplicationBase 43 public abstract class RegionApplicationBase : BaseOpenSimServer
44 { 44 {
45 protected AssetCache m_assetCache; 45 protected AssetCache m_assetCache;
46 protected Dictionary<EndPoint, uint> m_clientCircuits = new Dictionary<EndPoint, uint>(); 46 protected Dictionary<EndPoint, uint> m_clientCircuits = new Dictionary<EndPoint, uint>();
47 protected DateTime m_startuptime;
48 protected NetworkServersInfo m_networkServersInfo; 47 protected NetworkServersInfo m_networkServersInfo;
49 48
50 protected BaseHttpServer m_httpServer; 49 protected BaseHttpServer m_httpServer;
51 protected uint m_httpServerPort; 50 protected uint m_httpServerPort;
52 51
53 protected LogBase m_log;
54 protected CommunicationsManager m_commsManager; 52 protected CommunicationsManager m_commsManager;
55 53
56 protected SceneManager m_sceneManager = new SceneManager(); 54 protected SceneManager m_sceneManager = new SceneManager();
@@ -67,11 +65,6 @@ namespace OpenSim.Region.ClientStack
67 get { return m_sceneManager; } 65 get { return m_sceneManager; }
68 } 66 }
69 67
70 public RegionApplicationBase()
71 {
72 m_startuptime = DateTime.Now;
73 }
74
75 public virtual void StartUp() 68 public virtual void StartUp()
76 { 69 {
77 ClientView.TerrainManager = new TerrainManager(new SecondLife()); 70 ClientView.TerrainManager = new TerrainManager(new SecondLife());