diff --git a/OpenSim.Framework/UserProfileManager.cs b/OpenSim.Framework/UserProfileManager.cs
index 38ca5df52d..3f0d665eb4 100644
--- a/OpenSim.Framework/UserProfileManager.cs
+++ b/OpenSim.Framework/UserProfileManager.cs
@@ -90,8 +90,10 @@ namespace OpenSim.Framework.User
LLUUID AgentID = TheUser.UUID;
TheUser.InitSessionData();
- SimProfile SimInfo = new SimProfile();
- SimInfo = SimInfo.LoadFromGrid(TheUser.homeregionhandle, GridURL, GridSendKey, GridRecvKey);
+
+ //for loading data from a grid server, make any changes in CustomiseResponse() (or create a sub class of this and override that method)
+ //SimProfile SimInfo = new SimProfile();
+ //SimInfo = SimInfo.LoadFromGrid(TheUser.homeregionhandle, GridURL, GridSendKey, GridRecvKey);
Hashtable GlobalT = new Hashtable();
@@ -146,7 +148,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;
diff --git a/OpenSim.RegionServer/RegionInfo.cs b/OpenSim.RegionServer/RegionInfo.cs
index e120198f49..83c69ff35e 100644
--- a/OpenSim.RegionServer/RegionInfo.cs
+++ b/OpenSim.RegionServer/RegionInfo.cs
@@ -1,9 +1,9 @@
using System;
using System.Collections.Generic;
using System.Text;
-using System.Net;
-using System.Web;
-using System.IO;
+using System.Net;
+using System.Web;
+using System.IO;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Utilities;
using libsecondlife;
@@ -37,37 +37,39 @@ 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();
+ public void SaveToGrid()
+ {
+ //we really want to keep any server connection code out of here and out of the code code
+ // and put it in the server connection classes (those inheriting from IGridServer etc)
+ 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 += "";
- 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);
- }
+ 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)
{
@@ -167,7 +169,7 @@ namespace OpenSim
{
this.GridURL = attri;
}
-
+
//Grid Send Key
attri = "";
attri = configData.GetAttribute("GridSendKey");
@@ -180,7 +182,7 @@ namespace OpenSim
{
this.GridSendKey = attri;
}
-
+
//Grid Receive Key
attri = "";
attri = configData.GetAttribute("GridRecvKey");
@@ -192,12 +194,15 @@ namespace OpenSim
else
{
this.GridRecvKey = attri;
- }
-
+ }
+
}
this.RegionHandle = Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256));
- this.SaveToGrid();
+ if (!this.isSandbox)
+ {
+ this.SaveToGrid();
+ }
configData.Commit();
}
catch (Exception e)