From 950389a2633034fa8ff93dfa97dc14db46d40efc Mon Sep 17 00:00:00 2001
From: gareth
Date: Wed, 11 Apr 2007 08:51:39 +0000
Subject: Added POST handler for /sims/ in the grid server Removed asset/user
config in grid mode in the region server Added "create user" command in the
user server console Begun buggy code to send sim details to the grid at
startup Drank whole pack of red bull in one night and made stupid jokes in
SVN logs and C# comments
---
.../OpenGrid.Config.GridConfigDb4o.dll.build | 92 ++++----
OpenGridServices.GridServer/GridHttp.cs | 110 +++++++--
.../OpenGridServices.GridServer.exe.build | 96 ++++----
OpenGridServices.UserServer/Main.cs | 61 ++---
.../OpenGridServices.UserServer.exe.build | 94 ++++----
.../OpenSim.Framework.Console.dll.build | 84 +++----
OpenSim.Framework/OpenSim.Framework.dll.build | 134 +++++------
OpenSim.Framework/SimProfile.cs | 35 ++-
OpenSim.Framework/UserProfileManager.cs | 8 +-
.../Xml/OpenSim.GenericConfig.Xml.dll.build | 84 +++----
.../Local/OpenSim.GridInterfaces.Local.dll.build | 92 ++++----
.../Remote/OpenSim.GridInterfaces.Remote.dll.build | 90 ++++----
.../OpenSim.Physics.BasicPhysicsPlugin.dll.build | 84 +++----
.../Manager/OpenSim.Physics.Manager.dll.build | 94 ++++----
.../OdePlugin/OpenSim.Physics.OdePlugin.dll.build | 86 +++----
.../OpenSim.Physics.PhysXPlugin.dll.build | 86 +++----
.../OpenSim.RegionServer.dll.build | 164 +++++++-------
OpenSim.RegionServer/OpenSimMain.cs | 1 -
OpenSim.RegionServer/RegionInfo.cs | 104 ++++-----
...penSim.Storage.LocalStorageBerkeleyDB.dll.build | 94 ++++----
.../OpenSim.Storage.LocalStorageSQLite.dll.build | 92 ++++----
.../OpenSim.Storage.LocalStorageDb4o.dll.build | 94 ++++----
.../OpenSim.Terrain.BasicTerrain.dll.build | 86 +++----
OpenSim.build | 248 ++++++++++-----------
OpenSim/OpenSim.exe.build | 96 ++++----
.../OpenUser.Config.UserConfigDb4o.dll.build | 92 ++++----
Prebuild/Prebuild.build | 134 +++++------
Prebuild/src/Prebuild.exe.build | 160 ++++++-------
Servers/OpenSim.Servers.dll.build | 96 ++++----
bin/OpenSim.Terrain.BasicTerrain.dll | Bin 16384 -> 5632 bytes
prebuild.xml | 3 +-
31 files changed, 1443 insertions(+), 1351 deletions(-)
diff --git a/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build b/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build
index 61d3efd..73e09ce 100644
--- a/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build
+++ b/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build
@@ -1,46 +1,46 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OpenGridServices.GridServer/GridHttp.cs b/OpenGridServices.GridServer/GridHttp.cs
index 4bc9ef0..ed56b63 100644
--- a/OpenGridServices.GridServer/GridHttp.cs
+++ b/OpenGridServices.GridServer/GridHttp.cs
@@ -57,6 +57,7 @@ namespace OpenGridServices.GridServer
MainConsole.Instance.WriteLine("GridHttp.cs:StartHTTP() - Spawned main thread OK");
Listener = new HttpListener();
+ Listener.Prefixes.Add("http://+:8001/");
Listener.Prefixes.Add("http://+:8001/sims/");
Listener.Prefixes.Add("http://+:8001/gods/");
Listener.Prefixes.Add("http://+:8001/highestuuid/");
@@ -79,23 +80,30 @@ namespace OpenGridServices.GridServer
Hashtable requestData = (Hashtable)request.Params[0];
switch(request.MethodName) {
case "simulator_login":
- if(!(referrer=="simulator")) {
+
+ /*if(!((string)requestData["authkey"]==OpenGrid_Main.thegrid.SimRecvKey)) {
XmlRpcResponse ErrorResp = new XmlRpcResponse();
Hashtable ErrorRespData = new Hashtable();
- ErrorRespData["error"]="Only simulators can login with this method";
+ ErrorRespData["error"]="invalid key";
ErrorResp.Value=ErrorRespData;
return(Regex.Replace(XmlRpcResponseSerializer.Singleton.Serialize(ErrorResp),"utf-16","utf-8"));
- }
-
- if(!((string)requestData["authkey"]==OpenGrid_Main.thegrid.SimRecvKey)) {
+ }*/
+ SimProfileBase TheSim = null;
+
+ if(requestData.ContainsKey("UUID")) {
+ TheSim = OpenGrid_Main.thegrid._regionmanager.GetProfileByLLUUID(new LLUUID((string)requestData["UUID"]));
+ } else if (requestData.ContainsKey("region_handle")){
+ TheSim = OpenGrid_Main.thegrid._regionmanager.GetProfileByHandle((ulong)Convert.ToUInt64(requestData["region_handle"]));
+ }
+
+ if(TheSim==null) {
XmlRpcResponse ErrorResp = new XmlRpcResponse();
Hashtable ErrorRespData = new Hashtable();
- ErrorRespData["error"]="invalid key";
+ ErrorRespData["error"]="sim not found";
ErrorResp.Value=ErrorRespData;
- return(Regex.Replace(XmlRpcResponseSerializer.Singleton.Serialize(ErrorResp),"utf-16","utf-8"));
- }
+ return(Regex.Replace(XmlRpcResponseSerializer.Singleton.Serialize(ErrorResp),"utf-16","utf-8"));
+ }
- SimProfileBase TheSim = OpenGrid_Main.thegrid._regionmanager.GetProfileByLLUUID(new LLUUID((string)requestData["UUID"]));
XmlRpcResponse SimLoginResp = new XmlRpcResponse();
Hashtable SimLoginRespData = new Hashtable();
@@ -115,7 +123,8 @@ namespace OpenGridServices.GridServer
SimNeighboursData.Add(NeighbourBlock);
}
}
-
+
+ SimLoginRespData["UUID"]=TheSim.UUID;
SimLoginRespData["region_locx"]=TheSim.RegionLocX.ToString();
SimLoginRespData["region_locy"]=TheSim.RegionLocY.ToString();
SimLoginRespData["regionname"]=TheSim.regionname;
@@ -138,15 +147,24 @@ namespace OpenGridServices.GridServer
return "";
}
- static string ParseREST(string requestBody, string requestURL, string HTTPmethod) {
+ static string ParseREST(string requestURL, string requestBody, string HTTPmethod) {
char[] splitter = {'/'};
string[] rest_params = requestURL.Split(splitter);
string req_type = rest_params[0]; // First part of the URL is the type of request -
- string respstring;
+ string respstring="";
+ SimProfileBase TheSim;
+ Console.WriteLine(req_type);
switch(req_type) {
- case "sims":
+ case "regions":
+ // DIRTY HACK ALERT
+ Console.WriteLine("/regions/ accessed");
+ TheSim=OpenGrid_Main.thegrid._regionmanager.GetProfileByHandle((ulong)Convert.ToUInt64(rest_params[1]));
+ respstring=ParseREST("/regions/" + rest_params[1], requestBody, HTTPmethod);
+ break;
+
+ case "sims":
LLUUID UUID = new LLUUID((string)rest_params[1]);
- SimProfileBase TheSim = OpenGrid_Main.thegrid._regionmanager.GetProfileByLLUUID(UUID);
+ TheSim = OpenGrid_Main.thegrid._regionmanager.GetProfileByLLUUID(UUID);
if(!(TheSim==null)) {
switch(HTTPmethod) {
case "GET":
@@ -162,18 +180,67 @@ namespace OpenGridServices.GridServer
respstring+="";
break;
case "POST":
+ Console.WriteLine("Updating sim details.....");
XmlDocument doc = new XmlDocument();
doc.LoadXml(requestBody);
XmlNode authkeynode = doc.FirstChild;
- if (authkeynode.Name != "authkey")
- respstring = "bad XML - expected authkey tag";
+ if (authkeynode.Name != "authkey") {
+ respstring = "ERROR! bad XML - expected authkey tag";
+ return respstring;
+ }
XmlNode simnode = doc.ChildNodes[1];
- if (simnode.Name != "sim")
- respstring = "bad XML - expected sim tag";
+ if (simnode.Name != "sim") {
+ respstring = "ERROR! bad XML - expected sim tag";
+ return respstring;
+ }
+ if (authkeynode.Name != OpenGrid_Main.thegrid.SimRecvKey) {
+ respstring = "ERROR! invalid key";
+ return respstring;
+ }
+
+ if (TheSim==null) {
+ respstring="ERROR! sim not found";
+ return respstring;
+ } else {
+ for(int i=0; i<= simnode.ChildNodes.Count; i++) {
+ switch(simnode.ChildNodes[i].Name) {
+ case "uuid":
+ // should a sim be able to update it's own UUID? To be decided
+ // watch next week for the exciting conclusion in "the adventures of OpenGridServices.GridServer/GridHttp.cs:ParseREST() at line 190!
+ break; // and line 190's arch-enemy - THE BREAK STATEMENT! OH NOES!!!!! (this code written at 6:57AM, no sleep, lots of caffeine)
+
+ case "regionname":
+ TheSim.regionname=simnode.ChildNodes[i].InnerText;
+ break;
+
+ case "sim_ip":
+ TheSim.sim_ip=simnode.ChildNodes[i].InnerText;
+ break;
+
+ case "sim_port":
+ TheSim.sim_port=Convert.ToUInt32(simnode.ChildNodes[i].InnerText);
+ break;
+
+ case "region_locx":
+ TheSim.RegionLocX=Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText);
+ TheSim.regionhandle=Helpers.UIntsToLong((TheSim.RegionLocX * 256), (TheSim.RegionLocY * 256));
+ break;
+
+ case "region_locy":
+ TheSim.RegionLocY=Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText);
+ TheSim.regionhandle=Helpers.UIntsToLong((TheSim.RegionLocX * 256), (TheSim.RegionLocY * 256));
+ break;
+ }
+ }
+ respstring="OK";
+ }
+
+
break;
}
}
+ return respstring;
break;
}
return "";
@@ -209,9 +276,14 @@ namespace OpenGridServices.GridServer
response.AddHeader("Content-type","text/xml");
break;
+ case "text/plaintext":
+ // must be REST
+ responseString=ParseREST(request.RawUrl,requestBody,request.HttpMethod);
+ break;
+
case null:
// must be REST or invalid crap, so pass to the REST parser
- responseString=ParseREST(request.Url.OriginalString,requestBody,request.HttpMethod);
+ responseString=ParseREST(request.RawUrl,requestBody,request.HttpMethod);
break;
}
diff --git a/OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build b/OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build
index 90eaf1f..111e2f7 100644
--- a/OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build
+++ b/OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build
@@ -1,48 +1,48 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OpenGridServices.UserServer/Main.cs b/OpenGridServices.UserServer/Main.cs
index 999d446..9c128d3 100644
--- a/OpenGridServices.UserServer/Main.cs
+++ b/OpenGridServices.UserServer/Main.cs
@@ -99,6 +99,39 @@ namespace OpenGridServices.UserServer
_httpd = new UserHTTPServer();
}
+
+ public void do_create(string what)
+ {
+ switch(what)
+ {
+ case "user":
+ m_console.WriteLine("Creating new user profile");
+ string tempfirstname;
+ string templastname;
+ string tempMD5Passwd;
+
+ tempfirstname=m_console.CmdPrompt("First name: ");
+ templastname=m_console.CmdPrompt("Last name: ");
+ tempMD5Passwd=m_console.PasswdPrompt("Password: ");
+
+ System.Security.Cryptography.MD5CryptoServiceProvider x = new System.Security.Cryptography.MD5CryptoServiceProvider();
+ byte[] bs = System.Text.Encoding.UTF8.GetBytes(tempMD5Passwd);
+ bs = x.ComputeHash(bs);
+ System.Text.StringBuilder s = new System.Text.StringBuilder();
+ foreach (byte b in bs)
+ {
+ s.Append(b.ToString("x2").ToLower());
+ }
+ tempMD5Passwd = s.ToString();
+
+ UserProfile newuser=_profilemanager.CreateNewProfile(tempfirstname,templastname,tempMD5Passwd);
+ newuser.homelookat = new LLVector3(-0.57343f, -0.819255f, 0f);
+ newuser.homepos = new LLVector3(128f,128f,23f);
+ _profilemanager.SaveUserProfiles();
+ break;
+ }
+ }
+
public void RunCmd(string cmd, string[] cmdparams)
{
switch (cmd)
@@ -108,31 +141,9 @@ namespace OpenGridServices.UserServer
m_console.WriteLine("shutdown - shutdown the grid (USE CAUTION!)");
break;
- case "create user":
- m_console.WriteLine("Creating new user profile");
- string tempfirstname;
- string templastname;
- string tempMD5Passwd;
-
- tempfirstname=m_console.CmdPrompt("First name: ");
- templastname=m_console.CmdPrompt("Last name: ");
- tempMD5Passwd=m_console.PasswdPrompt("Password: ");
-
- System.Security.Cryptography.MD5CryptoServiceProvider x = new System.Security.Cryptography.MD5CryptoServiceProvider();
- byte[] bs = System.Text.Encoding.UTF8.GetBytes(tempMD5Passwd);
- bs = x.ComputeHash(bs);
- System.Text.StringBuilder s = new System.Text.StringBuilder();
- foreach (byte b in bs)
- {
- s.Append(b.ToString("x2").ToLower());
- }
- tempMD5Passwd = "$1$" + s.ToString();
-
- UserProfile newuser=_profilemanager.CreateNewProfile(tempfirstname,templastname,tempMD5Passwd);
- newuser.homelookat = new LLVector3(-0.57343f, -0.819255f, 0f);
- newuser.homepos = new LLVector3(128f,128f,23f);
- _profilemanager.SaveUserProfiles();
- break;
+ case "create":
+ do_create(cmdparams[0]);
+ break;
case "shutdown":
m_console.Close();
diff --git a/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build b/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build
index 7212a7b..fd1be15 100644
--- a/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build
+++ b/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build
@@ -1,47 +1,47 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build b/OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build
index fa90bb6..a3019ee 100644
--- a/OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build
+++ b/OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build
@@ -1,42 +1,42 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OpenSim.Framework/OpenSim.Framework.dll.build b/OpenSim.Framework/OpenSim.Framework.dll.build
index 89010d2..b351625 100644
--- a/OpenSim.Framework/OpenSim.Framework.dll.build
+++ b/OpenSim.Framework/OpenSim.Framework.dll.build
@@ -1,67 +1,67 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OpenSim.Framework/SimProfile.cs b/OpenSim.Framework/SimProfile.cs
index ac4cf9e..fd130f0 100644
--- a/OpenSim.Framework/SimProfile.cs
+++ b/OpenSim.Framework/SimProfile.cs
@@ -16,11 +16,43 @@ namespace OpenSim.Framework.Sims
{
Hashtable GridReqParams = new Hashtable();
GridReqParams["region_handle"] = region_handle.ToString();
+ GridReqParams["authkey"] = SendKey;
+ ArrayList SendParams = new ArrayList();
+ SendParams.Add(GridReqParams);
+ XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams);
+
+ XmlRpcResponse GridResp = GridReq.Send(GridURL, 3000);
+
+ Hashtable RespData = (Hashtable)GridResp.Value;
+ this.UUID = new LLUUID((string)RespData["UUID"]);
+ this.regionhandle = (ulong)Convert.ToUInt64(RespData["regionhandle"]);
+ this.regionname = (string)RespData["regionname"];
+ this.sim_ip = (string)RespData["sim_ip"];
+ this.sim_port = (uint)Convert.ToUInt16(RespData["sim_port"]);
+ this.caps_url = (string)RespData["caps_url"];
+ this.RegionLocX = (uint)Convert.ToUInt32(RespData["RegionLocX"]);
+ this.RegionLocY = (uint)Convert.ToUInt32(RespData["RegionLocY"]);
+ this.sendkey = (string)RespData["sendkey"];
+ this.recvkey = (string)RespData["recvkey"];
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine(e.ToString());
+ }
+ return this;
+ }
+
+ public SimProfile LoadFromGrid(LLUUID UUID, string GridURL, string SendKey, string RecvKey)
+ {
+ try
+ {
+ Hashtable GridReqParams = new Hashtable();
+ GridReqParams["UUID"] = UUID.ToString();
GridReqParams["caller"] = "userserver";
GridReqParams["authkey"] = SendKey;
ArrayList SendParams = new ArrayList();
SendParams.Add(GridReqParams);
- XmlRpcRequest GridReq = new XmlRpcRequest("get_sim_info", SendParams);
+ XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams);
XmlRpcResponse GridResp = GridReq.Send(GridURL, 3000);
@@ -42,6 +74,7 @@ namespace OpenSim.Framework.Sims
}
return this;
}
+
public SimProfile()
{
diff --git a/OpenSim.Framework/UserProfileManager.cs b/OpenSim.Framework/UserProfileManager.cs
index d474834..38ca5df 100644
--- a/OpenSim.Framework/UserProfileManager.cs
+++ b/OpenSim.Framework/UserProfileManager.cs
@@ -90,8 +90,8 @@ namespace OpenSim.Framework.User
LLUUID AgentID = TheUser.UUID;
TheUser.InitSessionData();
- // SimProfile SimInfo = new SimProfile();
- // SimInfo = SimInfo.LoadFromGrid(TheUser.homeregionhandle, GridURL, GridSendKey, GridRecvKey);
+ SimProfile SimInfo = new SimProfile();
+ SimInfo = SimInfo.LoadFromGrid(TheUser.homeregionhandle, GridURL, GridSendKey, GridRecvKey);
Hashtable GlobalT = new Hashtable();
@@ -146,7 +146,7 @@ namespace OpenSim.Framework.User
InitialOutfit.Add(InitialOutfitHash);
uint circode = (uint)(Util.RandomClass.Next());
- //TheUser.AddSimCircuit(circode, SimInfo.UUID);
+ TheUser.AddSimCircuit(circode, SimInfo.UUID);
responseData["last_name"] = TheUser.lastname;
responseData["ui-config"] = ui_config;
@@ -181,7 +181,7 @@ namespace OpenSim.Framework.User
this.CustomiseResponse(ref responseData, TheUser);
response.Value = responseData;
- //TheUser.SendDataToSim(SimInfo);
+ // TheUser.SendDataToSim(SimInfo);
diff --git a/OpenSim.GenericConfig/Xml/OpenSim.GenericConfig.Xml.dll.build b/OpenSim.GenericConfig/Xml/OpenSim.GenericConfig.Xml.dll.build
index f34e4ac..6335985 100644
--- a/OpenSim.GenericConfig/Xml/OpenSim.GenericConfig.Xml.dll.build
+++ b/OpenSim.GenericConfig/Xml/OpenSim.GenericConfig.Xml.dll.build
@@ -1,42 +1,42 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build b/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build
index 6bf398e..c7a1966 100644
--- a/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build
+++ b/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build
@@ -1,46 +1,46 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.dll.build b/OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.dll.build
index dd6db18..4788f32 100644
--- a/OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.dll.build
+++ b/OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.dll.build
@@ -1,45 +1,45 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.dll.build b/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.dll.build
index 3497a55..7b063a3 100644
--- a/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.dll.build
+++ b/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.dll.build
@@ -1,42 +1,42 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OpenSim.Physics/Manager/OpenSim.Physics.Manager.dll.build b/OpenSim.Physics/Manager/OpenSim.Physics.Manager.dll.build
index 4b5ee51..1554485 100644
--- a/OpenSim.Physics/Manager/OpenSim.Physics.Manager.dll.build
+++ b/OpenSim.Physics/Manager/OpenSim.Physics.Manager.dll.build
@@ -1,47 +1,47 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.dll.build b/OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.dll.build
index f25361a..098472a 100644
--- a/OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.dll.build
+++ b/OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.dll.build
@@ -1,43 +1,43 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.dll.build b/OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.dll.build
index 5ab70bb..3ae7013 100644
--- a/OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.dll.build
+++ b/OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.dll.build
@@ -1,43 +1,43 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OpenSim.RegionServer/OpenSim.RegionServer.dll.build b/OpenSim.RegionServer/OpenSim.RegionServer.dll.build
index 331cfd4..cd900f5 100644
--- a/OpenSim.RegionServer/OpenSim.RegionServer.dll.build
+++ b/OpenSim.RegionServer/OpenSim.RegionServer.dll.build
@@ -1,82 +1,82 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OpenSim.RegionServer/OpenSimMain.cs b/OpenSim.RegionServer/OpenSimMain.cs
index 34fa243..d36dbfc 100644
--- a/OpenSim.RegionServer/OpenSimMain.cs
+++ b/OpenSim.RegionServer/OpenSimMain.cs
@@ -114,7 +114,6 @@ namespace OpenSim
}
m_console.WriteLine("Main.cs:Startup() - Loading configuration");
this.regionData.InitConfig(this.m_sandbox, this.localConfig);
- //regionData.SimUUID = new LLUUID(localConfig.GetAttribute("SimUUID")); //don't need as regionData.SimUUID is already set through the above line
this.localConfig.Close();//for now we can close it as no other classes read from it , but this should change
diff --git a/OpenSim.RegionServer/RegionInfo.cs b/OpenSim.RegionServer/RegionInfo.cs
index cf0c075..e120198 100644
--- a/OpenSim.RegionServer/RegionInfo.cs
+++ b/OpenSim.RegionServer/RegionInfo.cs
@@ -1,6 +1,9 @@
using System;
using System.Collections.Generic;
using System.Text;
+using System.Net;
+using System.Web;
+using System.IO;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Utilities;
using libsecondlife;
@@ -34,7 +37,37 @@ namespace OpenSim
public RegionInfo()
{
- }
+ }
+
+ public void SaveToGrid()
+ {
+ string reqtext;
+ reqtext="" + this.GridSendKey + "";
+ reqtext+="";
+ reqtext+="" + this.SimUUID.ToString() + "";
+ reqtext+="" + this.RegionName + "";
+ reqtext+="" + this.IPListenAddr + "";
+ reqtext+="" + this.IPListenPort.ToString() + "";
+ reqtext+="" + this.RegionLocX.ToString() + "";
+ reqtext+="" + this.RegionLocY.ToString() + "";
+ reqtext+="1";
+ reqtext+="";
+
+ WebRequest GridSaveReq = WebRequest.Create(this.GridURL + "sims/" + this.SimUUID.ToString());
+ GridSaveReq.Method = "POST";
+ GridSaveReq.ContentType = "text/plaintext";
+ GridSaveReq.ContentLength = reqtext.Length;
+
+ StreamWriter stOut = new StreamWriter(GridSaveReq.GetRequestStream(), System.Text.Encoding.ASCII);
+ stOut.Write(reqtext);
+ stOut.Close();
+
+ StreamReader stIn = new StreamReader(GridSaveReq.GetResponse().GetResponseStream());
+ string GridResponse = stIn.ReadToEnd();
+ stIn.Close();
+
+ OpenSim.Framework.Console.MainConsole.Instance.WriteLine("RegionInfo.CS:SaveToGrid() - Grid said: " + GridResponse);
+ }
public void InitConfig(bool sandboxMode, IGenericConfig configData)
{
@@ -122,31 +155,7 @@ namespace OpenSim
{
//shouldn't be reading this data in here, it should be up to the classes implementing the server interfaces to read what they need from the config object
- // Asset Server URL
- attri = "";
- attri = configData.GetAttribute("AssetServerURL");
- if (attri == "")
- {
- this.AssetURL = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Asset server URL: ");
- configData.SetAttribute("AssetServerURL", this.AssetURL);
- }
- else
- {
- this.AssetURL = attri;
- }
- //Asset Server key
- attri = "";
- attri = configData.GetAttribute("AssetServerKey");
- if (attri == "")
- {
- this.AssetSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Asset server key: ");
- configData.SetAttribute("AssetServerKey", this.AssetSendKey);
- }
- else
- {
- this.AssetSendKey = attri;
- }
- //Grid Sever URL
+ //Grid Server URL
attri = "";
attri = configData.GetAttribute("GridServerURL");
if (attri == "")
@@ -158,6 +167,7 @@ namespace OpenSim
{
this.GridURL = attri;
}
+
//Grid Send Key
attri = "";
attri = configData.GetAttribute("GridSendKey");
@@ -170,6 +180,7 @@ namespace OpenSim
{
this.GridSendKey = attri;
}
+
//Grid Receive Key
attri = "";
attri = configData.GetAttribute("GridRecvKey");
@@ -181,45 +192,12 @@ namespace OpenSim
else
{
this.GridRecvKey = attri;
- }
- //User Server URL
- attri = "";
- attri = configData.GetAttribute("UserServerURL");
- if (attri == "")
- {
- this.UserURL = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("User server URL: ");
- configData.SetAttribute("UserServerURL", this.UserURL);
- }
- else
- {
- this.UserURL = attri;
- }
- //User Send Key
- attri = "";
- attri = configData.GetAttribute("UserSendKey");
- if (attri == "")
- {
- this.UserSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to user server: ");
- configData.SetAttribute("UserSendKey", this.UserSendKey);
- }
- else
- {
- this.UserSendKey = attri;
- }
- //User Receive Key
- attri = "";
- attri = configData.GetAttribute("UserRecvKey");
- if (attri == "")
- {
- this.UserRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from user server: ");
- configData.SetAttribute("UserRecvKey", this.UserRecvKey);
- }
- else
- {
- this.UserRecvKey = attri;
- }
+ }
+
+
}
this.RegionHandle = Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256));
+ this.SaveToGrid();
configData.Commit();
}
catch (Exception e)
diff --git a/OpenSim.Storage.LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.dll.build b/OpenSim.Storage.LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.dll.build
index f28d224..9592c1e 100644
--- a/OpenSim.Storage.LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.dll.build
+++ b/OpenSim.Storage.LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.dll.build
@@ -1,47 +1,47 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OpenSim.Storage.LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.dll.build b/OpenSim.Storage.LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.dll.build
index f3a6683..c3699af 100644
--- a/OpenSim.Storage.LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.dll.build
+++ b/OpenSim.Storage.LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.dll.build
@@ -1,46 +1,46 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build b/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build
index 8be321d..439f440 100644
--- a/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build
+++ b/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build
@@ -1,47 +1,47 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.dll.build b/OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.dll.build
index d2e6c9f..2c43aa0 100644
--- a/OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.dll.build
+++ b/OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.dll.build
@@ -1,43 +1,43 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OpenSim.build b/OpenSim.build
index a807110..6d9df46 100644
--- a/OpenSim.build
+++ b/OpenSim.build
@@ -1,124 +1,124 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OpenSim/OpenSim.exe.build b/OpenSim/OpenSim.exe.build
index 02445df..54b7a3b 100644
--- a/OpenSim/OpenSim.exe.build
+++ b/OpenSim/OpenSim.exe.build
@@ -1,48 +1,48 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build b/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build
index 8494a0b..0abcfa1 100644
--- a/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build
+++ b/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build
@@ -1,46 +1,46 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Prebuild/Prebuild.build b/Prebuild/Prebuild.build
index 395fb31..743b826 100644
--- a/Prebuild/Prebuild.build
+++ b/Prebuild/Prebuild.build
@@ -1,67 +1,67 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Prebuild/src/Prebuild.exe.build b/Prebuild/src/Prebuild.exe.build
index 43f5516..628e7e1 100644
--- a/Prebuild/src/Prebuild.exe.build
+++ b/Prebuild/src/Prebuild.exe.build
@@ -1,80 +1,80 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Servers/OpenSim.Servers.dll.build b/Servers/OpenSim.Servers.dll.build
index 1d4b496..74d1072 100644
--- a/Servers/OpenSim.Servers.dll.build
+++ b/Servers/OpenSim.Servers.dll.build
@@ -1,48 +1,48 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/bin/OpenSim.Terrain.BasicTerrain.dll b/bin/OpenSim.Terrain.BasicTerrain.dll
index 089f0c8..729a93f 100644
Binary files a/bin/OpenSim.Terrain.BasicTerrain.dll and b/bin/OpenSim.Terrain.BasicTerrain.dll differ
diff --git a/prebuild.xml b/prebuild.xml
index b0ea3be..659a298 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -516,7 +516,7 @@
-
+
@@ -525,7 +525,6 @@
-
--
cgit v1.1