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 ++++++++++++++--------
.../ServiceManager/ServiceManager.csproj | 4 ++++
.../ServiceManager/ServiceManager.exe.build | 1 +
3 files changed, 19 insertions(+), 8 deletions(-)
(limited to 'OpenGridServices')
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");
diff --git a/OpenGridServices/ServiceManager/ServiceManager.csproj b/OpenGridServices/ServiceManager/ServiceManager.csproj
index a35e2c1..8d6a135 100644
--- a/OpenGridServices/ServiceManager/ServiceManager.csproj
+++ b/OpenGridServices/ServiceManager/ServiceManager.csproj
@@ -74,6 +74,10 @@
..\..\bin\libsecondlife.dll
False
+
+ OpenSim.GenericConfig.Xml.dll
+ False
+
diff --git a/OpenGridServices/ServiceManager/ServiceManager.exe.build b/OpenGridServices/ServiceManager/ServiceManager.exe.build
index e62e204..f88a01a 100644
--- a/OpenGridServices/ServiceManager/ServiceManager.exe.build
+++ b/OpenGridServices/ServiceManager/ServiceManager.exe.build
@@ -22,6 +22,7 @@
+
--
cgit v1.1