aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/GridServer/Main.cs
diff options
context:
space:
mode:
authorlbsa712007-10-30 09:05:31 +0000
committerlbsa712007-10-30 09:05:31 +0000
commit67e12b95ea7b68f4904a7484d77ecfd787d16d0c (patch)
tree20b00d24c8a7617017960432ec044852e3ad5fa9 /OpenSim/Grid/GridServer/Main.cs
parent* Deleted .user file (diff)
downloadopensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.zip
opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.gz
opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.bz2
opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.xz
* Optimized usings
* Shortened type references * Removed redundant 'this' qualifier
Diffstat (limited to 'OpenSim/Grid/GridServer/Main.cs')
-rw-r--r--OpenSim/Grid/GridServer/Main.cs37
1 files changed, 15 insertions, 22 deletions
diff --git a/OpenSim/Grid/GridServer/Main.cs b/OpenSim/Grid/GridServer/Main.cs
index ae1e244..9b1892d 100644
--- a/OpenSim/Grid/GridServer/Main.cs
+++ b/OpenSim/Grid/GridServer/Main.cs
@@ -28,16 +28,10 @@
28 28
29using System; 29using System;
30using System.IO; 30using System.IO;
31using System.Reflection;
32using System.Threading;
33using System.Timers; 31using System.Timers;
32using OpenSim.Framework;
34using OpenSim.Framework.Console; 33using OpenSim.Framework.Console;
35using OpenSim.Framework.Interfaces;
36using OpenSim.Framework.Servers; 34using OpenSim.Framework.Servers;
37using OpenSim.Framework;
38using OpenSim.Framework;
39
40using Timer=System.Timers.Timer;
41 35
42namespace OpenSim.Grid.GridServer 36namespace OpenSim.Grid.GridServer
43{ 37{
@@ -90,10 +84,9 @@ namespace OpenSim.Grid.GridServer
90 { 84 {
91 Directory.CreateDirectory(Util.logDir()); 85 Directory.CreateDirectory(Util.logDir());
92 } 86 }
93 m_console = new LogBase((Path.Combine(Util.logDir(),"opengrid-gridserver-console.log")), "OpenGrid", this, true); 87 m_console =
88 new LogBase((Path.Combine(Util.logDir(), "opengrid-gridserver-console.log")), "OpenGrid", this, true);
94 MainLog.Instance = m_console; 89 MainLog.Instance = m_console;
95
96
97 } 90 }
98 91
99 public void managercallback(string cmd) 92 public void managercallback(string cmd)
@@ -109,28 +102,28 @@ namespace OpenSim.Grid.GridServer
109 102
110 public void Startup() 103 public void Startup()
111 { 104 {
112 105 Cfg = new GridConfig("GRID SERVER", (Path.Combine(Util.configDir(), "GridServer_Config.xml")));
113 this.Cfg = new GridConfig("GRID SERVER",(Path.Combine(Util.configDir(),"GridServer_Config.xml"))); //Yeah srsly, that's it. 106 //Yeah srsly, that's it.
114 if (setuponly) Environment.Exit(0); 107 if (setuponly) Environment.Exit(0);
115 108
116 m_console.Verbose( "Main.cs:Startup() - Connecting to Storage Server"); 109 m_console.Verbose("Main.cs:Startup() - Connecting to Storage Server");
117 m_gridManager = new GridManager(); 110 m_gridManager = new GridManager();
118 m_gridManager.AddPlugin(Cfg.DatabaseProvider); // Made of win 111 m_gridManager.AddPlugin(Cfg.DatabaseProvider); // Made of win
119 m_gridManager.config = Cfg; 112 m_gridManager.config = Cfg;
120 113
121 m_console.Verbose( "Main.cs:Startup() - Starting HTTP process"); 114 m_console.Verbose("Main.cs:Startup() - Starting HTTP process");
122 BaseHttpServer httpServer = new BaseHttpServer((int)Cfg.HttpPort); 115 BaseHttpServer httpServer = new BaseHttpServer((int) Cfg.HttpPort);
123 //GridManagementAgent GridManagerAgent = new GridManagementAgent(httpServer, "gridserver", Cfg.SimSendKey, Cfg.SimRecvKey, managercallback); 116 //GridManagementAgent GridManagerAgent = new GridManagementAgent(httpServer, "gridserver", Cfg.SimSendKey, Cfg.SimRecvKey, managercallback);
124 117
125 httpServer.AddXmlRPCHandler("simulator_login", m_gridManager.XmlRpcSimulatorLoginMethod); 118 httpServer.AddXmlRPCHandler("simulator_login", m_gridManager.XmlRpcSimulatorLoginMethod);
126 httpServer.AddXmlRPCHandler("simulator_data_request", m_gridManager.XmlRpcSimulatorDataRequestMethod); 119 httpServer.AddXmlRPCHandler("simulator_data_request", m_gridManager.XmlRpcSimulatorDataRequestMethod);
127 httpServer.AddXmlRPCHandler("map_block", m_gridManager.XmlRpcMapBlockMethod); 120 httpServer.AddXmlRPCHandler("map_block", m_gridManager.XmlRpcMapBlockMethod);
128 121
129 httpServer.AddStreamHandler(new RestStreamHandler("GET", "/sims/", m_gridManager.RestGetSimMethod )); 122 httpServer.AddStreamHandler(new RestStreamHandler("GET", "/sims/", m_gridManager.RestGetSimMethod));
130 httpServer.AddStreamHandler(new RestStreamHandler("POST", "/sims/", m_gridManager.RestSetSimMethod )); 123 httpServer.AddStreamHandler(new RestStreamHandler("POST", "/sims/", m_gridManager.RestSetSimMethod));
131 124
132 httpServer.AddStreamHandler( new RestStreamHandler("GET", "/regions/", m_gridManager.RestGetRegionMethod )); 125 httpServer.AddStreamHandler(new RestStreamHandler("GET", "/regions/", m_gridManager.RestGetRegionMethod));
133 httpServer.AddStreamHandler( new RestStreamHandler("POST","/regions/", m_gridManager.RestSetRegionMethod )); 126 httpServer.AddStreamHandler(new RestStreamHandler("POST", "/regions/", m_gridManager.RestSetRegionMethod));
134 127
135 //httpServer.AddRestHandler("GET", "/sims/", m_gridManager.RestGetSimMethod); 128 //httpServer.AddRestHandler("GET", "/sims/", m_gridManager.RestGetSimMethod);
136 //httpServer.AddRestHandler("POST", "/sims/", m_gridManager.RestSetSimMethod); 129 //httpServer.AddRestHandler("POST", "/sims/", m_gridManager.RestSetSimMethod);
@@ -139,9 +132,9 @@ namespace OpenSim.Grid.GridServer
139 132
140 httpServer.Start(); 133 httpServer.Start();
141 134
142 m_console.Verbose( "Main.cs:Startup() - Starting sim status checker"); 135 m_console.Verbose("Main.cs:Startup() - Starting sim status checker");
143 136
144 Timer simCheckTimer = new Timer(3600000 * 3); // 3 Hours between updates. 137 Timer simCheckTimer = new Timer(3600000*3); // 3 Hours between updates.
145 simCheckTimer.Elapsed += new ElapsedEventHandler(CheckSims); 138 simCheckTimer.Elapsed += new ElapsedEventHandler(CheckSims);
146 simCheckTimer.Enabled = true; 139 simCheckTimer.Enabled = true;
147 } 140 }
@@ -225,4 +218,4 @@ namespace OpenSim.Grid.GridServer
225 } 218 }
226 }*/ 219 }*/
227 } 220 }
228} 221} \ No newline at end of file