aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.RegionServer
diff options
context:
space:
mode:
authorgareth2007-04-04 18:57:13 +0000
committergareth2007-04-04 18:57:13 +0000
commitf741e00ad8b87485d98e8bca82e4256cb30615d1 (patch)
tree3b82325fe68cae9a6a640547937217b6b270a179 /OpenSim.RegionServer
parentDeleted OpenSim.Config/SimConfigDb4o, as it hasn't been used for a while now. (diff)
downloadopensim-SC-f741e00ad8b87485d98e8bca82e4256cb30615d1.zip
opensim-SC-f741e00ad8b87485d98e8bca82e4256cb30615d1.tar.gz
opensim-SC-f741e00ad8b87485d98e8bca82e4256cb30615d1.tar.bz2
opensim-SC-f741e00ad8b87485d98e8bca82e4256cb30615d1.tar.xz
Added SimUUID
Added empty POST for /sims in REST on gridserver
Diffstat (limited to 'OpenSim.RegionServer')
-rw-r--r--OpenSim.RegionServer/OpenSimMain.cs18
-rw-r--r--OpenSim.RegionServer/RegionInfo.cs20
2 files changed, 22 insertions, 16 deletions
diff --git a/OpenSim.RegionServer/OpenSimMain.cs b/OpenSim.RegionServer/OpenSimMain.cs
index 5db654e..a3dfa6d 100644
--- a/OpenSim.RegionServer/OpenSimMain.cs
+++ b/OpenSim.RegionServer/OpenSimMain.cs
@@ -55,6 +55,7 @@ namespace OpenSim
55 public class OpenSimMain : OpenSimNetworkHandler, conscmd_callback 55 public class OpenSimMain : OpenSimNetworkHandler, conscmd_callback
56 { 56 {
57 57
58 LLUUID SimUUID;
58 //private SimConfig Cfg; 59 //private SimConfig Cfg;
59 private IGenericConfig localConfig; 60 private IGenericConfig localConfig;
60 //private IGenericConfig remoteConfig; 61 //private IGenericConfig remoteConfig;
@@ -110,20 +111,9 @@ namespace OpenSim
110 Console.WriteLine(e.Message); 111 Console.WriteLine(e.Message);
111 } 112 }
112 m_console.WriteLine("Main.cs:Startup() - Loading configuration"); 113 m_console.WriteLine("Main.cs:Startup() - Loading configuration");
113 string configfromgrid = localConfig.GetAttribute("ConfigFromGrid"); 114 this.regionData.InitConfig(this.m_sandbox, this.localConfig);
114 if (configfromgrid == "true") 115 SimUUID = new LLUUID(localConfig.GetAttribute("SimUUID"));
115 { 116 this.localConfig.Close();//for now we can close it as no other classes read from it , but this should change
116 //config from remote server is not implemented yet
117 //this.remoteConfig = new RemoteConfig(localConfig.GetAttribute("RemoteConfigURL"), localConfig.GetAttribute("SimUUID"));
118 //this.remoteConfig.LoadData();
119 //this.regionData.InitConfig(this.m_sandbox, this.remoteConfig);
120 //this.remoteConfig.Close();
121 }
122 else
123 {
124 this.regionData.InitConfig(this.m_sandbox, this.localConfig);
125 }
126 this.localConfig.Close();//for now we can close it as no other classes read from it , but this should change
127 117
128 GridServers = new Grid(); 118 GridServers = new Grid();
129 if (m_sandbox) 119 if (m_sandbox)
diff --git a/OpenSim.RegionServer/RegionInfo.cs b/OpenSim.RegionServer/RegionInfo.cs
index 806d7cc..15998cf 100644
--- a/OpenSim.RegionServer/RegionInfo.cs
+++ b/OpenSim.RegionServer/RegionInfo.cs
@@ -3,12 +3,14 @@ using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using OpenSim.Framework.Interfaces; 4using OpenSim.Framework.Interfaces;
5using OpenSim.Framework.Utilities; 5using OpenSim.Framework.Utilities;
6using libsecondlife;
6 7
7namespace OpenSim 8namespace OpenSim
8{ 9{
9 public class RegionInfo // could inherit from SimProfileBase 10 public class RegionInfo // could inherit from SimProfileBase
10 { 11 {
11 public string RegionName; 12 public string RegionName;
13 public LLUUID SimUUID;
12 14
13 public uint RegionLocX; 15 public uint RegionLocX;
14 public uint RegionLocY; 16 public uint RegionLocY;
@@ -40,8 +42,21 @@ namespace OpenSim
40 this.isSandbox = sandboxMode; 42 this.isSandbox = sandboxMode;
41 try 43 try
42 { 44 {
45 // Sim UUID
46 string attri ="";
47 attri = configData.GetAttribute("SimUUID");
48 if (attri == "")
49 {
50 this.SimUUID = LLUUID.Random();
51 configData.SetAttribute("SimUUID", this.SimUUID.ToString());
52 }
53 else
54 {
55 this.SimUUID = new LLUUID(attri);
56 }
57
43 // Sim name 58 // Sim name
44 string attri =""; 59 attri ="";
45 attri = configData.GetAttribute("SimName"); 60 attri = configData.GetAttribute("SimName");
46 if (attri == "") 61 if (attri == "")
47 { 62 {
@@ -215,7 +230,8 @@ namespace OpenSim
215 } 230 }
216 231
217 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Sim settings loaded:"); 232 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Sim settings loaded:");
218 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Name: " + this.RegionName); 233 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("UUID: " + this.SimUUID.ToStringHyphenated());
234 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Name: " + this.RegionName);
219 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Region Location: [" + this.RegionLocX.ToString() + "," + this.RegionLocY + "]"); 235 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Region Location: [" + this.RegionLocX.ToString() + "," + this.RegionLocY + "]");
220 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Region Handle: " + this.RegionHandle.ToString()); 236 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Region Handle: " + this.RegionHandle.ToString());
221 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Listening on IP: " + this.IPListenAddr + ":" + this.IPListenPort); 237 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Listening on IP: " + this.IPListenAddr + ":" + this.IPListenPort);