diff --git a/OpenGridServices/ServiceManager/ServiceManager.cs b/OpenGridServices/ServiceManager/ServiceManager.cs
index 2491f39ba8..1de9475329 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 a35e2c1946..8d6a135b6e 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 e62e204239..f88a01aded 100644
--- a/OpenGridServices/ServiceManager/ServiceManager.exe.build
+++ b/OpenGridServices/ServiceManager/ServiceManager.exe.build
@@ -22,6 +22,7 @@
+
diff --git a/prebuild.xml b/prebuild.xml
index fd50e5e43a..1253a08893 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -675,6 +675,7 @@
+