From e9aa24feff34ed825f9d4b95c772e82666927797 Mon Sep 17 00:00:00 2001 From: gareth Date: Wed, 30 May 2007 00:24:31 +0000 Subject: Another rebuild of the build files! :O More XML config stuff in ServiceManager --- OpenGridServices/ServiceManager/ServiceManager.cs | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'OpenGridServices/ServiceManager/ServiceManager.cs') 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; using System.Xml; using System.IO; using libsecondlife; +using OpenSim.GenericConfig; public class OpenGridMasterService : System.ServiceProcess.ServiceBase { private Thread ServiceWorkerThread; - private static string GridURL; - private static string SimSendKey; - private static string SimRecvKey; - private static string AssetURL; - private static string UserSendKey; - private static string UserRecvKey; + private static string GridURL; // URL of grid server + private static string GridSimKey; // key sent from Grid>Sim + private static string SimGridKey; // key sent Sim>Grid + private static string AssetURL; // URL of asset server + private static string UserSendKey; // key sent from user>sim + private static string UserRecvKey; // key sent from sim>user public OpenGridMasterService() { @@ -83,8 +84,13 @@ public class OpenGridMasterService : System.ServiceProcess.ServiceBase { p.StartInfo.Arguments = "-dumpxmlconf"; p.Start(); - StreamReader reader=new StreamReader("opengrid-cfgdump.xml"); - string configxml = reader.ReadToEnd(); + XmlConfig GridConf = new XmlConfig("opengrid-cfg.xml"); + GridConf.LoadData(); + GridURL="http://" + GridConf.GetAttribute("ListenAddr") + ":" + GridConf.GetAttribute("ListenPort") + "/"; + + StreamReader reader=new StreamReader("opengrid-cfg.xml"); + string configxml = reader.ReadToEnd(); + return configxml; } catch(Exception e) { Console.WriteLine("An error occurred while running the grid server, please rectify it and try again"); -- cgit v1.1