aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGridServices.GridServer
diff options
context:
space:
mode:
authorAdam Frisby2007-05-04 06:51:18 +0000
committerAdam Frisby2007-05-04 06:51:18 +0000
commit0c78fc3dbcb6414fe39afcf175a73bc1107c1910 (patch)
tree4a25f82c32dfc92d23e644ca35099b41cc67dcb0 /OpenGridServices.GridServer
parentAdded Close() function to sanely terminate the grid data interfaces. Declarin... (diff)
downloadopensim-SC_OLD-0c78fc3dbcb6414fe39afcf175a73bc1107c1910.zip
opensim-SC_OLD-0c78fc3dbcb6414fe39afcf175a73bc1107c1910.tar.gz
opensim-SC_OLD-0c78fc3dbcb6414fe39afcf175a73bc1107c1910.tar.bz2
opensim-SC_OLD-0c78fc3dbcb6414fe39afcf175a73bc1107c1910.tar.xz
Grid server V2.0! Now with extra crunchy SQL support.
Status: * Prebuild will be broken, someone needs to update prebuild.xml with the new dependencies. * The sim status check function does not yet function. * Sims must be manually added to the database - automatic insertion isnt supported yet.
Diffstat (limited to 'OpenGridServices.GridServer')
-rw-r--r--OpenGridServices.GridServer/Main.cs24
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)