diff --git a/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build b/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build
index 61d3efdd8d..73e09cee24 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 4bc9ef0e96..ed56b63391 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")) {
- XmlRpcResponse ErrorResp = new XmlRpcResponse();
- Hashtable ErrorRespData = new Hashtable();
- ErrorRespData["error"]="Only simulators can login with this method";
- ErrorResp.Value=ErrorRespData;
- return(Regex.Replace(XmlRpcResponseSerializer.Singleton.Serialize(ErrorResp),"utf-16","utf-8"));
- }
-
- if(!((string)requestData["authkey"]==OpenGrid_Main.thegrid.SimRecvKey)) {
+
+ /*if(!((string)requestData["authkey"]==OpenGrid_Main.thegrid.SimRecvKey)) {
XmlRpcResponse ErrorResp = new XmlRpcResponse();
Hashtable ErrorRespData = new Hashtable();
ErrorRespData["error"]="invalid key";
ErrorResp.Value=ErrorRespData;
return(Regex.Replace(XmlRpcResponseSerializer.Singleton.Serialize(ErrorResp),"utf-16","utf-8"));
- }
+ }*/
+ 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"]="sim not found";
+ ErrorResp.Value=ErrorRespData;
+ 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 90eaf1fbf5..111e2f7213 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 999d446dd1..9c128d3804 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 7212a7ba4a..fd1be1543a 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 fa90bb60cc..a3019ee83e 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 89010d2301..b351625070 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 ac4cf9e327..fd130f084f 100644
--- a/OpenSim.Framework/SimProfile.cs
+++ b/OpenSim.Framework/SimProfile.cs
@@ -16,11 +16,10 @@ namespace OpenSim.Framework.Sims
{
Hashtable GridReqParams = new Hashtable();
GridReqParams["region_handle"] = region_handle.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 +41,40 @@ namespace OpenSim.Framework.Sims
}
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("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()
{
diff --git a/OpenSim.Framework/UserProfileManager.cs b/OpenSim.Framework/UserProfileManager.cs
index d4748345cd..38ca5df52d 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 f34e4acbd5..63359857bb 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 6bf398e574..c7a19667e2 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 dd6db181d1..4788f32198 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 3497a55352..7b063a3634 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 4b5ee51cc6..15544852b9 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 f25361a432..098472aac4 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 5ab70bb7c1..3ae7013826 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 331cfd4427..cd900f56ce 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 34fa243db0..d36dbfc30c 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 cf0c075856..e120198f49 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 f28d224c05..9592c1e8b0 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 f3a6683be4..c3699afcca 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 8be321dda7..439f440097 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 d2e6c9f77a..2c43aa01e8 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 a8071107a4..6d9df46c07 100644
--- a/OpenSim.build
+++ b/OpenSim.build
@@ -1,124 +1,124 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OpenSim/OpenSim.exe.build b/OpenSim/OpenSim.exe.build
index 02445dfb79..54b7a3b64d 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 8494a0b814..0abcfa125c 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 395fb31e54..743b8263b6 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 43f5516127..628e7e160d 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 1d4b49627e..74d1072bc8 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 089f0c8621..729a93feb8 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 b0ea3bed6d..659a298391 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -516,7 +516,7 @@
-
+
@@ -525,7 +525,6 @@
-