aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGridServices/ServiceManager/ServiceManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenGridServices/ServiceManager/ServiceManager.cs')
-rw-r--r--OpenGridServices/ServiceManager/ServiceManager.cs22
1 files changed, 14 insertions, 8 deletions
diff --git a/OpenGridServices/ServiceManager/ServiceManager.cs b/OpenGridServices/ServiceManager/ServiceManager.cs
index 2491f39..1de9475 100644
--- a/OpenGridServices/ServiceManager/ServiceManager.cs
+++ b/OpenGridServices/ServiceManager/ServiceManager.cs
@@ -5,16 +5,17 @@ using System.ServiceProcess;
5using System.Xml; 5using System.Xml;
6using System.IO; 6using System.IO;
7using libsecondlife; 7using libsecondlife;
8using OpenSim.GenericConfig;
8 9
9public class OpenGridMasterService : System.ServiceProcess.ServiceBase { 10public class OpenGridMasterService : System.ServiceProcess.ServiceBase {
10 11
11 private Thread ServiceWorkerThread; 12 private Thread ServiceWorkerThread;
12 private static string GridURL; 13 private static string GridURL; // URL of grid server
13 private static string SimSendKey; 14 private static string GridSimKey; // key sent from Grid>Sim
14 private static string SimRecvKey; 15 private static string SimGridKey; // key sent Sim>Grid
15 private static string AssetURL; 16 private static string AssetURL; // URL of asset server
16 private static string UserSendKey; 17 private static string UserSendKey; // key sent from user>sim
17 private static string UserRecvKey; 18 private static string UserRecvKey; // key sent from sim>user
18 19
19 public OpenGridMasterService() 20 public OpenGridMasterService()
20 { 21 {
@@ -83,8 +84,13 @@ public class OpenGridMasterService : System.ServiceProcess.ServiceBase {
83 p.StartInfo.Arguments = "-dumpxmlconf"; 84 p.StartInfo.Arguments = "-dumpxmlconf";
84 p.Start(); 85 p.Start();
85 86
86 StreamReader reader=new StreamReader("opengrid-cfgdump.xml"); 87 XmlConfig GridConf = new XmlConfig("opengrid-cfg.xml");
87 string configxml = reader.ReadToEnd(); 88 GridConf.LoadData();
89 GridURL="http://" + GridConf.GetAttribute("ListenAddr") + ":" + GridConf.GetAttribute("ListenPort") + "/";
90
91 StreamReader reader=new StreamReader("opengrid-cfg.xml");
92 string configxml = reader.ReadToEnd();
93
88 return configxml; 94 return configxml;
89 } catch(Exception e) { 95 } catch(Exception e) {
90 Console.WriteLine("An error occurred while running the grid server, please rectify it and try again"); 96 Console.WriteLine("An error occurred while running the grid server, please rectify it and try again");