aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGridServices
diff options
context:
space:
mode:
Diffstat (limited to 'OpenGridServices')
-rw-r--r--OpenGridServices/ServiceManager/ServiceManager.cs22
-rw-r--r--OpenGridServices/ServiceManager/ServiceManager.csproj4
-rw-r--r--OpenGridServices/ServiceManager/ServiceManager.exe.build1
3 files changed, 19 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");
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 @@
74 <HintPath>..\..\bin\libsecondlife.dll</HintPath> 74 <HintPath>..\..\bin\libsecondlife.dll</HintPath>
75 <Private>False</Private> 75 <Private>False</Private>
76 </Reference> 76 </Reference>
77 <Reference Include="OpenSim.GenericConfig.Xml" >
78 <HintPath>OpenSim.GenericConfig.Xml.dll</HintPath>
79 <Private>False</Private>
80 </Reference>
77 </ItemGroup> 81 </ItemGroup>
78 <ItemGroup> 82 <ItemGroup>
79 </ItemGroup> 83 </ItemGroup>
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 @@
22 <include name="System.ServiceProcess.dll" /> 22 <include name="System.ServiceProcess.dll" />
23 <include name="System.Xml.dll" /> 23 <include name="System.Xml.dll" />
24 <include name="../../bin/libsecondlife.dll" /> 24 <include name="../../bin/libsecondlife.dll" />
25 <include name="../../bin/OpenSim.GenericConfig.Xml.dll" />
25 </references> 26 </references>
26 </csc> 27 </csc>
27 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" /> 28 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />