diff options
author | lbsa71 | 2007-10-30 09:05:31 +0000 |
---|---|---|
committer | lbsa71 | 2007-10-30 09:05:31 +0000 |
commit | 67e12b95ea7b68f4904a7484d77ecfd787d16d0c (patch) | |
tree | 20b00d24c8a7617017960432ec044852e3ad5fa9 /OpenSim/Grid/GridServer/Main.cs | |
parent | * Deleted .user file (diff) | |
download | opensim-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.cs | 37 |
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 | ||
29 | using System; | 29 | using System; |
30 | using System.IO; | 30 | using System.IO; |
31 | using System.Reflection; | ||
32 | using System.Threading; | ||
33 | using System.Timers; | 31 | using System.Timers; |
32 | using OpenSim.Framework; | ||
34 | using OpenSim.Framework.Console; | 33 | using OpenSim.Framework.Console; |
35 | using OpenSim.Framework.Interfaces; | ||
36 | using OpenSim.Framework.Servers; | 34 | using OpenSim.Framework.Servers; |
37 | using OpenSim.Framework; | ||
38 | using OpenSim.Framework; | ||
39 | |||
40 | using Timer=System.Timers.Timer; | ||
41 | 35 | ||
42 | namespace OpenSim.Grid.GridServer | 36 | namespace 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 |