aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/GridServer/Main.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Grid/GridServer/Main.cs34
1 files changed, 15 insertions, 19 deletions
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}