diff options
Diffstat (limited to '')
-rw-r--r-- | OpenGridServices.GridServer/Main.cs | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/OpenGridServices.GridServer/Main.cs b/OpenGridServices.GridServer/Main.cs index 69cba9c..f7cfe71 100644 --- a/OpenGridServices.GridServer/Main.cs +++ b/OpenGridServices.GridServer/Main.cs | |||
@@ -53,7 +53,9 @@ namespace OpenGridServices.GridServer | |||
53 | 53 | ||
54 | //public LLUUID highestUUID; | 54 | //public LLUUID highestUUID; |
55 | 55 | ||
56 | private SimProfileManager m_simProfileManager; | 56 | // private SimProfileManager m_simProfileManager; |
57 | |||
58 | private GridManager m_gridManager; | ||
57 | 59 | ||
58 | private ConsoleBase m_console; | 60 | private ConsoleBase m_console; |
59 | 61 | ||
@@ -82,6 +84,8 @@ namespace OpenGridServices.GridServer | |||
82 | { | 84 | { |
83 | m_console = new ConsoleBase("opengrid-gridserver-console.log", "OpenGrid", this, false); | 85 | m_console = new ConsoleBase("opengrid-gridserver-console.log", "OpenGrid", this, false); |
84 | MainConsole.Instance = m_console; | 86 | MainConsole.Instance = m_console; |
87 | |||
88 | |||
85 | } | 89 | } |
86 | 90 | ||
87 | public void Startup() | 91 | public void Startup() |
@@ -90,19 +94,19 @@ namespace OpenGridServices.GridServer | |||
90 | Cfg = this.LoadConfigDll(this.ConfigDll); | 94 | Cfg = this.LoadConfigDll(this.ConfigDll); |
91 | Cfg.InitConfig(); | 95 | Cfg.InitConfig(); |
92 | 96 | ||
93 | m_console.WriteLine("Main.cs:Startup() - Loading sim profiles from database"); | 97 | m_console.WriteLine("Main.cs:Startup() - Connecting to MySql Server"); |
94 | m_simProfileManager = new SimProfileManager( this ); | 98 | m_gridManager = new GridManager(); |
95 | m_simProfileManager.LoadProfiles(); | 99 | m_gridManager.AddPlugin("OpenGrid.Framework.Data.MySQL.dll"); // Made of win |
96 | 100 | ||
97 | m_console.WriteLine("Main.cs:Startup() - Starting HTTP process"); | 101 | m_console.WriteLine("Main.cs:Startup() - Starting HTTP process"); |
98 | BaseHttpServer httpServer = new BaseHttpServer(8001); | 102 | BaseHttpServer httpServer = new BaseHttpServer(8001); |
99 | 103 | ||
100 | httpServer.AddXmlRPCHandler("simulator_login", m_simProfileManager.XmlRpcLoginToSimulatorMethod); | 104 | httpServer.AddXmlRPCHandler("simulator_login", m_gridManager.XmlRpcLoginToSimulatorMethod); |
101 | 105 | ||
102 | httpServer.AddRestHandler("GET", "/sims/", m_simProfileManager.RestGetSimMethod); | 106 | httpServer.AddRestHandler("GET", "/sims/", m_gridManager.RestGetSimMethod); |
103 | httpServer.AddRestHandler("POST", "/sims/", m_simProfileManager.RestSetSimMethod); | 107 | httpServer.AddRestHandler("POST", "/sims/", m_gridManager.RestSetSimMethod); |
104 | httpServer.AddRestHandler("GET", "/regions/", m_simProfileManager.RestGetRegionMethod); | 108 | httpServer.AddRestHandler("GET", "/regions/", m_gridManager.RestGetRegionMethod); |
105 | httpServer.AddRestHandler("POST", "/regions/", m_simProfileManager.RestSetRegionMethod); | 109 | httpServer.AddRestHandler("POST", "/regions/", m_gridManager.RestSetRegionMethod); |
106 | 110 | ||
107 | 111 | ||
108 | // lbsa71 : This code snippet taken from old http server. | 112 | // lbsa71 : This code snippet taken from old http server. |
@@ -158,6 +162,7 @@ namespace OpenGridServices.GridServer | |||
158 | 162 | ||
159 | public void CheckSims(object sender, ElapsedEventArgs e) | 163 | public void CheckSims(object sender, ElapsedEventArgs e) |
160 | { | 164 | { |
165 | /* | ||
161 | foreach (SimProfileBase sim in m_simProfileManager.SimProfiles.Values) | 166 | foreach (SimProfileBase sim in m_simProfileManager.SimProfiles.Values) |
162 | { | 167 | { |
163 | string SimResponse = ""; | 168 | string SimResponse = ""; |
@@ -189,6 +194,7 @@ namespace OpenGridServices.GridServer | |||
189 | m_simProfileManager.SimProfiles[sim.UUID].online = false; | 194 | m_simProfileManager.SimProfiles[sim.UUID].online = false; |
190 | } | 195 | } |
191 | } | 196 | } |
197 | */ | ||
192 | } | 198 | } |
193 | 199 | ||
194 | public void RunCmd(string cmd, string[] cmdparams) | 200 | public void RunCmd(string cmd, string[] cmdparams) |